:root {
  color-scheme: dark;
  --map-bg: rgb(8, 8, 8);
  --map-panel: rgba(17, 17, 17, 0.96);
  --map-panel-raised: rgb(21, 21, 21);
  --map-line: rgba(255, 255, 255, 0.13);
  --map-line-strong: rgba(255, 255, 255, 0.28);
  --map-text: rgb(210, 210, 210);
  --map-copy: rgb(160, 160, 160);
  --map-muted: rgb(128, 128, 128);
  --map-red: rgb(126, 21, 26);
  --map-red-bright: rgb(181, 49, 54);
}

* { box-sizing: border-box; }
html { background: var(--map-bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(120, 16, 20, 0.09), transparent 34rem),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.009) 0, rgba(255,255,255,0.009) 1px, transparent 1px, transparent 4px),
    var(--map-bg);
  color: var(--map-text);
  font-family: Arial, Helvetica, sans-serif;
  opacity: 0;
  filter: blur(2px);
  transition: opacity 700ms ease, filter 700ms ease;
}
body.is-ready { opacity: 1; filter: none; }
body.is-exiting { opacity: 0; filter: blur(1px); }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid var(--map-line-strong);
  background: #111;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.halo-page {
  width: min(72vw, 920px);
  margin: 0 auto;
  padding: 28px 0 24px;
}
.halo-site-header {
  padding: 14px 12px 8px;
  border: 1px solid var(--map-line);
  border-bottom: 0;
  background: rgb(20,20,20);
}
.halo-site-header .brand-stack { width: 100%; align-items: flex-end; gap: 8px; }
.halo-site-header .site-title-art { width: min(100%,760px); }
.halo-site-header .brand-subtitle { color: var(--map-muted); text-align: right; }
.halo-top-nav { margin: 0 0 10px; }
.halo-top-nav .section-top-nav-link.is-current,
.halo-top-nav .section-top-nav-link[aria-current="page"] {
  border-color: rgba(139, 28, 33, 0.72);
  background: rgba(95, 20, 24, 0.24);
  color: rgb(202, 202, 202);
}
.halo-main { width: 100%; }
.halo-header {
  padding: 25px;
  border: 1px solid var(--map-line);
  background: linear-gradient(145deg, rgba(28,28,28,0.96), rgba(12,12,12,0.96));
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.halo-kicker,
.halo-inspector-number,
.halo-inspector-section h3 {
  margin: 0;
  color: var(--map-muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}
.halo-header h1 {
  margin: 7px 0 12px;
  color: rgb(188,188,188);
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}
.halo-intro {
  max-width: none;
  margin: 0;
  color: var(--map-copy);
  font-size: 13px;
  letter-spacing: 0.035em;
  line-height: 1.8;
  text-transform: uppercase;
}

.halo-controls {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--map-line);
  background: rgba(15,15,15,0.96);
}
.halo-filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.halo-filter,
.halo-search-label input,
.halo-action,
.halo-footer a {
  border: 1px solid var(--map-line);
  background: #0d0d0d;
  color: rgb(158,158,158);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}
.halo-filter { min-height: 36px; padding: 0 13px; cursor: pointer; }
.halo-filter:hover,
.halo-filter:focus-visible,
.halo-filter.is-active {
  border-color: var(--map-red-bright);
  color: rgb(232,232,232);
  outline: none;
}
.halo-filter.is-active { background: rgba(126,21,26,0.25); }
.halo-search-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--map-muted);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.halo-search-label input {
  width: 210px;
  height: 36px;
  padding: 0 11px;
  color: var(--map-text);
  line-height: normal;
}
.halo-search-label input:focus { border-color: var(--map-red-bright); outline: none; }

