/* Niemandsland Wiki — handcrafted Obsidian / brass UI. */

.wk-detail { max-width: 960px; margin-inline: auto; overflow-wrap: anywhere; color: #c7c2b9; }
.wk-detail header { margin-block: 32px; }
.wk-detail h1, .wk-detail h2, .wk-detail h3 { font-family: var(--font-display); color: #e2cf94; line-height: 1.25; }
.wk-detail h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
.wk-detail h2 { font-size: 1.35rem; margin-block: 28px 14px; }
.wk-detail h3 { margin-block: 18px 10px; }
.wk-detail p { line-height: 1.8; margin-block: 16px; }
.wk-detail a { color: #d9b65c; text-decoration: underline; text-underline-offset: 3px; }
.wk-detail a:hover { color: #f6e6a8; }
.wk-detail-breadcrumb, .wk-detail-byline { font-size: .8rem; color: #969086; }
.wk-detail-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
.wk-detail .wk-facts, .wk-detail .wk-figure, .wk-detail .wk-callout { margin-block: 24px; }
.wk-detail-faction { border-top: 1px solid #ffffff15; padding-block: 12px; scroll-margin-top: 90px; }
.wk-detail-faction ul { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-detail-related { margin-top: 40px; border-top: 1px solid #ffffff15; }
.wk-detail-related a { display: inline-block; margin: 0 20px 16px 0; }
.wk-detail :focus-visible { outline: 2px solid #d9b65c; outline-offset: 4px; }

.wk-page {
  --wk-gold: #d9b65c;
  --wk-gold-soft: #e6cd8a;
  --wk-muted: #a7a29b;
  --wk-border: #c8a24a2e;
  min-width: 0;
  padding: 12px 0 30px;
}

.wk-page * {
  box-sizing: border-box;
}

.wk-page code {
  font-family: var(--font-mono);
  font-size: .92em;
  color: #d2b77b;
  background: #ffffff08;
  border: 1px solid #ffffff0f;
  border-radius: 4px;
  padding: 0 .32em;
}

/* The crest sprite only exists to carry gradients and animation targets. */
.wk-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.wk-breadcrumb {
  color: #aaa39a;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 11px;
  display: flex;
}

.wk-breadcrumb a:hover {
  color: var(--wk-gold);
}

.wk-breadcrumb > span:last-child {
  color: #dfd5bd;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.wk-hero {
  border: 1px solid var(--wk-border);
  background: radial-gradient(at 78% 44%, #c8a24a0f, #0000 60%), linear-gradient(126deg, #19181c, #0c0c10);
  border-radius: 16px;
  grid-template-columns: 1.06fr 1fr;
  align-items: center;
  gap: 34px;
  padding: 42px 42px 40px;
  display: grid;
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 70px -42px #000, inset 0 1px #ffffff08;
}

/* Transparent archive artwork supplements the original gradients and grid. */
.wk-hero-backdrop {
  position: absolute;
  inset: 0 0 0 auto;
  width: 72%;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #0000, #000 38%);
  mask-image: linear-gradient(90deg, #0000, #000 38%);
}

.wk-hero-backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.wk-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#c8a24a06 1px, #0000 1px) 0 0 / 100% 34px;
  -webkit-mask-image: linear-gradient(#000, #0000 70%);
  mask-image: linear-gradient(#000, #0000 70%);
  pointer-events: none;
}

.wk-hero-rule {
  background: linear-gradient(90deg, #e6cd8a, #c8a24a55 40%, #0000);
  width: 168px;
  height: 2px;
  position: absolute;
  top: 0;
  left: 42px;
}

.wk-hero-copy {
  min-width: 0;
  z-index: 1;
  position: relative;
}

.wk-eyebrow {
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #d2b77b;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
}

.wk-eyebrow-icon {
  color: #d2b77b;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
}

.wk-eyebrow-icon svg {
  width: 100%;
  height: 100%;
}

.wk-hero h1 {
  font-family: var(--font-display);
  letter-spacing: -.8px;
  color: #f1ece1;
  margin-top: 20px;
  font-size: clamp(30px, 3.6vw, 45px);
  font-weight: 400;
  line-height: 1.2;
}

.wk-hero h1 em {
  background: linear-gradient(96deg, #f4e4b4, #c8a24a 70%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  padding-bottom: .09em;
  margin-bottom: -.09em;
  font-style: normal;
}

.wk-lead {
  color: #b4afa6;
  max-width: 540px;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.9;
}

.wk-hero-tags {
  color: #c6c0b4;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px;
  font-size: 11px;
  display: flex;
}

.wk-hero-tags span {
  align-items: center;
  gap: 8px;
  border: 1px solid #ffffff0f;
  background: #ffffff05;
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  display: flex;
}

.wk-hero-tags svg {
  color: #bea05b;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.wk-art {
  min-width: 0;
  z-index: 1;
  position: relative;
}

.wk-art > svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero artwork motion */
.wk-spin-slow {
  transform-origin: 300px 152px;
  animation: 96s linear infinite wk-spin;
}

.wk-spin-rev {
  transform-origin: 300px 152px;
  animation: 68s linear infinite wk-spin-reverse;
}

.wk-spin-beam {
  transform-origin: 300px 152px;
  animation: 12s linear infinite wk-spin;
}

.wk-float {
  transform-origin: 300px 152px;
  animation: 8s ease-in-out infinite wk-float;
}

.wk-seal-dial {
  transform-origin: 300px 152px;
  animation: 24s linear infinite wk-spin-reverse;
}

.wk-ping circle:last-child {
  transform-origin: center;
  transform-box: fill-box;
  animation: wk-ping 4.8s ease-out infinite;
}

.wk-ping-b circle:last-child {
  animation-delay: -1.6s;
}

.wk-ping-c circle:last-child {
  animation-delay: -3.2s;
}

.wk-march {
  animation: wk-march 12s linear infinite;
}

.wk-compass {
  transform-origin: 88px 272px;
  animation: 30s linear infinite wk-spin-reverse;
}

.wk-scan {
  animation: wk-scan 9s ease-in-out infinite;
}

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

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

@keyframes wk-float {
  50% {
    transform: translateY(-7px);
  }
}

@keyframes wk-ping {
  0% {
    opacity: .85;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(4.4);
  }
}

@keyframes wk-march {
  to {
    stroke-dashoffset: -136;
  }
}

@keyframes wk-scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  14%,
  84% {
    opacity: .18;
  }

  100% {
    transform: translateY(216px);
    opacity: 0;
  }
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */

.wk-toolbar {
  border: 1px solid #ffffff0f;
  background: linear-gradient(120deg, #ffffff04, #0000 60%), #101014;
  border-radius: 13px;
  margin: 26px 0 0;
  padding: 16px 18px;
  box-shadow: 0 18px 40px -34px #000, inset 0 1px #ffffff06;
}

.wk-search {
  border: 1px solid #ffffff14;
  background: #0a0a0d;
  border-radius: 9px;
  position: relative;
  display: flex;
  align-items: center;
}

.wk-search:focus-within {
  border-color: #d9b65c99;
  box-shadow: 0 0 24px -8px #d9b65c66;
}

.wk-search-icon {
  color: #7d7669;
  left: 13px;
  width: 17px;
  height: 17px;
  position: absolute;
  display: inline-flex;
  pointer-events: none;
}

.wk-search-icon svg {
  width: 100%;
  height: 100%;
}

.wk-search input {
  background: transparent;
  border: 0;
  color: #efe9dc;
  outline: none;
  padding: 11px 42px 11px 40px;
  width: 100%;
  font-size: 13.5px;
}

.wk-search input::placeholder {
  color: #6f6a61;
}

.wk-search input::-webkit-search-cancel-button {
  display: none;
}

.wk-search-clear {
  background: transparent;
  border: 0;
  color: #7d7669;
  cursor: pointer;
  right: 8px;
  padding: 6px;
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  transition: color .18s ease, background-color .18s ease;
}

.wk-search-clear svg {
  width: 100%;
  height: 100%;
}

.wk-search-clear:hover {
  color: #e6cd8a;
  background: #ffffff0d;
}

.wk-chips {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  display: flex;
}

.wk-chip {
  border: 1px solid #ffffff12;
  background: #ffffff05;
  color: #b8b2a6;
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  font-size: 11.5px;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}

.wk-chip svg {
  color: #857e71;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  transition: color .2s ease;
}

.wk-chip:hover {
  border-color: #c8a24a59;
  color: #e6cd8a;
  transform: translateY(-1px);
}

.wk-chip:hover svg {
  color: #d2b77b;
}

.wk-chip.is-active {
  border-color: #c8a24a80;
  background: #c8a24a1f;
  color: #f0e2bb;
  box-shadow: 0 0 18px -10px #c8a24a;
}

.wk-chip.is-active svg {
  color: #e6cd8a;
}

.wk-chip-count {
  font-family: var(--font-mono);
  color: #7f7869;
  border: 1px solid #ffffff10;
  background: #00000038;
  border-radius: 5px;
  padding: 0 5px;
  min-width: 22px;
  text-align: center;
  font-size: 10px;
}

.wk-chip.is-active .wk-chip-count {
  border-color: #c8a24a4d;
  color: #e6cd8a;
}

.wk-toolbar-side {
  border-top: 1px solid #ffffff0a;
  margin-top: 14px;
  padding-top: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  display: flex;
}

.wk-result {
  color: #9a9389;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
}

.wk-toolbar-buttons {
  gap: 8px;
  display: flex;
}

.wk-mini {
  border: 1px solid #ffffff12;
  background: transparent;
  color: #9a9389;
  cursor: pointer;
  border-radius: 7px;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  transition: border-color .2s ease, color .2s ease;
}

.wk-mini svg {
  width: 13px;
  height: 13px;
}

.wk-mini:hover {
  border-color: #c8a24a59;
  color: #e6cd8a;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.wk-layout {
  grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr);
  gap: 40px;
  margin: 34px 0 0;
  display: grid;
}

.wk-aside {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 92px;
}

.wk-aside-block {
  border: 1px solid #ffffff0f;
  background: linear-gradient(150deg, #ffffff05, #0000 70%), #0d0d11;
  border-radius: 13px;
  padding: 17px 16px 15px;
  box-shadow: 0 18px 40px -34px #000, inset 0 1px #ffffff06;
}

.wk-assure {
  margin-top: 16px;
}

.wk-section-label {
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: #8b8478;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 9.5px;
  font-weight: 600;
  display: flex;
}

.wk-section-label span {
  color: #d2b77b;
  border: 1px solid #c8a24a3d;
  background: #c8a24a14;
  border-radius: 5px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
}

.wk-jump {
  gap: 2px;
  display: grid;
}

.wk-jump-link {
  border: 1px solid transparent;
  border-radius: 9px;
  color: #b4afa6;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 10px;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.wk-jump-link:hover {
  border-color: #ffffff14;
  background: #ffffff05;
  color: #e8e1d3;
}

.wk-jump-link.is-active {
  border-color: #c8a24a59;
  background: #c8a24a14;
  box-shadow: 0 0 24px -14px #c8a24a;
}

.wk-jump-icon {
  color: #857e71;
  border: 1px solid #ffffff10;
  background: #ffffff05;
  border-radius: 7px;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  transition: color .2s ease, border-color .2s ease;
}

.wk-jump-icon svg {
  width: 15px;
  height: 15px;
}

.wk-jump-link:hover .wk-jump-icon,
.wk-jump-link.is-active .wk-jump-icon {
  color: #e6cd8a;
  border-color: #c8a24a4d;
}

.wk-jump-copy {
  min-width: 0;
  flex: 1;
}

.wk-jump-copy strong {
  color: #ded7c8;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3px;
  display: block;
}

.wk-jump-copy > span {
  color: #857e71;
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.55;
  display: block;
}

.wk-jump-count {
  color: #7f7869;
  font-family: var(--font-mono);
  font-size: 10px;
  margin-top: 3px;
}

.wk-assure-list {
  color: #a8a296;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 11.5px;
  line-height: 1.65;
}

.wk-assure-list li {
  align-items: flex-start;
  gap: 10px;
  display: flex;
}

.wk-assure-list li > span {
  color: #c2a45f;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  display: inline-flex;
}

.wk-assure-list svg {
  width: 100%;
  height: 100%;
}

.wk-aside-link {
  color: #d2b77b;
  border-top: 1px solid #ffffff0a;
  margin-top: 15px;
  padding-top: 12px;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  text-decoration: none;
  display: flex;
}

.wk-aside-link svg {
  width: 14px;
  height: 14px;
  transition: transform .2s ease;
}

.wk-aside-link:hover svg {
  transform: translateX(3px);
}

/* ── Chapters ────────────────────────────────────────────────────────────── */

/* min-width:0 keeps the wide reference tables from blowing out the grid track. */
.wk-main {
  min-width: 0;
}

.wk-group {
  margin-bottom: 40px;
}

.wk-group-head {
  border-bottom: 1px solid var(--wk-border);
  margin-bottom: 16px;
  padding-bottom: 14px;
  align-items: center;
  gap: 14px;
  display: flex;
}

.wk-group-index {
  color: #6f6a61;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: -1px;
  line-height: 1;
}

.wk-group-icon {
  color: #c2a45f;
  border: 1px solid #c8a24a38;
  background: radial-gradient(120% 120% at 50% -20%, #c8a24a1f, #0000 62%), linear-gradient(180deg, #17171d, #0d0d11);
  border-radius: 10px;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px #ffffff08;
}

.wk-group-icon svg {
  width: 20px;
  height: 20px;
}

.wk-group-copy {
  min-width: 0;
  flex: 1;
}

.wk-group-copy h2 {
  color: #efe9dc;
  font-family: var(--font-display);
  letter-spacing: -.2px;
  margin: 0;
  font-size: 19px;
  font-weight: 400;
}

.wk-group-copy p {
  color: #918a7e;
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
}

.wk-group-count {
  color: #857e71;
  border: 1px solid #ffffff10;
  background: #ffffff05;
  border-radius: 999px;
  padding: 4px 11px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
}

.wk-group.is-filtered {
  display: none;
}

/* ── Entries ─────────────────────────────────────────────────────────────── */

.wk-item {
  border: 1px solid #ffffff0f;
  background: linear-gradient(160deg, #ffffff05, #0000 72%), #0c0c10;
  border-radius: 12px;
  margin-bottom: 9px;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.wk-item:hover {
  border-color: #ffffff1c;
}

.wk-item.is-open {
  border-color: #c8a24a47;
  box-shadow: 0 0 34px -22px #c8a24a, inset 0 1px #ffffff08;
}

.wk-item.is-filtered {
  display: none;
}

.wk-item-heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.wk-item-btn {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  text-align: left;
  display: flex;
}

.wk-item-index {
  color: #6b655c;
  font-family: var(--font-mono);
  font-size: 10px;
  flex-shrink: 0;
  letter-spacing: .5px;
}

.wk-item.is-open .wk-item-index {
  color: #c2a45f;
}

.wk-item-icon {
  color: #857e71;
  border: 1px solid #ffffff10;
  background: #ffffff05;
  border-radius: 8px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}

.wk-item-icon svg {
  width: 17px;
  height: 17px;
}

.wk-item:hover .wk-item-icon {
  color: #d2b77b;
  border-color: #c8a24a38;
}

.wk-item.is-open .wk-item-icon {
  color: #e6cd8a;
  border-color: #c8a24a59;
  background: #c8a24a17;
}

.wk-item-text {
  min-width: 0;
  flex: 1;
}

.wk-item-text strong {
  color: #e6e0d2;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .2px;
  display: block;
}

.wk-item-text > span {
  color: #7f7869;
  margin-top: 3px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.wk-item-toggle {
  color: #8b8478;
  border: 1px solid #ffffff12;
  background: #ffffff05;
  border-radius: 7px;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  transition: transform .3s cubic-bezier(.22, .7, .28, 1), color .25s ease, border-color .25s ease;
}

.wk-item-toggle svg {
  width: 14px;
  height: 14px;
}

.wk-item.is-open .wk-item-toggle {
  transform: rotate(135deg);
  color: #e6cd8a;
  border-color: #c8a24a59;
}

.wk-item-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.22, .7, .28, 1);
}

.wk-item.is-open .wk-item-wrap {
  grid-template-rows: 1fr;
}

.wk-item-body {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear .45s;
}

.wk-item.is-open .wk-item-body {
  visibility: visible;
  transition-delay: 0s;
}

.wk-item-inner {
  border-top: 1px solid #ffffff0a;
  padding: 4px 15px 18px 15px;
}

.wk-item-rule {
  background: linear-gradient(90deg, #c8a24a, #c8a24a00);
  height: 1px;
  width: 62px;
  margin: 16px 0 4px;
  display: block;
}

.wk-item-inner > p {
  color: #b0aa9f;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.85;
}

.wk-item-inner > p:first-of-type {
  margin-top: 10px;
}

/* ── Faction dossiers ────────────────────────────────────────────────────── */

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

.wk-faction {
  --wk-tint: #c8a24a;
  border: 1px solid #ffffff0f;
  background:
    radial-gradient(130% 100% at 50% -18%, color-mix(in srgb, var(--wk-tint) 15%, transparent), #0000 62%),
    linear-gradient(170deg, #101015, #0a0a0e);
  border-radius: 12px;
  padding: 15px 15px 13px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.wk-faction::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, #0000, var(--wk-tint), #0000);
  opacity: .8;
}

.wk-faction:hover {
  border-color: color-mix(in srgb, var(--wk-tint) 45%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -30px color-mix(in srgb, var(--wk-tint) 55%, transparent);
}

.wk-faction-crest {
  color: var(--wk-tint);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--wk-tint) 30%, transparent));
  transition: filter .35s ease, transform .5s ease;
  display: block;
}

.wk-faction:hover .wk-faction-crest {
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--wk-tint) 48%, transparent));
  transform: translateY(-2px) scale(1.02);
}

.wk-faction-crest > svg {
  height: 62px;
  width: auto;
  display: block;
}

.wk-crest-shield {
  fill: #ffffff06;
  stroke: var(--wk-tint);
  stroke-opacity: .8;
  stroke-width: 1.4;
}

.wk-crest-rim {
  fill: none;
  stroke: var(--wk-tint);
  stroke-opacity: .3;
  stroke-width: 1;
}

.wk-crest-ring {
  fill: none;
  stroke: var(--wk-tint);
  stroke-opacity: .5;
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-spin 40s linear infinite;
}

.wk-crest-chevron {
  fill: color-mix(in srgb, var(--wk-tint) 22%, transparent);
  stroke: var(--wk-tint);
  stroke-width: 1.2;
}

.wk-crest-star {
  fill: color-mix(in srgb, var(--wk-tint) 70%, transparent);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-crest-pulse 3.4s ease-in-out infinite;
}

.wk-crest-bar {
  stroke: var(--wk-tint);
  stroke-opacity: .28;
  stroke-width: 1;
}

@keyframes wk-crest-pulse {
  0%,
  100% {
    opacity: .55;
    transform: scale(.88);
  }

  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.wk-faction-head {
  margin-top: 6px;
}

.wk-faction-head h4 {
  color: #efe9dc;
  font-family: var(--font-display);
  letter-spacing: -.1px;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

.wk-faction-pop {
  color: #918a7e;
  margin: 5px 0 0;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  display: flex;
}

.wk-faction-pop svg {
  color: var(--wk-tint);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.wk-faction-summary {
  color: #9d968a;
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.65;
}

.wk-faction-bonuses {
  border-top: 1px solid #ffffff0d;
  gap: 5px 14px;
  margin: 12px 0 0;
  padding: 11px 0 0;
  list-style: none;
}

.wk-faction-bonuses li {
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  display: flex;
}

.wk-faction-bonuses span {
  color: #7f7869;
  font-size: 10.5px;
}

.wk-faction-bonuses strong {
  color: var(--wk-tint);
  font-family: var(--font-mono);
  white-space: nowrap;
  font-size: 11.5px;
}

.wk-faction-roster {
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.wk-faction-roster li {
  border: 1px solid #ffffff0a;
  background: #ffffff04;
  border-radius: 7px;
  color: #b8b2a6;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  font-size: 11px;
}

.wk-faction-roster svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.wk-faction-roster li.is-field svg {
  color: #8a9a6a;
}

.wk-faction-roster li.is-brass svg {
  color: #d9b65c;
}

.wk-faction-roster li.is-rust svg {
  color: #cd7d4c;
}

.wk-faction-roster li span,
.wk-faction-roster li button {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Roster entries open the dossier in the codex modal. */
.wk-faction-roster li button {
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .15s ease;
}

.wk-faction-roster li button:hover {
  color: #e6cd8a;
}

.wk-faction-roster li em {
  color: #6f6a61;
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* ── Meters ──────────────────────────────────────────────────────────────── */

.wk-meters {
  border: 1px solid #ffffff0f;
  background: #ffffff04;
  border-radius: 11px;
  margin-top: 18px;
  padding: 14px 15px 15px;
}

.wk-meters-caption {
  color: #a8a296;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 11px;
  display: flex;
}

.wk-meters-caption svg {
  color: #c2a45f;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.wk-meter {
  grid-template-columns: minmax(84px, 168px) minmax(0, 1fr) 74px;
  align-items: center;
  gap: 12px;
  padding: 3px 0;
  display: grid;
}

.wk-meter-label {
  color: #a8a296;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-meter-track {
  background: #07070a;
  border-radius: 999px;
  height: 6px;
  box-shadow: inset 0 1px 2px #000000b3;
  position: relative;
  overflow: hidden;
}

.wk-meter-fill {
  background: linear-gradient(90deg, #c8a24a4d, #d9b65c);
  border-radius: 999px;
  transform-origin: left center;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--wk-ratio, 0));
  animation: wk-meter-grow 1s cubic-bezier(.22, .7, .28, 1) both;
  display: block;
}

.wk-meter-fill.is-field {
  background: linear-gradient(90deg, #6d7c5059, #8a9a6a);
}

.wk-meter-fill.is-rust {
  background: linear-gradient(90deg, #934a2459, #cd7d4c);
}

@keyframes wk-meter-grow {
  from {
    transform: scaleX(0);
  }
}

.wk-meter-value {
  color: #ded7c8;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

/* ── Reference tables ────────────────────────────────────────────────────── */

.wk-figure {
  border: 1px solid #ffffff0f;
  background: linear-gradient(160deg, #ffffff05, #0000 70%), #0a0a0e;
  border-radius: 12px;
  margin: 18px 0 0;
  padding: 13px 14px 14px;
}

.wk-figure-cap {
  color: #918a7e;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
}

.wk-figure-cap > svg {
  color: #c2a45f;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.wk-figure-hint {
  color: #6f6a61;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  display: inline-flex;
}

.wk-figure-hint svg {
  width: 14px;
  height: 14px;
}

.wk-table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8a24a4d transparent;
}

.wk-table-scroll::-webkit-scrollbar {
  height: 8px;
}

.wk-table-scroll::-webkit-scrollbar-track {
  background: #ffffff06;
  border-radius: 999px;
}

.wk-table-scroll::-webkit-scrollbar-thumb {
  background: #c8a24a40;
  border-radius: 999px;
}

.wk-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #c8a24a73;
}

.wk-table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 11.5px;
}

.wk-figure.is-scrollable .wk-table {
  min-width: 640px;
}

.wk-table thead th {
  color: #8b8478;
  border-bottom: 1px solid var(--wk-border);
  background: #ffffff05;
  padding: 7px 10px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}

.wk-table tbody th {
  color: #e6e0d2;
  font-weight: 500;
  text-align: left;
  position: relative;
}

.wk-table tbody th::before {
  content: "";
  background: var(--wk-tint, #c8a24a);
  border-radius: 0 999px 999px 0;
  width: 2px;
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  opacity: .75;
}

.wk-table td {
  color: #a8a296;
  font-family: var(--font-mono);
}

/* Row name opens the unit/building dossier in the codex modal. */
.wk-table tbody th button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px dotted #c8a24a59;
  transition: color .15s ease, border-color .15s ease;
}

.wk-art-thumb {
  display: block;
  flex: none;
  width: 72px;
  height: 48px;
  object-fit: contain;
  border: 1px solid #c8a24a40;
  border-radius: 6px;
  background: #14141a;
}

.wk-faction-roster li button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-faction-roster li button span {
  white-space: normal;
}

.wk-table tbody th button:hover {
  color: #e6cd8a;
  border-color: #d9b65c;
}

.wk-table tbody tr {
  transition: background-color .18s ease;
}

.wk-table tbody tr:nth-child(even) {
  background: #ffffff04;
}

.wk-table tbody tr:hover {
  background: #c8a24a12;
}

.wk-table tbody td,
.wk-table tbody th {
  border-bottom: 1px solid #ffffff08;
  padding: 7px 10px;
}

.wk-table tbody tr:last-child td,
.wk-table tbody tr:last-child th {
  border-bottom: 0;
}

.wk-table .is-r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wk-table .is-c {
  text-align: center;
}

.wk-table .is-l {
  text-align: left;
}

/* Keep the first column readable while the rest scrolls past it. */
.wk-figure.is-scrollable .wk-table tbody th {
  position: sticky;
  left: 0;
  background: #0d0d11;
  box-shadow: 1px 0 0 #ffffff0f;
}

.wk-figure.is-scrollable .wk-table tbody tr:nth-child(even) th {
  background: #0f0f13;
}

.wk-figure.is-scrollable .wk-table tbody tr:hover th {
  background: #141419;
}

/* ── Facts, callouts and links ───────────────────────────────────────────── */

.wk-facts {
  border: 1px solid #ffffff0f;
  background: #ffffff04;
  border-radius: 11px;
  gap: 1px 0;
  margin: 18px 0 0;
  padding: 0;
  overflow: hidden;
  display: grid;
}

.wk-fact {
  border-bottom: 1px solid #ffffff08;
  align-items: baseline;
  gap: 14px;
  padding: 8px 14px;
  display: flex;
}

.wk-fact:last-child {
  border-bottom: 0;
}

.wk-fact dt {
  color: #7f7869;
  flex-shrink: 0;
  min-width: 190px;
  font-size: 11px;
}

.wk-fact dd {
  color: #ded7c8;
  margin: 0;
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.6;
}

.wk-callout {
  --wk-callout: #c8a24a;
  border: 1px solid color-mix(in srgb, var(--wk-callout) 32%, transparent);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--wk-callout) 12%, transparent), #0000 62%),
    #ffffff04;
  border-radius: 11px;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  display: flex;
}

.wk-callout.is-field {
  --wk-callout: #8a9a6a;
}

.wk-callout.is-rust {
  --wk-callout: #cd7d4c;
}

.wk-callout-icon {
  color: var(--wk-callout);
  border: 1px solid color-mix(in srgb, var(--wk-callout) 38%, transparent);
  background: color-mix(in srgb, var(--wk-callout) 12%, transparent);
  border-radius: 8px;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.wk-callout-icon svg {
  width: 16px;
  height: 16px;
}

.wk-callout strong {
  color: #efe9dc;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .2px;
  display: block;
}

.wk-callout p {
  color: #a8a296;
  margin: 5px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
}

.wk-item-links {
  gap: 10px;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
}

.wk-item-links a {
  color: #d2b77b;
  border: 1px solid #c8a24a3d;
  background: #c8a24a0f;
  border-radius: 8px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 11.5px;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

.wk-item-links svg {
  width: 14px;
  height: 14px;
  transition: transform .2s ease;
}

.wk-item-links a:hover {
  border-color: #c8a24a80;
  background: #c8a24a1c;
  color: #f0e2bb;
  transform: translateY(-1px);
}

.wk-item-links a:hover svg {
  transform: translateX(3px);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.wk-empty {
  border: 1px dashed #ffffff1a;
  background: #ffffff03;
  border-radius: 13px;
  padding: 44px 24px;
  text-align: center;
}

.wk-empty-icon {
  color: #6f6a61;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  display: block;
}

.wk-empty-icon svg {
  width: 100%;
  height: 100%;
}

.wk-empty h2 {
  color: #e6e0d2;
  font-family: var(--font-display);
  margin: 16px 0 0;
  font-size: 19px;
  font-weight: 400;
}

.wk-empty p {
  color: #918a7e;
  margin: 8px 0 0;
  font-size: 12.5px;
}

.wk-empty strong {
  color: #d2b77b;
}

.wk-empty-btn {
  border: 1px solid #c8a24a4d;
  background: #c8a24a14;
  color: #e6cd8a;
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  font-size: 11.5px;
  transition: border-color .2s ease, background-color .2s ease;
}

.wk-empty-btn svg {
  width: 14px;
  height: 14px;
}

.wk-empty-btn:hover {
  border-color: #c8a24a80;
  background: #c8a24a24;
}

/* ── Closing dispatch ────────────────────────────────────────────────────── */

.wk-cta {
  border: 1px solid var(--wk-border);
  background: radial-gradient(at 14% 52%, #c8a24a0d, #0000 58%), linear-gradient(118deg, #14141a, #0a0a0e);
  border-radius: 16px;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  margin-top: 44px;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  display: grid;
  box-shadow: 0 22px 70px -42px #000, inset 0 1px #ffffff08;
}

.wk-cta-art > svg {
  width: 100%;
  height: auto;
  display: block;
}

.wk-cta-wave {
  transform-origin: 120px 118px;
  animation: wk-cta-breathe 4.6s ease-in-out infinite;
}

.wk-cta-wave-2 {
  animation-delay: .5s;
}

.wk-cta-wave-3 {
  animation-delay: 1s;
}

.wk-cta-mast {
  transform-origin: 120px 168px;
  animation: wk-float 7s ease-in-out infinite;
}

.wk-cta-lamp {
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-lamp 3.2s ease-in-out infinite;
}

.wk-cta-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-halo 3.2s ease-in-out infinite;
}

.wk-cta-page {
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-page-float 6.5s ease-in-out infinite;
}

.wk-cta-seal {
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-spin 26s linear infinite;
}

.wk-cta-seal-dial {
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-spin 26s linear infinite reverse;
}

@keyframes wk-cta-breathe {
  0%,
  100% {
    opacity: .28;
    transform: scale(.94);
  }

  50% {
    opacity: .85;
    transform: scale(1.04);
  }
}

@keyframes wk-lamp {
  0%,
  100% {
    opacity: .45;
    transform: scale(.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes wk-halo {
  0%,
  100% {
    opacity: .5;
    transform: scale(.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes wk-page-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.wk-cta-copy {
  min-width: 0;
}

.wk-cta-copy h2 {
  color: #f1ece1;
  font-family: var(--font-display);
  letter-spacing: -.3px;
  margin: 0;
  font-size: 23px;
  font-weight: 400;
}

.wk-cta-copy > p {
  color: #b0aa9f;
  max-width: 620px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.85;
}

.wk-cta-actions {
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
}

.wk-cta-btn {
  color: #0e0e12;
  background: linear-gradient(180deg, #e8d292 0%, #d9b65c 48%, #b98f35 100%);
  border: 1px solid #c8a24a;
  border-radius: 9px;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
  box-shadow: inset 0 1px #ffffff59, 0 14px 28px -18px #c8a24aa6;
}

.wk-cta-btn svg {
  width: 16px;
  height: 16px;
}

.wk-cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: inset 0 1px #ffffff6b, 0 18px 34px -18px #c8a24ad9;
}

.wk-cta-link {
  color: #d2b77b;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
}

.wk-cta-link svg {
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.wk-cta-link:hover svg {
  transform: translateX(3px);
}

/* ── Foot ────────────────────────────────────────────────────────────────── */

.wk-foot {
  border: 1px solid #ffffff0f;
  background: linear-gradient(140deg, #ffffff04, #0000 70%), #0c0c10;
  border-radius: 13px;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 17px 20px;
  display: flex;
  box-shadow: inset 0 1px #ffffff06;
}

.wk-foot-icon {
  color: #c2a45f;
  border: 1px solid #c8a24a38;
  background: radial-gradient(120% 120% at 50% -20%, #c8a24a1f, #0000 62%), #121218;
  border-radius: 10px;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.wk-foot-icon svg {
  width: 20px;
  height: 20px;
}

.wk-foot p {
  color: #918a7e;
  margin: 0;
  min-width: 0;
  flex: 1;
  font-size: 11.5px;
  line-height: 1.7;
}

.wk-foot strong {
  color: #ded7c8;
  font-weight: 600;
}

.wk-foot a {
  color: #d2b77b;
  text-decoration: none;
  border-bottom: 1px dotted #c8a24a66;
}

.wk-foot a:hover {
  color: #f0e2bb;
  border-bottom-color: #f0e2bb;
}

.wk-foot-link {
  color: #d2b77b !important;
  border: 1px solid #c8a24a3d;
  background: #c8a24a0f;
  border-radius: 9px !important;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 14px;
  white-space: nowrap;
  font-size: 11.5px !important;
  display: inline-flex;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.wk-foot-link svg {
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.wk-foot-link:hover {
  border-color: #c8a24a80;
  background: #c8a24a1c;
  transform: translateY(-1px);
}

.wk-foot-link:hover svg {
  transform: translateX(3px);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (width >= 1400px) {
  .wk-hero {
    padding: 48px 52px 46px;
  }
}

@media (width <= 1180px) {
  .wk-layout {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    gap: 30px;
  }

  .wk-fact {
    flex-direction: column;
    gap: 2px;
  }

  .wk-fact dt {
    min-width: 0;
  }
}

@media (width <= 1024px) {
  .wk-hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 30px 32px;
  }

  .wk-hero-rule {
    left: 30px;
  }

  .wk-hero-backdrop {
    inset: 0 0 auto;
    width: 100%;
    height: clamp(240px, 50vw, 380px);
    opacity: .38;
    -webkit-mask-image: linear-gradient(#000 35%, #0000);
    mask-image: linear-gradient(#000 35%, #0000);
  }

  .wk-art {
    max-width: 460px;
    order: -1;
  }

  .wk-layout {
    grid-template-columns: 1fr;
  }

  .wk-aside {
    position: static;
  }

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

  .wk-cta {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 28px;
  }

  .wk-cta-art {
    max-width: 260px;
  }
}

@media (width <= 760px) {
  .wk-factions {
    grid-template-columns: 1fr;
  }

  .wk-foot {
    flex-wrap: wrap;
  }

  .wk-foot p {
    flex: 1 1 100%;
    order: 3;
  }
}

@media (width <= 620px) {
  .wk-hero {
    padding: 28px 20px 26px;
    border-radius: 14px;
  }

  .wk-hero-rule {
    left: 20px;
  }

  .wk-hero-tags {
    gap: 8px;
  }

  .wk-jump {
    grid-template-columns: 1fr;
  }

  .wk-meter {
    grid-template-columns: minmax(0, 1fr) 68px;
    grid-template-areas: "label value" "track track";
    gap: 4px 10px;
  }

  .wk-meter-label {
    grid-area: label;
  }

  .wk-meter-value {
    grid-area: value;
  }

  .wk-meter-track {
    grid-area: track;
  }

  .wk-toolbar {
    padding: 14px;
  }

  .wk-cta {
    padding: 26px 20px;
  }
}

@media (width <= 420px) {
  .wk-item-btn {
    gap: 10px;
    padding: 12px 12px;
  }

  .wk-item-text > span {
    display: none;
  }

  .wk-group-head {
    gap: 10px;
  }

  .wk-group-index {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wk-page *,
  .wk-page :before,
  .wk-page :after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
