:root {
  --bg: #06060a;
  --card: #0a0c14;
  --accent: #c41e3a;
  --accent-glow: #ff2d55;
  --muted: #6b7280;
  --text: #c9cdd4;
  --border: rgba(196, 30, 58, 0.15);
  color-scheme: dark;
  scroll-behavior: smooth;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  z-index: 10000;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(196, 30, 58, 0.4);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10001;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}

/* Page transition */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes headerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
main, .page-content {
  animation: pageIn 0.4s ease-out;
}
.site-header {
  animation: headerIn 0.3s ease-out;
}

/* Page leave transition */
body.page-leaving {
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
body {
  transition: opacity 0.18s ease-in;
}

/* Scroll-reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover glow — deeper shadow, unsettling red pulse */
.card {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  border-color: rgba(196, 30, 58, 0.3);
  box-shadow: 0 8px 32px rgba(2, 2, 8, 0.8), 0 0 24px rgba(196, 30, 58, 0.1);
  transform: translateY(-2px);
}

/* Unsettling cursor — very rare red crosshair flicker */
@keyframes horror-cursor {
  0%, 99.7% { cursor: default; }
  99.8%, 99.9% { cursor: crosshair; }
}

/* Hero breathing — slow, almost imperceptible */
@keyframes hero-breathe {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 40px rgba(196, 30, 58, 0.08); }
}
.hero h1, .hero h2 {
  animation: hero-breathe 8s ease-in-out infinite;
}

/* Ambient background pulse — the void breathes */
@keyframes ambient-pulse {
  0%, 96%, 100% { background-color: var(--bg); }
  98% { background-color: #07070c; }
}
body {
  animation: ambient-pulse 90s infinite, horror-cursor 120s infinite;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 9998;
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 32px 20px 24px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.02), transparent);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #9b59b6, #8e44ad, #d4a574, #9ca3af, #60a5fa, #c41e3a);
  opacity: 0.6;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.footer-brand h3 span {
  color: var(--accent-glow);
}

.footer-signal {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  margin: 6px 0 0;
  max-width: 320px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-glow);
}

.footer-era {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
  letter-spacing: 0.5px;
}

/* Footer signal status */
.footer-signal-status {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.signal-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: signal-pulse 2s ease-in-out infinite, signal-double-pulse 30s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 4px;
}
/* Rare double-pulse — the signal stutters */
@keyframes signal-double-pulse {
  0%, 94%, 100% { opacity: 1; }
  95% { opacity: 0.2; }
  96% { opacity: 1; }
  97% { opacity: 0.3; }
  98% { opacity: 1; }
}
.signal-time {
  color: var(--accent-glow);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-signal {
    max-width: 100%;
  }
}

* { box-sizing: border-box; }

/* Themed text selection */
::selection {
  background: rgba(196, 30, 58, 0.35);
  color: #fff;
}
::-moz-selection {
  background: rgba(196, 30, 58, 0.35);
  color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(196, 30, 58, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 30, 58, 0.5);
}
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 30, 58, 0.3) var(--bg);
}

body {
  font-family: Inter, Segoe UI, system-ui, Arial, sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #040408 0%, #06060a 50%, #0a0c14 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: rgba(196, 30, 58, 0.03);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(6, 6, 10, 0.92);
  border-bottom-color: rgba(196, 30, 58, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Live signal indicator */
.signal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  animation: signal-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent-glow);
}
@keyframes signal-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent-glow); }
  50% { opacity: 0.4; box-shadow: 0 0 2px var(--accent-glow); }
}

