/* Atmospheric Grain and Vignette */
.film-grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.room-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: radial-gradient(circle at 50% 20%, transparent 25%, rgba(7,6,5,0.45) 65%, rgba(4,3,2,0.96) 100%);
}

/* Master Fixed Header */
header.evidence-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 58px; z-index: 4000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1rem; background: rgba(10, 8, 6, 0.96);
  border-bottom: 1px solid rgba(207, 168, 91, 0.22); backdrop-filter: blur(12px);
}
@media (min-width: 768px) { header.evidence-topbar { padding: 0 1.5rem; } }

.brass-plaque {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px;
  background: linear-gradient(180deg, #2d2015, #140d08);
  border: 1px solid rgba(207, 168, 91, 0.4); border-radius: 2px;
  text-decoration: none; color: var(--paper-cream);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 3px 8px rgba(0,0,0,0.7);
}
.brass-plaque .brand { font-family: var(--font-display); font-weight: 900; font-size: 0.95rem; letter-spacing: 0.18em; }
.brass-plaque .tld { font-family: var(--font-typewriter); font-size: 0.7rem; color: var(--gold-bright); }

.nav-links-master { display: none; gap: 1rem; align-items: center; }
@media (min-width: 1024px) { .nav-links-master { display: flex; } }
.nav-links-master a {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: #a99e8d; transition: color 0.2s;
}
.nav-links-master a:hover, .nav-links-master a.active { color: var(--gold-bright); }

.topbar-tools { display: flex; align-items: center; gap: 8px; }
.tray-pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: rgba(207, 168, 91, 0.12); border: 1px solid var(--gold-brass);
  color: var(--gold-bright); font-family: var(--font-mono); font-size: 0.65rem;
  border-radius: 2px; cursor: pointer; text-transform: uppercase; letter-spacing: 0.06em;
}
.tray-pill-btn:hover { background: var(--gold-brass); color: #110d09; font-weight: 700; }

/* Chapter Ruler */
.chapter-ruler {
  position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%);
  z-index: 4500; display: none; flex-direction: column; gap: 0.8rem;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.15em;
}
@media (min-width: 1200px) { .chapter-ruler { display: flex; } }
.ruler-item {
  display: flex; align-items: center; gap: 8px; color: rgba(207, 168, 91, 0.35);
  text-decoration: none; transition: all 0.2s;
}
.ruler-item.active, .ruler-item:hover { color: var(--gold-bright); transform: translateX(-4px); }
.ruler-tick { width: 12px; height: 1px; background: currentColor; }

/* Footer */
footer.archive-vault-footer {
  background: #040302; border-top: 2px solid #140e0a; padding: 60px 1rem 30px; color: var(--paper-aged);
}
@media (min-width: 768px) { footer.archive-vault-footer { padding: 80px 1.5rem 40px; } }
.footer-drawer-grid {
  max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem 1.5rem;
}
@media (min-width: 600px) { .footer-drawer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-drawer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }
.drawer-header {
  font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.16em;
  color: var(--gold-bright); text-transform: uppercase; margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(207, 168, 91, 0.2); padding-bottom: 4px;
}
.drawer-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.drawer-list a { color: var(--paper-aged); opacity: 0.75; text-decoration: none; font-size: 0.75rem; }
.drawer-list a:hover { opacity: 1; color: var(--gold-bright); }
.vault-creed {
  max-width: 1200px; margin: 2.5rem auto 0; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column;
  gap: 0.5rem; font-family: var(--font-mono); font-size: 0.65rem; color: #63615b;
}
@media (min-width: 768px) { .vault-creed { flex-direction: row; justify-content: space-between; } }