:root {
  --fn-bg: #05050b;
  --fn-panel: rgba(9, 12, 24, 0.92);
  --fn-panel-2: rgba(17, 22, 38, 0.88);
  --fn-cyan: #00f6ff;
  --fn-magenta: #ff2bd6;
  --fn-amber: #ffc857;
  --fn-red: #ff355e;
  --fn-green: #64ff9b;
  --fn-ink: #f4f0df;
  --fn-muted: #a8a2b5;
  --fn-line: rgba(0, 246, 255, 0.28);
  --fn-shadow: 0 0 34px rgba(0, 246, 255, 0.16);
}

body.fn-compendium-page {
  margin: 0;
  color: var(--fn-ink);
  background:
    radial-gradient(circle at top left, rgba(255, 43, 214, 0.16), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(0, 246, 255, 0.14), transparent 30rem),
    linear-gradient(180deg, #05050b, #090914 48%, #030307);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

.fn-compendium-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.035) 0,
      rgba(255,255,255,0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
  opacity: 0.28;
}

.fn-compendium-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.fn-compendium-header {
  border: 1px solid var(--fn-line);
  background: linear-gradient(135deg, rgba(0,246,255,0.08), rgba(255,43,214,0.08)), var(--fn-panel);
  box-shadow: var(--fn-shadow);
  padding: 24px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.fn-compendium-header::after {
  content: "VRIL/W.A.T.C.H. PERSONNEL CROSS-INDEX";
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(0,246,255,0.18);
  font-size: clamp(1.6rem, 5vw, 4.6rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.fn-kicker {
  color: var(--fn-cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}

.fn-compendium-title {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  text-shadow: 0 0 18px rgba(0,246,255,0.32);
  position: relative;
  z-index: 1;
}

.fn-compendium-lead {
  max-width: 780px;
  color: var(--fn-muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.fn-compendium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.fn-subject-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 420px;
  text-decoration: none;
  color: var(--fn-ink);
  border: 1px solid rgba(0,246,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), var(--fn-panel);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0,0,0,0.36);
}

.fn-subject-card:hover {
  border-color: rgba(255,43,214,0.58);
  box-shadow: 0 0 30px rgba(255,43,214,0.14);
  transform: translateY(-1px);
}

.fn-subject-media {
  height: 250px;
  background: #080912;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,246,255,0.2);
}

.fn-subject-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  display: block;
}

.fn-subject-fallback {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fn-line);
  color: var(--fn-cyan);
  font-weight: 900;
  font-size: 2.4rem;
  background: radial-gradient(circle, rgba(0,246,255,0.15), rgba(0,0,0,0.2));
  box-shadow: 0 0 34px rgba(0,246,255,0.16);
}

.fn-subject-body {
  padding: 16px;
}

.fn-subject-name {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.fn-subject-designation {
  margin-top: 5px;
  color: var(--fn-cyan);
  font-size: 0.82rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fn-subject-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.fn-chip {
  border: 1px solid rgba(255,200,87,0.35);
  color: var(--fn-amber);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  background: rgba(255,200,87,0.06);
}

.fn-subject-notes {
  margin: 0;
  padding-left: 18px;
  color: var(--fn-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.fn-subject-page-card {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 22px;
  border: 1px solid var(--fn-line);
  background: var(--fn-panel);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--fn-shadow);
}

.fn-subject-page-media {
  min-height: 540px;
  border-radius: 16px;
  border: 1px solid rgba(0,246,255,0.24);
  overflow: hidden;
  background: #05060c;
  display: grid;
  place-items: center;
}

.fn-subject-page-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.fn-subject-page-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.fn-redacted-bar {
  display: inline-block;
  background: var(--fn-red);
  color: #180006;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

@media (max-width: 780px) {
  .fn-subject-page-card {
    grid-template-columns: 1fr;
  }

  .fn-subject-page-media {
    min-height: 420px;
  }
}

/* Whodini main card crop/scale correction */
.fn-subject-card[href$="whodini.html"] .fn-subject-media {
  background: #05060c;
}

.fn-subject-card[href$="whodini.html"] .fn-subject-media img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  object-position: center center;
  margin: auto;
  display: block;
}

/* Whodini main card crop correction: show image  20% larger */
.fn-subject-card[href$="whodini.html"] .fn-subject-media img {
  object-fit: contain;
  object-position: center center;
  transform: scale(0.94);
  transform-origin: center center;
  background: #05060c;
}

/* Subject page recovered-media gallery */
.fn-subject-gallery-section {
  margin-top: 22px;
  border: 1px solid var(--fn-line);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)), var(--fn-panel);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--fn-shadow);
}

.fn-subject-gallery-header {
  margin-bottom: 18px;
}

.fn-subject-gallery-title {
  margin: 6px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.fn-subject-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.fn-subject-gallery-item {
  margin: 0;
  border: 1px solid rgba(0,246,255,0.22);
  background: rgba(5, 6, 12, 0.84);
  border-radius: 16px;
  overflow: hidden;
}

.fn-subject-gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center 24%;
  display: block;
  background: #05060c;
}

.fn-subject-gallery-item figcaption {
  padding: 10px 12px;
  color: var(--fn-muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 1px solid rgba(0,246,255,0.18);
}

/* FINAL_COMPENDIUM_IMAGE_OVERRIDES_START */

/* Whodini main grid card: archive-room / wall-angle image correction */
.fn-subject-card.fn-subject-whodini .fn-subject-media {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #05060c !important;
}

.fn-subject-card.fn-subject-whodini .fn-subject-media img {
  width: 112% !important;
  height: 112% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: 25% center !important;
  outline: none !important;
}

/* Helena individual subject page: slide main image right */
.fn-subject-page-media img[src*="helena-vasquez"] {
  object-fit: cover !important;
  object-position: 44% center !important;
}

/* Clara alternate dossier gallery crop: show more top */
.fn-subject-gallery-item img[src*="clara-jenkins__after__hardened-survivor"] {
  object-fit: cover !important;
  object-position: center 10% !important;
}

/* Sarah alternate dossier gallery crop: match Clara-style correction */
.fn-subject-gallery-item img[src*="sarah-mitchell__after__hardened-survivor"] {
  object-fit: cover !important;
  object-position: center 10% !important;
}

/* FINAL_COMPENDIUM_IMAGE_OVERRIDES_END */


/* Structured subject dossier blocks */
.fn-dossier-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.fn-dossier-block {
  border: 1px solid rgba(0,246,255,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(9, 12, 24, 0.9);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
}

.fn-dossier-block h3 {
  margin: 0 0 10px;
  color: var(--fn-cyan);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.fn-dossier-block p,
.fn-dossier-block li {
  color: var(--fn-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.fn-dossier-block ul {
  margin: 0;
  padding-left: 18px;
}

/* WHODINI_INDEX_CARD_DOWN_OVERRIDE_START */
/* Whodini cross-index card: move image down inside card frame */
.fn-compendium-grid .fn-subject-card.fn-subject-whodini .fn-subject-media img,
.fn-compendium-grid .fn-subject-card[data-subject-id="whodini"] .fn-subject-media img {
  position: relative !important;
  top: 34px !important;
  margin-top: 34px !important;
  transform: none !important;
}
/* WHODINI_INDEX_CARD_DOWN_OVERRIDE_END */

/* HELENA_WHODINI_FRESH_RESET_START */

/* Whodini cross-index card: neutral fresh reset */
.fn-compendium-grid .fn-subject-card.fn-subject-whodini .fn-subject-media,
.fn-compendium-grid .fn-subject-card[data-subject-id="whodini"] .fn-subject-media {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #05060c !important;
}

.fn-compendium-grid .fn-subject-card.fn-subject-whodini .fn-subject-media img,
.fn-compendium-grid .fn-subject-card[data-subject-id="whodini"] .fn-subject-media img {
  position: static !important;
  top: auto !important;
  margin: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  outline: none !important;
}

/* Helena individual page main image: neutral fresh reset */
.fn-subject-page-media img[src*="helena-vasquez"] {
  position: static !important;
  top: auto !important;
  margin: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  outline: none !important;
}

/* HELENA_WHODINI_FRESH_RESET_END */

/* HELENA_MAIN_IMAGE_CLEAN_CROP_START */
/* Helena individual subject page: crop shift without black space */
#fnSubjectMedia img[src*="helena-vasquez"] {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  transform: none !important;
  object-fit: cover !important;
  object-position: 2% center !important;
  background: #05060c !important;
}
/* HELENA_MAIN_IMAGE_CLEAN_CROP_END */


/* DOSSIER_LAYOUT_POLISH_START */

/* Make structured dossier data read like actual classified blocks, not a sad spreadsheet. */
.fn-dossier-grid {
  margin-top: 24px;
  align-items: stretch;
}

.fn-dossier-block {
  position: relative;
  overflow: hidden;
}

.fn-dossier-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,246,255,0.08), transparent 34%),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.025) 0,
      rgba(255,255,255,0.025) 1px,
      transparent 1px,
      transparent 5px
    );
  opacity: 0.55;
}

.fn-dossier-block > * {
  position: relative;
  z-index: 1;
}

.fn-dossier-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fn-dossier-block h3::before {
  content: "▣";
  color: var(--fn-amber);
  font-size: 0.78rem;
}

.fn-dossier-block p {
  margin: 0;
}

.fn-dossier-block li + li {
  margin-top: 5px;
}

.fn-subject-gallery-section {
  margin-top: 24px;
}

/* Let the big summary block breathe on wider screens. */
@media (min-width: 920px) {
  .fn-dossier-grid .fn-dossier-block:first-child {
    grid-column: span 2;
  }
}

/* DOSSIER_LAYOUT_POLISH_END */

/* SUBJECT_NAVIGATION_START */

.fn-subject-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(0,246,255,0.22);
  background:
    linear-gradient(90deg, rgba(0,246,255,0.07), rgba(255,43,214,0.05)),
    rgba(5, 6, 12, 0.82);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.fn-subject-top-nav a {
  color: var(--fn-cyan);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(0,246,255,0.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(0,246,255,0.045);
}

.fn-subject-top-nav a:hover {
  color: var(--fn-amber);
  border-color: rgba(255,200,87,0.48);
  background: rgba(255,200,87,0.08);
}

.fn-subject-neighbor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .fn-subject-top-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .fn-subject-neighbor-nav {
    justify-content: flex-start;
  }

  .fn-subject-top-nav a {
    display: inline-flex;
    width: fit-content;
  }
}

/* SUBJECT_NAVIGATION_END */

/* SUBJECT_NAVIGATION_DIRECT_START */

.fn-subject-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(0,246,255,0.22);
  background:
    linear-gradient(90deg, rgba(0,246,255,0.07), rgba(255,43,214,0.05)),
    rgba(5, 6, 12, 0.82);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.fn-subject-top-nav a {
  color: var(--fn-cyan);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(0,246,255,0.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(0,246,255,0.045);
}

.fn-subject-top-nav a:hover {
  color: var(--fn-amber);
  border-color: rgba(255,200,87,0.48);
  background: rgba(255,200,87,0.08);
}

.fn-subject-neighbor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .fn-subject-top-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .fn-subject-neighbor-nav {
    justify-content: flex-start;
  }

  .fn-subject-top-nav a {
    display: inline-flex;
    width: fit-content;
  }
}

/* SUBJECT_NAVIGATION_DIRECT_END */

/* CROSS_INDEX_FILTERS_START */

.fn-compendium-filter-panel {
  margin-top: 22px;
  border: 1px solid rgba(0,246,255,0.24);
  background:
    linear-gradient(90deg, rgba(0,246,255,0.08), rgba(255,43,214,0.045)),
    rgba(5, 6, 12, 0.86);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.fn-compendium-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.fn-compendium-filter-button {
  appearance: none;
  border: 1px solid rgba(0,246,255,0.28);
  background: rgba(0,246,255,0.045);
  color: var(--fn-cyan);
  border-radius: 999px;
  padding: 8px 11px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.fn-compendium-filter-button:hover,
.fn-compendium-filter-button.is-active {
  color: #080812;
  background: var(--fn-amber);
  border-color: rgba(255,200,87,0.78);
  box-shadow: 0 0 20px rgba(255,200,87,0.18);
}

.fn-compendium-filter-count {
  margin-top: 10px;
  color: var(--fn-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fn-category-chip {
  border-color: rgba(255,43,214,0.34);
  color: var(--fn-magenta);
  background: rgba(255,43,214,0.06);
}

/* CROSS_INDEX_FILTERS_END */

/* CROSS_INDEX_SEARCH_START */

.fn-compendium-search-wrap {
  margin-top: 12px;
}

.fn-compendium-search {
  width: 100%;
  border: 1px solid rgba(0,246,255,0.32);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(0,246,255,0.06), rgba(255,43,214,0.04)),
    rgba(3, 4, 10, 0.92);
  color: var(--fn-ink);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.38);
}

.fn-compendium-search::Redacted fragment {
  color: rgba(244,240,223,0.48);
}

.fn-compendium-search:focus {
  border-color: rgba(255,200,87,0.7);
  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.38),
    0 0 22px rgba(255,200,87,0.13);
}

.fn-compendium-empty-state {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,43,214,0.32);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255,43,214,0.055);
  color: var(--fn-muted);
  line-height: 1.5;
}

/* CROSS_INDEX_SEARCH_END */
\n
/* === Compendium faction bios === */
.fn-subject-active-bio {
  margin: 0.65rem 0 0.75rem;
  color: #d9e8ff;
  line-height: 1.55;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.fn-subject-card .fn-subject-active-bio {
  color: #cbd1e8;
  font-size: 0.9rem;
}


/* Clara temporary retirement pending redesign */
.fn-subject-card.fn-subject-clara-jenkins,
[data-subject-id="clara-jenkins"] {
  display: none !important;
}

/* Magnum Beaumont late Book 1 yearbook artifact fit */
.fn-subject-card.fn-subject-magnum-beaumont img,
.fn-subject-card.fn-subject-magnum-beaumont .fn-subject-image img,
.fn-subject-card.fn-subject-magnum-beaumont .fn-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: rgba(0, 0, 0, 0.45);
}

.fn-subject-card.fn-subject-magnum-beaumont .fn-subject-image,
.fn-subject-card.fn-subject-magnum-beaumont .fn-card-image,
.fn-subject-card.fn-subject-magnum-beaumont figure {
  overflow: hidden;
}

/* FN MAGNUM YEARBOOK CARD HARD FIT V2 */
.fn-subject-card.fn-subject-magnum-beaumont {
  --fn-magnum-card-image-max: 210px;
}

.fn-subject-card.fn-subject-magnum-beaumont figure,
.fn-subject-card.fn-subject-magnum-beaumont .fn-subject-image,
.fn-subject-card.fn-subject-magnum-beaumont .fn-card-image,
.fn-subject-card.fn-subject-magnum-beaumont .fn-card-media,
.fn-subject-card.fn-subject-magnum-beaumont .fn-portrait,
.fn-subject-card.fn-subject-magnum-beaumont [class*="image"],
.fn-subject-card.fn-subject-magnum-beaumont [class*="media"] {
  max-height: var(--fn-magnum-card-image-max) !important;
  min-height: 0 !important;
  height: var(--fn-magnum-card-image-max) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.45) !important;
}