/* Hamburger menu button */
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.hamburger:hover {
  border-color: var(--accent);
  background: rgba(196, 30, 58, 0.1);
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header h1 {
  font-size: 20px;
  margin: 0;
  color: #fff;
  letter-spacing: 0.5px;
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-header h1 a:hover {
  opacity: 0.8;
}

.site-header h1 span {
  color: var(--accent-glow);
}

/* Header signal interference — rare subtle flicker */
@keyframes header-interference {
  0%, 99.5%, 100% { opacity: 1; }
  99.6% { opacity: 0.7; }
  99.7% { opacity: 1; }
  99.8% { opacity: 0.85; }
  99.9% { opacity: 1; }
}
.site-header h1 {
  animation: header-interference 60s infinite;
}

/* Ambient whisper bar — appears briefly at bottom of screen */
.ambient-whisper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  padding: 8px 16px;
  background: linear-gradient(0deg, rgba(6,6,10,0.95) 0%, transparent 100%);
  pointer-events: none;
  transition: opacity 1.5s ease;
  font-family: monospace;
}
.ambient-whisper.visible {
  opacity: 0.35;
}

nav a {
  color: var(--accent);
  margin-left: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
  position: relative;
}

nav a:hover {
  color: var(--accent-glow);
}

nav a.active {
  color: #fff;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-glow);
  border-radius: 1px;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px;
}

/* Hero */
.hero {
  margin-bottom: 24px;
}

.hero-inner {
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.04), rgba(196, 30, 58, 0.01));
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

/* Ambient glow behind hero */
.hero-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(196, 30, 58, 0.08), transparent 70%);
  pointer-events: none;
  animation: hero-glow 8s ease-in-out infinite alternate;
}
@keyframes hero-glow {
  0% { transform: translateX(0) scale(1); opacity: 0.6; }
  100% { transform: translateX(20%) scale(1.1); opacity: 1; }
}

/* Subtle scan-line overlay for hero */
.hero-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.008) 2px,
    rgba(255, 255, 255, 0.008) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Signal pulse ring in hero */
.hero-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(196, 30, 58, 0.15);
  transform: translate(-50%, -50%);
  animation: pulseRing 4s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}
.hero-pulse-ring:nth-child(2) {
  animation-delay: 1.3s;
}
.hero-pulse-ring:nth-child(3) {
  animation-delay: 2.6s;
}
@keyframes pulseRing {
  0% { width: 40px; height: 40px; opacity: 0.6; border-color: rgba(196, 30, 58, 0.3); }
  100% { width: 400px; height: 400px; opacity: 0; border-color: rgba(196, 30, 58, 0); }
}

/* Tagline typing cursor */
.tagline::after {
  content: '▌';
  animation: blink 1.2s step-end infinite;
  color: var(--accent-glow);
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-visual {
  flex: 0 0 220px;
}

.hero-copy {
  flex: 1;
}

.hero h2 {
  font-size: 30px;
  margin: 0;
  color: #fff;
}

.hero .tagline {
  color: var(--accent-glow);
  font-size: 14px;
  font-style: italic;
  margin: 0 0 8px;
  letter-spacing: 1px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.005));
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 32px rgba(2, 2, 8, 0.8);
}

/* Buttons */
button, .btn {
  background: linear-gradient(90deg, #8b1a2b, #c41e3a);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Story read-more toggle */
.story-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  font-weight: 600;
  transition: color 0.2s;
}
.story-toggle:hover {
  color: var(--accent-glow);
}

/* Staggered card reveal animation */
.story-card-reveal,
.kg-card {
  opacity: 0;
  transform: translateY(12px);
  animation: cardReveal .35s ease-out forwards, kg-signal-noise 50s infinite;
}
/* Rare signal noise on knowledge cards.
   Kun top/højre/bund — venstre kant bærer era-farvekoden og må ikke
   overskrives af animationen (border-color/inherit slog cascaden). */
@keyframes kg-signal-noise {
  0%, 97%, 100% { border-top-color: rgba(255,255,255,0.04); border-right-color: rgba(255,255,255,0.04); border-bottom-color: rgba(255,255,255,0.04); }
  97.5% { border-top-color: rgba(196, 30, 58, 0.3); border-right-color: rgba(196, 30, 58, 0.3); border-bottom-color: rgba(196, 30, 58, 0.3); }
  98.5% { border-top-color: rgba(196, 30, 58, 0.08); border-right-color: rgba(196, 30, 58, 0.08); border-bottom-color: rgba(196, 30, 58, 0.08); }
  99.2% { border-top-color: rgba(196, 30, 58, 0.25); border-right-color: rgba(196, 30, 58, 0.25); border-bottom-color: rgba(196, 30, 58, 0.25); }
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: rgba(196, 30, 58, 0.1);
}

/* Story reader */
#reader {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#story-title {
  font-size: 20px;
  margin: 0;
  color: #fff;
}

