/* Archive dossier + enhanced codex map */

.archive-dossier {
  position: relative;
  z-index: 10;
  margin: 0 auto 48px;
  max-width: 100%;
  padding: 28px 32px 32px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background:
    linear-gradient(165deg, rgba(36, 30, 22, 0.95) 0%, rgba(18, 15, 11, 0.98) 100%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(201, 162, 39, 0.06);
}
.archive-dossier::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(201, 162, 39, 0.12);
  pointer-events: none;
}

.dossier-stamp {
  display: inline-block;
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(107, 40, 48, 0.75);
  border: 2px double rgba(107, 40, 48, 0.45);
  padding: 8px 16px;
  margin-bottom: 18px;
  transform: rotate(-2deg);
}

.dossier-lead {
  font-family: 'IM Fell English', 'EB Garamond', serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 720px;
}

.dossier-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0 0 24px;
  padding: 0;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dossier-stats li::before {
  content: '◆ ';
  color: var(--accent-dim);
  opacity: 0.6;
}

.dossier-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(201, 162, 39, 0.1);
  background: rgba(0, 0, 0, 0.25);
}
.dossier-index-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.dossier-index-item:hover {
  border-color: rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.06);
}
.dossier-cat {
  font-family: 'Special Elite', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
}
.dossier-name {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: #d4c4a8;
}

.node-provenance {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-family: 'Special Elite', monospace;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(201, 162, 39, 0.45);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#map-modal .modal {
  width: min(1080px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
#map-modal .codex-modal {
  overflow: hidden;
}
#map-modal .codex-modal-body {
  padding: 12px 16px 20px;
  max-height: min(78vh, 820px);
  overflow-y: auto;
  overflow-x: hidden;
}
#map-modal #lore-svg {
  width: 100%;
  height: auto;
  display: block;
}

.mob-group-label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}
.mob-group-label.first {
  margin-top: 8px;
}

.dossier-index-tall {
  max-height: 320px;
}

.section.mobs .grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
}

.node-wrap.node-unseal-flash .node {
  animation: node-unseal-pulse 0.65s ease-out;
}
@keyframes node-unseal-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.45); }
  70% { box-shadow: 0 0 28px 4px rgba(201, 162, 39, 0.15); }
  100% { box-shadow: none; }
}

#lore-svg .map-node-group[data-zone="mob"] .lore-node-circle {
  stroke-opacity: 0.85;
}
#lore-svg .lore-link {
  stroke: rgba(201, 162, 39, 0.14);
  stroke-width: 1.2;
}
#lore-svg .lore-link.link-active {
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-opacity: 1;
}
#lore-svg .map-node-group:hover .lore-node-circle {
  filter: brightness(1.15);
  stroke-width: 3;
}