.fn-subject-card.fn-subject-magnum-beaumont img {
  width: auto !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: var(--fn-magnum-card-image-max) !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  margin: 0 auto !important;
  display: block !important;
}

/* Living Archive optional entry links: videos, external references, signal files */
.fn-archive-entry-links {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.35rem;
}

.fn-archive-entry-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(180, 125, 255, 0.7);
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.fn-archive-entry-link:hover,
.fn-archive-entry-link:focus {
  filter: brightness(1.2);
}

.fn-archive-entry-link-note {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.78;
}

/* Living Archive optional entry links: videos, external references, signal files */
.fn-archive-entry-links {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.35rem;
}

.fn-archive-entry-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(180, 125, 255, 0.7);
  border-radius: 999px;
  background: rgba(10, 8, 22, 0.55);
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.fn-archive-entry-link:hover,
.fn-archive-entry-link:focus {
  filter: brightness(1.2);
}

.fn-archive-entry-link-note {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.78;
}

/* Living Archive video player */
body.fn-la-video-open {
  overflow: hidden;
}

.fn-la-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.fn-la-video-modal.is-open {
  display: grid;
  place-items: center;
}

.fn-la-video-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(127, 61, 255, 0.22), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(0, 245, 255, 0.16), transparent 40%),
    rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
}