#story-body {
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.controls {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* Character cards */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.char-card {
  padding: 20px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.3s;
}

.char-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(196, 30, 58, 0.15), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Rare signal noise on character cards */
@keyframes char-signal-noise {
  0%, 98%, 100% { border-color: inherit; }
  98.5% { border-color: rgba(196, 30, 58, 0.4); }
  99% { border-color: rgba(196, 30, 58, 0.1); }
  99.5% { border-color: rgba(196, 30, 58, 0.3); }
}
.char-card {
  animation: char-signal-noise 45s infinite;
}

.char-card .avatar {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #0a0c14, #1a1020);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 12px;
}

.char-card .avatar svg {
  width: 64px;
  height: 64px;
  opacity: 0.85;
  transition: transform 0.3s, opacity 0.3s;
}
.char-card:hover .avatar svg {
  transform: scale(1.08);
  opacity: 1;
}

.char-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  color: #fff;
}

.char-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.char-card .role {
  font-size: 11px;
  color: var(--accent-glow);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

/* Timeline */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.timeline-list li:last-child {
  border-bottom: none;
}

.timeline-year {
  font-weight: 700;
  color: var(--accent-glow);
  min-width: 48px;
  font-size: 14px;
}

.timeline-content strong {
  display: block;
  color: #fff;
  margin-bottom: 2px;
}

.timeline-content span {
  color: var(--muted);
  font-size: 13px;
}

/* Map */
#map {
  height: 70vh;
  border-radius: 10px;
}