.halo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220.95px;
  gap: 12px;
  align-items: stretch;
}
.halo-map-panel,
.halo-inspector {
  border: 1px solid var(--map-line);
  background: var(--map-panel);
}
.halo-map-panel { min-width: 0; padding: 18px; overflow: hidden; }
.halo-map-stage { position: relative; }
.halo-connectors {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.halo-connector {
  fill: none;
  stroke: var(--map-red-bright);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
}
.halo-era { position: relative; z-index: 1; margin: 0 0 22px; }
.halo-era:last-child { margin-bottom: 0; }
.halo-era-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--map-line);
}
.halo-era-heading h2,
.halo-era-heading p {
  margin: 0;
  color: rgb(152,152,152);
  font-size: 9px;
  font-weight: normal;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.halo-era-heading p { color: rgb(104,104,104); }
.halo-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 7px;
}
.halo-node {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 88px;
  padding: 10px 6px;
  border: 1px solid var(--map-line);
  background: rgba(12,12,12,0.97);
  color: var(--map-copy);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
}
.halo-node:hover,
.halo-node:focus-visible { border-color: var(--map-line-strong); color: rgb(228,228,228); outline: none; transform: translateY(-1px); }
.halo-node.is-active { border-color: var(--map-red-bright); background: rgba(126,21,26,0.24); color: #fff; }
.halo-node.is-related { border-color: rgba(181,49,54,0.6); background: rgba(68,18,20,0.22); }
.halo-node.is-muted { opacity: 0.33; }
.halo-node[hidden], .halo-era[hidden] { display: none; }
.halo-node-number {
  display: block;
  margin-bottom: 7px;
  color: rgb(116,116,116);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.halo-node.is-active .halo-node-number { color: rgb(214,136,139); }
.halo-node-title {
  display: block;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  font-size: 9px;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: uppercase;
}
.halo-node[data-halo="25"] .halo-node-title {
  font-size: 6.25px;
  letter-spacing: 0;
  white-space: nowrap;
}
.halo-node-year { display: block; margin-top: 7px; color: rgb(96,96,96); font-size: 8px; letter-spacing: 0.12em; }
.halo-node-pending { position: absolute; right: 6px; top: 6px; width: 5px; height: 5px; border: 1px solid rgb(126,126,126); border-radius: 50%; }
.halo-map-note {
  margin: 18px 0 0;
  color: rgb(112,112,112);
  font-size: 9px;
  letter-spacing: 0.07em;
  line-height: 1.65;
  text-transform: uppercase;
}
.halo-key { display: inline-block; width: 10px; height: 10px; margin: 0 5px 0 8px; vertical-align: -1px; border: 1px solid var(--map-line); }
.halo-key:first-child { margin-left: 0; }
.halo-key--active { border-color: var(--map-red-bright); background: rgba(126,21,26,0.35); }
.halo-key--related { border-color: rgba(181,49,54,0.6); }

.halo-inspector { position: sticky; top: 12px; padding: 17px; }
.halo-inspector-art-frame { aspect-ratio: 1; margin-bottom: 15px; border: 1px solid var(--map-line); background: #050505; overflow: hidden; }
.halo-inspector-art-frame img { display: block; width: 100%; height: 100%; object-fit: contain; filter: grayscale(100%) contrast(1.08); }
.halo-inspector h2 { margin: 6px 0 8px; color: rgb(226,226,226); font-size: 22px; font-weight: normal; letter-spacing: 0.09em; line-height: 1.15; text-transform: uppercase; }
.halo-inspector-meta { margin: 0 0 13px; color: rgb(126,126,126); font-size: 9px; letter-spacing: 0.13em; line-height: 1.55; text-transform: uppercase; }
.halo-inspector-summary { margin: 0; color: var(--map-copy); font-size: 11px; letter-spacing: 0.035em; line-height: 1.75; text-transform: uppercase; }
.halo-inspector-section { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--map-line); }
.halo-inspector-section ul { margin: 8px 0 0; padding: 0; list-style: none; }
.halo-inspector-section li { margin: 0 0 7px; color: rgb(154,154,154); font-size: 9px; letter-spacing: 0.06em; line-height: 1.55; text-transform: uppercase; }
.halo-related-button { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; text-align: left; text-transform: inherit; }
.halo-related-button:hover, .halo-related-button:focus-visible { color: #fff; outline: none; text-decoration: underline; }
.halo-inspector-actions { display: grid; gap: 7px; margin-top: 17px; }
.halo-action { display: flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 12px; text-decoration: none; }
.halo-action:hover, .halo-action:focus-visible { border-color: var(--map-red-bright); color: #fff; outline: none; }
.halo-action--secondary { background: transparent; }
.halo-action.is-disabled { color: rgb(92,92,92); cursor: default; pointer-events: none; }

.halo-footer { display: flex; justify-content: center; gap: 8px; margin-top: 12px; padding: 14px; border: 1px solid var(--map-line); background: rgba(15,15,15,0.96); }
.halo-footer a { display: inline-flex; min-height: 38px; align-items: center; padding: 0 14px; text-decoration: none; }
.halo-footer a:hover, .halo-footer a:focus-visible { border-color: var(--map-red-bright); color: #fff; outline: none; }

@media (max-width: 1100px) {
  .halo-page { width: min(94vw, 920px); }
}
@media (max-width: 980px) {
  .halo-layout { grid-template-columns: 1fr; }
  .halo-inspector { position: static; display: grid; grid-template-columns: 121.5px minmax(0,1fr); gap: 0 18px; }
  .halo-inspector-art-frame { grid-row: 1 / span 8; }
  .halo-node-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .halo-page { padding-top: 10px; }
  .halo-site-header { padding: 10px 8px 6px; }
  .halo-header { padding: 18px; }
  .halo-controls { align-items: stretch; flex-direction: column; }
  .halo-search-label { justify-content: space-between; }
  .halo-search-label input { flex: 1; width: auto; }
  .halo-map-panel { padding: 12px; }
  .halo-node-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .halo-node { min-height: 78px; }
  .halo-inspector { display: block; }
  .halo-inspector-art-frame { width: min(148.5px, 100%); margin-left: auto; margin-right: auto; }
}
@media (max-width: 420px) {
  .halo-node-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .halo-footer { align-items: stretch; flex-direction: column; }
  .halo-footer a { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .halo-node { transition-duration: 1ms; }
}