.fn-la-video-shell {
  position: relative;
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid rgba(180, 125, 255, 0.65);
  border-radius: 1rem;
  background: rgba(8, 7, 18, 0.96);
  box-shadow: 0 0 44px rgba(127, 61, 255, 0.35);
  padding: 1rem;
}

.fn-la-video-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.fn-la-video-topbar h2 {
  margin: 0.15rem 0 0;
}

.fn-la-video-close {
  border: 1px solid rgba(180, 125, 255, 0.7);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  cursor: pointer;
}

.fn-la-video-frame-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 245, 255, 0.28);
  background: #000;
}

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

.fn-la-video-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.22;
}

.fn-video-filter-none iframe {
  filter: none;
}

.fn-video-filter-vhs iframe {
  filter: saturate(1.25) contrast(1.18) brightness(0.95) blur(0.35px);
}

.fn-video-filter-vhs .fn-la-video-overlay {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.08) 0px,
      rgba(255,255,255,0.08) 1px,
      transparent 2px,
      transparent 5px
    ),
    linear-gradient(90deg, rgba(255,0,80,0.12), rgba(0,255,255,0.1));
}

.fn-video-filter-8mm iframe {
  filter: sepia(0.52) contrast(1.25) saturate(0.82) brightness(1.05) blur(0.25px);
}