.ag-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.ag-marker.ag-1940 { background: #6b7280; }
.ag-marker.ag-1950 { background: #9ca3af; }
.ag-marker.ag-1960 { background: #d1d5db; }
.ag-marker.ag-1980 { background: #fca5a5; }
.ag-marker.ag-1990 { background: #f87171; }
.ag-marker.ag-2000 { background: #ef4444; }
.ag-marker.ag-2010 { background: #dc2626; }
.ag-marker.ag-2020 { background: #b91c1c; }
.ag-marker.ag-2030 { background: #991b1b; }
.ag-marker.ag-2040 { background: #7f1d1d; }

/* Section headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-glow);
}

/* Responsive */
@media (min-width: 900px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .hero h2 {
    font-size: 34px;
  }
  .lead {
    max-width: 640px;
  }
  .hero-visual svg {
    display: block;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    padding: 16px;
    gap: 0;
  }
  .hamburger {
    display: flex;
  }
  .site-header nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 12px 0 4px;
    gap: 0;
    order: 3;
  }
  .site-header nav.open {
    display: flex;
  }
  .site-header nav a {
    margin-left: 0;
    font-size: 14px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .site-header nav a.active::after {
    bottom: 6px;
  }
  /* Search button in mobile nav */
  .site-header nav button[aria-label="Søg"] {
    margin: 8px 12px 4px;
    width: 100%;
    justify-content: center;
    height: 40px;
    font-size: 14px;
  }
  .container {
    padding: 0 16px;
    margin: 20px auto;
  }
  .hero-inner {
    padding: 24px 16px;
  }
  .hero h2 {
    font-size: 24px;
  }
  .lead {
    font-size: 14px;
  }
  .hero-ctas {
    flex-wrap: wrap;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .char-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 16px;
  }
  .timeline-list li {
    flex-direction: column;
    gap: 4px;
  }
  .timeline-year {
    min-width: auto;
  }
  .kg-grid {
    grid-template-columns: 1fr !important;
  }
  .kg-detail-inner {
    margin-top: 16px;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
  }
  .kg-filters {
    gap: 6px;
  }
  .kg-filter {
    font-size: 11px;
    padding: 4px 10px;
  }
  .kg-search {
    font-size: 14px;
    padding: 10px 12px;
  }
  .kg-view-toggle {
    flex-wrap: wrap;
  }
  .kg-graph-container {
    height: 50vh !important;
  }
  .signal-feed-items {
    max-height: 160px;
  }
  .signal-item {
    flex-direction: column;
    gap: 2px;
  }
  .signal-year {
    min-width: auto;
  }
  .law-card {
    padding-left: 16px !important;
  }
  .law-card .law-num {
    position: static;
    display: inline-flex;
    margin-bottom: 8px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-signal {
    max-width: 100%;
  }
  .footer-links {
    justify-content: center;
  }
  .map-filters {
    gap: 6px;
  }
  .map-era-btn {
    font-size: 11px;
    padding: 4px 10px;
  }
  .era-filters, .story-era-filters {
    gap: 6px;
  }
  .era-btn, .story-era-btn {
    font-size: 11px;
    padding: 4px 10px;
  }
  .principle-card {
    padding: 12px;
  }
  .section-era {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .site-header h1 {
    font-size: 16px;
  }
  .site-header nav a {
    font-size: 13px;
    padding: 8px 12px;
  }
  .hero-inner {
    padding: 20px 12px;
  }
  .hero h2 {
    font-size: 20px;
  }
  .hero .tagline {
    font-size: 12px;
  }
  .lead {
    font-size: 13px;
  }
  .card {
    padding: 14px;
  }
  .kg-card h3 {
    font-size: 15px;
  }
  .kg-card p {
    font-size: 12px;
  }
  .law-card h3 {
    font-size: 16px;
  }
  .law-card .axiom {
    font-size: 13px;
  }
}

/* ============================================
   PSYCHOLOGICAL HORROR — RARE GLITCH EFFECTS
   These fire very infrequently (every 2-5 min)
   and are subtle enough to unsettle, not annoy.
   ============================================ */

/* Glitch text distortion — applies to any .glitch-target */
@keyframes horror-glitch {
  0%, 95%, 100% { transform: none; filter: none; opacity: 1; }
  96% { transform: translateX(-2px) skewX(-1deg); filter: hue-rotate(90deg); opacity: 0.85; }
  97% { transform: translateX(1px) skewX(0.5deg); filter: hue-rotate(-60deg) brightness(1.3); opacity: 0.9; }
  98% { transform: translateX(-1px); filter: hue-rotate(180deg); opacity: 0.7; }
  99% { transform: none; filter: none; opacity: 1; }
}

/* Screen-wide micro-flicker — barely perceptible */
@keyframes horror-flicker {
  0%, 94%, 100% { opacity: 1; }
  95% { opacity: 0.92; }
  96% { opacity: 1; }
  97% { opacity: 0.88; }
  98% { opacity: 1; }
}

/* Text corruption — characters briefly scramble */
@keyframes horror-corrupt {
  0%, 90%, 100% { filter: none; text-shadow: none; }
  92% { filter: blur(0.5px); text-shadow: 0 0 4px rgba(196,30,58,0.4); }
  94% { filter: none; text-shadow: 0 0 8px rgba(196,30,58,0.6); }
  96% { filter: blur(1px); text-shadow: 0 -2px 4px rgba(255,45,85,0.3); }
  98% { filter: none; text-shadow: none; }
}

/* Deep shadow pulse — a card briefly "breathes" */
@keyframes horror-breathe {
  0%, 88%, 100% { box-shadow: 0 8px 32px rgba(2,2,8,0.8); }
  90% { box-shadow: 0 8px 32px rgba(2,2,8,0.8), 0 0 40px rgba(196,30,58,0.08); }
  93% { box-shadow: 0 8px 32px rgba(2,2,8,0.8), 0 0 60px rgba(196,30,58,0.15), inset 0 0 30px rgba(196,30,58,0.05); }
  96% { box-shadow: 0 8px 32px rgba(2,2,8,0.8), 0 0 20px rgba(196,30,58,0.05); }
}

/* Redacted text reveal — text briefly shows then blacks out */
@keyframes horror-redact {
  0%, 85%, 100% { background: none; color: inherit; }
  90% { background: var(--accent); color: transparent; }
  93% { background: none; color: inherit; }
  95% { background: var(--accent); color: transparent; }
  97% { background: none; color: inherit; }
}

/* Applied by JS — horror glitch on random element */
.horror-glitch-active {
  animation: horror-glitch 0.8s ease-in-out;
}

/* Applied by JS — full page micro-flicker */
.horror-flicker-active {
  animation: horror-flicker 0.4s ease-in-out;
}

/* Applied by JS — text corruption */
.horror-corrupt-active {
  animation: horror-corrupt 1.2s ease-in-out;
}

/* Applied by JS — card breathing */
.horror-breathe-active {
  animation: horror-breathe 2s ease-in-out;
}

/* Applied by JS — redacted text */
.horror-redact-active {
  animation: horror-redact 1.5s ease-in-out;
}

/* Persistent subtle unease — very faint scan lines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.012;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(196, 30, 58, 0.15) 2px,
    rgba(196, 30, 58, 0.15) 4px
  );
  mix-blend-mode: overlay;
  transition: opacity 0.5s ease;
}

/* Scan line surge — horror effect that briefly intensifies scan lines */
body.horror-scan-surge::after {
  opacity: 0.08;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 1px,
    rgba(196, 30, 58, 0.3) 1px,
    rgba(196, 30, 58, 0.3) 3px
  );
}

/* Hero text — slightly more unsettling */
.hero h2 {
  text-shadow: 0 0 40px rgba(196, 30, 58, 0.15), 0 0 80px rgba(196, 30, 58, 0.05);
}

/* Signal feed — more ominous */
.signal-feed-header h3 {
  letter-spacing: 2.5px;
  text-shadow: 0 0 12px rgba(255, 45, 85, 0.3);
}

/* Card hover — deeper shadow, slight red glow */
.card:hover {
  border-color: rgba(196, 30, 58, 0.3);
  box-shadow: 0 12px 40px rgba(2, 2, 8, 0.9), 0 0 30px rgba(196, 30, 58, 0.08);
  transform: translateY(-2px);
}

/* Headings — faint red glow */
h2, h3 {
  text-shadow: 0 0 20px rgba(196, 30, 58, 0.06);
}

/* Links — subtle pulse on hover */
a:hover {
  text-shadow: 0 0 8px rgba(255, 45, 85, 0.3);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .story-card-reveal,
  .kg-card {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .signal-dot {
    animation: none;
    box-shadow: 0 0 6px var(--accent-glow);
  }
  .scroll-progress {
    transition: none;
  }
  .page-leaving {
    transition: none;
  }
  .hero-pulse-ring {
    display: none;
  }
  /* Disable all horror effects for reduced motion */
  .horror-glitch-active,
  .horror-flicker-active,
  .horror-corrupt-active,
  .horror-breathe-active,
  .horror-redact-active {
    animation: none !important;
  }
  body::after,
  body.horror-scan-surge::after {
    display: none !important;
  }
}

/* Print styles */
@media print {
  .scroll-progress,
  .back-to-top,
  .hamburger,
  .skip-link,
  .signal-dot,
  #global-search-overlay,
  #shortcuts-overlay,
  body::before {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 12pt;
  }
  .site-header {
    position: static !important;
    background: none !important;
    border-bottom: 2pt solid #333 !important;
    box-shadow: none !important;
  }
  .site-header h1,
  .site-header h1 a,
  .site-header h1 span {
    color: #111 !important;
  }
  .site-header nav a {
    color: #333 !important;
  }
  .site-header nav a.active::after {
    background: #333 !important;
  }
  .card {
    background: none !important;
    border: 1pt solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .site-footer {
    border-top: 2pt solid #333 !important;
    background: none !important;
  }
  .site-footer::before {
    display: none !important;
  }
  .footer-signal-status {
    display: none !important;
  }
  .footer-brand h3,
  .footer-brand h3 span {
    color: #111 !important;
  }
  .footer-links a {
    color: #333 !important;
  }
  .footer-era span {
    color: #666 !important;
  }
  a {
    color: #c41e3a !important;
    text-decoration: underline;
  }
  .btn, .btn-outline {
    border: 1pt solid #333 !important;
    background: none !important;
    color: #111 !important;
    text-decoration: none;
  }
}

/* === Markdown-renderede lore-bodies (md-render.js) ===
   Bruges i detaljevisninger, der renderer nodernes markdown-body.
   Holder app'ens egne tokens; tint-nuancer følger filens eksisterende
   rgba-konvention for accenten. */
.kg-body h3, .kg-body h4, .kg-body h5 { color: #fff; margin: 22px 0 10px; line-height: 1.3; }
.kg-body h3 { font-size: 16px; text-transform: uppercase; letter-spacing: 1.2px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.kg-body h4 { font-size: 15px; }
.kg-body h5 { font-size: 14px; color: var(--text); }
.kg-body p { margin: 0 0 14px; }
.kg-body p.md-meta { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.kg-body p.md-meta strong { color: var(--accent-glow); font-weight: 600; }
.kg-body ul { margin: 0 0 14px; padding-left: 20px; }
.kg-body li { margin-bottom: 6px; }
.kg-body li::marker { color: var(--accent); }
.kg-body blockquote { margin: 0 0 14px; padding: 10px 16px; border-left: 2px solid var(--accent); background: rgba(196, 30, 58, 0.05); font-style: italic; }
.kg-body pre.md-code { margin: 0 0 16px; padding: 14px 16px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7; color: var(--text); }
.kg-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 4px; }
.kg-body hr.md-hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.md-wikilink { color: var(--accent-glow); cursor: pointer; text-decoration: none; border-bottom: 1px dotted rgba(255, 45, 85, 0.45); }
.md-wikilink:hover { color: #fff; border-bottom-color: #fff; }
.md-wikilink-dead { color: var(--muted); border-bottom: 1px dotted rgba(255, 255, 255, 0.15); }

/* ==================================================================
   NX PASS 2 — sitewide futurisme-lag (det store redesign, 07-13)
   Delte komponenter: side-heroer, ruteføring (journey), serie-kort,
   startpunkter, sektions-chrome og cross-document View Transitions.
   Alle klasser nx-*-namespacet (delt stylesheet). Tokens-only;
   tint-nuancer følger filens rgba-konvention for accenten.
   ================================================================== */

:root {
  --nx-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
}

/* Moderne typografi: balancerede overskrifter (ignoreres af ældre browsere) */
h1, h2, h3 { text-wrap: balance; }

/* ---- Cross-document View Transitions (MPA) ----
   Native, bløde sideovergange uden JS. reveal.js sætter .nx-vt på
   <html> og springer sin egen fade over, hvor dette understøttes. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: nx-header; }
}
::view-transition-old(root) { animation: nx-vt-out 0.16s ease both; }
::view-transition-new(root) { animation: nx-vt-in 0.26s ease both; }
@keyframes nx-vt-out { to { opacity: 0; } }
@keyframes nx-vt-in { from { opacity: 0; } }

/* ---- Sektions-chrome (kicker + titel + linje) ---- */
.nx-sec-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 0 0 20px;
}
.nx-sec-kicker {
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
}
.nx-sec-head h2 { margin: 0; color: #fff; font-size: clamp(20px, 2.6vw, 27px); letter-spacing: -0.01em; }
.nx-sec-head .nx-sec-rule { flex: 1; height: 1px; min-width: 30px; background: linear-gradient(90deg, var(--border), transparent); align-self: center; }

/* ---- Side-hero (.nx-ph) — hver sides identitetsflade ---- */
.nx-ph {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px;
  padding: clamp(28px, 5vw, 54px) clamp(20px, 4vw, 48px);
  margin-bottom: clamp(20px, 3.5vw, 36px);
  background:
    radial-gradient(90% 130% at 88% -25%, rgba(196, 30, 58, 0.13), transparent 55%),
    linear-gradient(180deg, rgba(196, 30, 58, 0.04), rgba(10, 12, 20, 0.35));
}
.nx-ph::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(196, 30, 58, 0.05) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(196, 30, 58, 0.05) 47px 48px);
  -webkit-mask-image: radial-gradient(130% 110% at 50% 0%, #000 25%, transparent 80%);
  mask-image: radial-gradient(130% 110% at 50% 0%, #000 25%, transparent 80%);
}
.nx-ph-sigil {
  position: absolute; right: -50px; top: 50%; transform: translateY(-50%);
  width: min(36vw, 280px); height: auto; opacity: 0.08; pointer-events: none;
  filter: drop-shadow(0 0 24px rgba(196, 30, 58, 0.4));
}
/* Scroll-drevet drift på watermark — ren CSS, progressive enhancement */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .nx-ph-sigil {
      animation: nx-ph-drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 700px;
    }
  }
}
@keyframes nx-ph-drift {
  to { transform: translateY(calc(-50% + 70px)) rotate(9deg); }
}
/* :not(.nx-ph-sigil): sigillet SKAL forblive absolut — denne regel har
   ellers samme specificitet og ville trække det ind i flowet. */
.nx-ph > *:not(.nx-ph-sigil) { position: relative; z-index: 1; }
.nx-ph-kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 14px;
}
.nx-ph-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 24px; padding: 0 6px;
  border: 1px solid rgba(196, 30, 58, 0.45); border-radius: 6px;
  color: var(--accent-glow); font-weight: 600;
}
.nx-ph-title {
  margin: 0 0 12px; color: #fff;
  font-size: clamp(2.1rem, 6vw, 4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.02;
  text-transform: uppercase;
  text-shadow: 0 0 36px rgba(196, 30, 58, 0.25), 0 0 80px rgba(196, 30, 58, 0.08);
}
.nx-ph-desc {
  margin: 0 0 18px; color: var(--text);
  font-size: clamp(14px, 1.6vw, 16px); line-height: 1.65; max-width: 62ch;
}
.nx-ph-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* Slank hero-variant til app-flader (map/graph/terminal): sidens
   værktøj skal blive over folden — heroen identificerer kun. */
.nx-ph--slim { padding: clamp(18px, 3vw, 30px) clamp(18px, 3.5vw, 36px); margin-bottom: 18px; }
.nx-ph--slim .nx-ph-kicker { margin-bottom: 8px; }
.nx-ph--slim .nx-ph-title { font-size: clamp(1.5rem, 3.2vw, 2.3rem); margin-bottom: 8px; }
.nx-ph--slim .nx-ph-desc { font-size: 13.5px; margin-bottom: 0; max-width: 72ch; }
.nx-ph--slim .nx-ph-sigil { width: min(24vw, 170px); opacity: 0.06; }
.nx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px;
}
.nx-chip b { color: var(--accent-glow); font-weight: 700; }
.nx-chip--live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-glow); box-shadow: 0 0 6px var(--accent-glow);
  animation: signal-pulse 2s ease-in-out infinite;
}

/* ---- Ruteføring (.nx-journey) — injiceres af reveal.js på alle sider ---- */
.nx-journey {
  max-width: 1100px; margin: clamp(44px, 7vw, 76px) auto 0; padding: 0 20px;
}
.nx-journey-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.nx-journey-kicker {
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
}
.nx-journey-rule { flex: 1; height: 1px; min-width: 30px; background: linear-gradient(90deg, var(--border), transparent); }
.nx-journey-pos {
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 2px; color: var(--muted);
}
.nx-journey-ticks { display: inline-flex; gap: 4px; align-items: center; }
.nx-tick {
  width: 14px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.nx-tick--past { background: rgba(196, 30, 58, 0.35); }
.nx-tick--on { background: var(--accent-glow); box-shadow: 0 0 8px rgba(255, 45, 85, 0.7); }
.nx-journey-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nx-jump {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.nx-jump:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 30, 58, 0.4);
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.06), rgba(255, 255, 255, 0.005));
  box-shadow: 0 12px 36px rgba(2, 2, 8, 0.7), 0 0 22px rgba(196, 30, 58, 0.1);
}
.nx-jump--next::before {
  content: ''; position: absolute; top: 0; right: 0; width: 3px; height: 100%;
  background: var(--accent); opacity: 0.6; transition: opacity 0.25s, box-shadow 0.25s;
}
.nx-jump--next:hover::before { opacity: 1; box-shadow: 0 0 14px rgba(196, 30, 58, 0.6); }
.nx-jump--prev { text-align: left; }
.nx-jump--next { text-align: right; align-items: flex-end; }
.nx-jump--wide { grid-column: 1 / -1; }
.nx-jump-label {
  font-family: var(--nx-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
}
.nx-jump:hover .nx-jump-label { color: var(--accent-glow); }
.nx-jump-title { color: #fff; font-weight: 700; font-size: 17px; }
.nx-jump-tag { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 640px) {
  .nx-journey-grid { grid-template-columns: 1fr; }
  .nx-jump--next { text-align: left; align-items: flex-start; }
  .nx-journey-ticks { display: none; }
}

/* ---- Novelle-seriekort (.nx-serie) på stories.html ---- */
.nx-serie {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.nx-serie::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--accent); opacity: 0.5; transition: opacity 0.25s, box-shadow 0.25s;
}
.nx-serie:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 30, 58, 0.4);
  box-shadow: 0 14px 40px rgba(2, 2, 8, 0.7), 0 0 26px rgba(196, 30, 58, 0.1);
}
.nx-serie:hover::before { opacity: 1; box-shadow: 0 0 14px rgba(196, 30, 58, 0.6); }
.nx-serie--first { border-color: rgba(196, 30, 58, 0.3); }
.nx-serie-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.nx-serie-num {
  font-family: var(--nx-mono); font-size: 28px; font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(196, 30, 58, 0.55);
}
.nx-serie-badge {
  font-family: var(--nx-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent-glow);
  border: 1px solid rgba(196, 30, 58, 0.5); border-radius: 5px;
  padding: 3px 8px; background: rgba(196, 30, 58, 0.08);
}
.nx-serie h3 { margin: 0; color: #fff; font-size: 20px; }
.nx-serie-meta {
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
}
.nx-serie-scener { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-scene-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid var(--border);
  font-family: var(--nx-mono); font-size: 12px;
  color: var(--text); text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}
.nx-scene-chip:hover {
  border-color: var(--accent); background: rgba(196, 30, 58, 0.1);
  color: #fff; transform: translateY(-2px);
}
.nx-serie-list { margin: 0; }
.nx-serie-list summary {
  cursor: pointer; list-style: none;
  font-family: var(--nx-mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.2s;
}
.nx-serie-list summary::-webkit-details-marker { display: none; }
.nx-serie-list summary::before { content: '+ '; color: var(--accent); }
.nx-serie-list[open] summary::before { content: '− '; }
.nx-serie-list summary:hover { color: var(--accent-glow); }
.nx-serie-list ol {
  margin: 10px 0 0; padding-left: 22px;
  color: var(--muted); font-size: 13px; line-height: 1.9;
}
.nx-serie-list ol a { color: var(--text); text-decoration: none; border-bottom: 1px dotted rgba(255, 45, 85, 0.35); }
.nx-serie-list ol a:hover { color: #fff; border-bottom-color: #fff; }
.nx-serie-cta {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  margin-top: 2px; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent-glow); font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.nx-serie-cta:hover { background: rgba(196, 30, 58, 0.12); color: #fff; transform: translateY(-2px); }

/* ---- Startpunkter (.nx-start) på knowledge.html ---- */
.nx-start { margin-bottom: 24px; }
.nx-start-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.nx-start-hint {
  font-family: var(--nx-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
}
.nx-start-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px;
}
.nx-start-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.nx-start-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 30, 58, 0.45);
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.06), rgba(255, 255, 255, 0.005));
  box-shadow: 0 8px 24px rgba(2, 2, 8, 0.6), 0 0 18px rgba(196, 30, 58, 0.08);
}
.nx-start-chip svg { width: 22px; height: 22px; color: var(--accent-glow); flex-shrink: 0; }
.nx-start-txt { min-width: 0; }
.nx-start-txt b { display: block; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.3; }
.nx-start-chip:hover .nx-start-txt b { color: #fff; }
.nx-start-txt span {
  display: block; margin-top: 2px;
  font-family: var(--nx-mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .nx-ph-sigil { animation: none !important; }
}