.fn-video-filter-8mm .fn-la-video-overlay {
  background:
    radial-gradient(circle at center, transparent 52%, rgba(0,0,0,0.52)),
    repeating-radial-gradient(circle, rgba(255,255,255,0.05) 0 1px, transparent 1px 5px);
  opacity: 0.32;
}

.fn-video-filter-crt iframe {
  filter: contrast(1.25) saturate(1.35) brightness(0.92);
}

.fn-video-filter-crt .fn-la-video-overlay {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 255, 255, 0.13) 0px,
      rgba(0, 255, 255, 0.13) 1px,
      rgba(0, 0, 0, 0.12) 2px,
      rgba(0, 0, 0, 0.12) 4px
    );
  opacity: 0.36;
}

.fn-video-filter-damage iframe {
  filter: contrast(1.45) saturate(1.75) hue-rotate(8deg) brightness(0.9) blur(0.55px);
}

.fn-video-filter-damage .fn-la-video-overlay {
  background:
    linear-gradient(90deg, rgba(255,0,120,0.18), transparent 20%, rgba(0,255,255,0.18) 75%),
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 8px,
      rgba(255,255,255,0.12) 9px,
      transparent 11px
    );
  opacity: 0.45;
}

.fn-la-video-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.fn-la-video-controls button {
  border: 1px solid rgba(180, 125, 255, 0.58);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(255,255,255,0.04);
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.fn-la-video-controls button.is-active {
  border-color: rgba(0, 245, 255, 0.8);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.22);
}

.fn-la-video-note,
.fn-la-video-fallback {
  font-size: 0.82rem;
  opacity: 0.82;
}

.fn-la-video-fallback a {
  color: inherit;
}

/* Living Archive clickable cards */
.fn-archive-clickable-card {
  cursor: pointer;
}

.fn-archive-clickable-card:hover,
.fn-archive-clickable-card:focus {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.fn-archive-open-file-button {
  font-weight: 700;
}

/* Living Archive full lore-page images */
.fn-archive-entry-page-media {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 0.65rem;
}

.fn-archive-entry-page-media img {
  width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 0.75rem;
}

.fn-archive-full-image-link {
  width: fit-content;
}

/* HARD FIX: Living Archive clickable cards */
.fn-archive-clickable-card {
  cursor: pointer !important;
  position: relative;
}

.fn-archive-clickable-card:hover,
.fn-archive-clickable-card:focus {
  filter: brightness(1.08) !important;
  transform: translateY(-1px);
}

.fn-archive-entry-links {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.35rem;
}

.fn-archive-entry-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(180, 125, 255, 0.7);
  border-radius: 999px;
  background: rgba(10, 8, 22, 0.55);
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

/* HARD FIX: full lore page images must not crop */
.fn-archive-full-media {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  gap: 0.75rem !important;
  margin: 0 0 1rem !important;
}

.fn-archive-full-media img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 0.85rem !important;
}

/* Shared Living Archive page shell cleanup */
.fn-compendium-body {
  min-height: 100vh;
}

.fn-compendium-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.fn-compendium-shell > .fn-kicker:first-child {
  margin-bottom: 0.35rem;
}

.fn-archive-page-intro {
  max-width: 780px;
  margin: 0.5rem 0 1.4rem;
  opacity: 0.86;
}

.fn-dossier-grid,
#fnBestiaryGrid,
#fnOcculTekGrid,
#fnCompendiumGrid,
#fnArchiveGrid {
  align-items: start;
}

.fn-archive-entry-card h3 {
  margin-top: 0.35rem;
}

.fn-archive-lock-note {
  font-size: 0.78rem;
  opacity: 0.78;
}

.fn-subject-meta {
  margin-top: 0.5rem;
}

.fn-chip {
  line-height: 1.2;
}

/* World Control Index lore/detail cleanup */
.fn-world-control-lore-preview {
  margin-top: 0.7rem;
  opacity: 0.84;
}

.fn-world-control-lore-link {
  margin-top: 0.6rem;
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
}

/* World Control card cleanup + artifact viewer lore */
.fn-world-control-card-teaser {
  opacity: 0.86;
}

.fn-world-control-lore-link {
  margin-top: 0.65rem;
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
}

.fn-world-control-artifact-lore-panel {
  width: min(1180px, calc(100vw - 2rem));
  margin: 1.25rem auto 4rem;
}

.fn-world-control-artifact-lore-panel h2 {
  margin-top: 0.25rem;
}

/* RECOVERED DOSSIER world-control polish */
.fn-world-control-artifact-lore-panel {
  width: min(1180px, calc(100vw - 2rem));
  margin: 1.25rem auto 4rem;
  padding: 1.1rem;
  border: 1px solid rgba(0, 245, 255, 0.45);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(5, 10, 22, 0.96), rgba(7, 8, 18, 0.98));
  box-shadow: 0 0 28px rgba(0, 245, 255, 0.12);
}

.fn-world-control-artifact-lore-panel h2 {
  margin: 0.2rem 0 0.75rem;
  letter-spacing: 0.04em;
}

.fn-world-control-artifact-lore-panel p {
  max-width: 78ch;
}

.fn-world-control-dossier-tags,
.fn-world-control-artifact-lore-panel .fn-subject-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.fn-world-control-dossier-tags .fn-chip,
.fn-world-control-artifact-lore-panel .fn-chip {
  display: inline-flex;
  width: fit-content;
  margin: 0;
}

/* World Control combined dossier image viewer */
.fn-wci-dossier-image-panel {
  width: min(1180px, calc(100vw - 2rem));
  margin: 1.25rem auto;
  display: grid;
  gap: 0.85rem;
}

.fn-wci-dossier-image-panel h1 {
  margin: 0;
  letter-spacing: 0.04em;
}

.fn-wci-dossier-zoom-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fn-wci-dossier-zoom-controls button {
  border: 1px solid rgba(0, 245, 255, 0.55);
  border-radius: 999px;
  background: rgba(5, 10, 22, 0.78);
  color: inherit;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.fn-wci-dossier-zoom-controls button.is-active {
  border-color: rgba(255, 220, 120, 0.9);
  box-shadow: 0 0 18px rgba(255, 220, 120, 0.22);
}

.fn-wci-dossier-image-scroll {
  width: 100%;
  overflow: auto;
  max-height: 82vh;
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.45);
}

.fn-wci-dossier-image {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  transform-origin: top left;
}

.fn-wci-dossier-image-note {
  margin: 0;
  opacity: 0.78;
  font-size: 0.82rem;
}

/* HARD FIX: World Control dossier zoom must visibly expand */
.fn-wci-dossier-image-scroll {
  overflow: auto !important;
}

.fn-wci-dossier-image {
  display: block !important;
  max-width: none !important;
  height: auto !important;
  object-fit: contain !important;
}
