/* Night City Archive — independent visual identity. Local only. */
:root {
  --carbon: #12151A;
  --surface: #1A2229;
  --paper: #E8EEF2;
  --accent-a: #E23B6D;
  --accent-b: #5EC8C5;
  --brass: #C4A574;
  --ink: #12151A;
  --text: #E8EEF2;
  --muted: #9AA7B2;
  --line: rgba(232, 238, 242, 0.12);
  --accent: #5EC8C5;
  --accent-soft: rgba(94, 200, 197, 0.18);
  --danger: #E23B6D;
  --warn: #C4A574;
  --btn-fg: #12151A;
  --band-bg: #5EC8C5;
  --band-fg: #12151A;
  --hero-bg: #1A2229;
  --hero-fg: #E8EEF2;
  --glow: rgba(94, 200, 197, 0.35);
  --radius: 0;
  --max: 1180px;
  --nav-h: 64px;
  --nav-top: 14px;
  --nav-clearance: calc(var(--nav-top) + var(--nav-h) + 18px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: var(--font);
  --fs-display: clamp(2.25rem, 5vw, 3.75rem);
  --fs-h1: clamp(1.9rem, 3.8vw, 2.85rem);
  --fs-h2: clamp(1.65rem, 3.1vw, 2.35rem);
  --fs-h3: clamp(1.05rem, 1.4vw, 1.2rem);
  --fs-eyebrow: clamp(0.68rem, 0.85vw, 0.75rem);
  --fs-body: clamp(1rem, 1.15vw, 1.0625rem);
  --fs-lead: clamp(1.02rem, 1.35vw, 1.125rem);
  --lh-tight: 1.12;
  --lh-body: 1.65;
  --track-display: -0.02em;
  --track-head: -0.01em;
  --track-eyebrow: 0.16em;
  --space-section: clamp(3.75rem, 8vw, 6.5rem);
  --space-block: clamp(1.75rem, 3.5vw, 2.75rem);
  --space-card: 1.15rem;
  --weight-head: 800;
  --border-w: 1px;
  --deemph: 0.72;
  --bg-depth: #12151A;
}

/* Personas */
html[data-voice="archivist"] {
  --accent: #5EC8C5;
  --accent-soft: rgba(94, 200, 197, 0.16);
  --band-bg: #5EC8C5;
  --band-fg: #12151A;
  --hero-bg: #1A2229;
  --hero-fg: #E8EEF2;
  --glow: rgba(94, 200, 197, 0.28);
  --track-display: -0.01em;
  --weight-head: 750;
  --border-w: 1px;
  --deemph: 0.78;
}
html[data-voice="glitch"] {
  --accent: #E23B6D;
  --accent-soft: rgba(226, 59, 109, 0.18);
  --band-bg: #E23B6D;
  --band-fg: #E8EEF2;
  --hero-bg: #E23B6D;
  --hero-fg: #E8EEF2;
  --glow: rgba(226, 59, 109, 0.35);
  --track-display: -0.03em;
  --weight-head: 900;
  --border-w: 1.5px;
  --deemph: 0.85;
}
html[data-voice="corpo"] {
  --accent: #C4A574;
  --accent-soft: rgba(196, 165, 116, 0.16);
  --band-bg: #1A2229;
  --band-fg: #E8EEF2;
  --hero-bg: #12151A;
  --hero-fg: #E8EEF2;
  --glow: rgba(196, 165, 116, 0.22);
  --track-display: 0.08em;
  --track-head: 0.06em;
  --weight-head: 600;
  --border-w: 1px;
  --deemph: 0.55;
  --space-section: clamp(4.5rem, 10vw, 7.5rem);
}
html[data-voice="netrunner"] {
  --carbon: #0C1014;
  --surface: #141C22;
  --bg-depth: #0A0E12;
  --accent: #5EC8C5;
  --accent-soft: rgba(94, 200, 197, 0.22);
  --band-bg: #141C22;
  --band-fg: #E8EEF2;
  --hero-bg: #0C1014;
  --hero-fg: #E8EEF2;
  --glow: rgba(94, 200, 197, 0.45);
  --track-display: -0.02em;
  --weight-head: 800;
  --border-w: 1px;
  --deemph: 0.7;
}

@property --nc-breathe {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.35;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.nc-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text);
  background-color: var(--bg-depth, var(--carbon));
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Paper grain overlay (static, ≤0.04) */
body.nc-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 110;
  opacity: 0.035;
  background-image: url("/public/img/paper-grain.png");
  background-repeat: repeat;
  background-size: 128px 128px;
  mix-blend-mode: soft-light;
}

/* Constructivist thin rotated bars (decorative) */
body.nc-body::before {
  content: "";
  position: fixed;
  top: 12%;
  right: -2%;
  width: 2px;
  height: 42vh;
  background: var(--accent);
  opacity: 0.22;
  transform: rotate(18deg);
  pointer-events: none;
  z-index: 0;
}

body.nc-body.admin {
  background-image: none;
  background: var(--carbon);
}
body.nc-body.admin::before,
body.nc-body.admin::after { display: none; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-head);
  letter-spacing: var(--track-head);
  line-height: var(--lh-tight);
}
p { margin: 0; }

html[data-voice="glitch"] h1:hover,
html[data-voice="glitch"] h2:hover {
  transform: translate(2px, 0);
}
html[data-voice="glitch"] .story-head h2,
html[data-voice="glitch"] .page-intro h1,
html[data-voice="glitch"] .hero-copy h1 {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--accent-a);
  text-underline-offset: 0.18em;
}

html[data-voice="netrunner"] .nc-brand,
html[data-voice="netrunner"] .btn:not(.ghost):not(.dark),
html[data-voice="netrunner"] .type-pill,
html[data-voice="netrunner"] .timeline::before {
  animation: nc-breathe 10s ease-in-out infinite;
}
@keyframes nc-breathe {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 0 0 transparent; opacity: 1; }
  50% { filter: brightness(1.08); box-shadow: 0 0 18px var(--glow); }
}

/* —— Sticky pill nav —— */
.nc-nav {
  position: sticky;
  top: var(--nav-top);
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 16px;
  margin-bottom: 0;
}
.nc-nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 14px;
  background: rgba(18, 21, 26, 0.88);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border: var(--border-w) solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  max-width: 100%;
  overflow-x: auto;
}
.nc-brand {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  padding: 6px 10px 6px 4px;
  margin-right: 4px;
  border-right: 1px solid var(--line);
}
.nc-brand:hover { color: var(--paper); }
.nc-nav a.nc-link {
  color: rgba(232, 238, 242, 0.78);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s;
}
.nc-nav a.nc-link:hover,
.nc-nav a.nc-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nc-nav a.nc-cta {
  margin-left: 4px;
  background: var(--accent);
  color: var(--btn-fg) !important;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.nc-nav a.nc-cta:hover { filter: brightness(1.05); color: var(--btn-fg) !important; }

/* Persona switcher */
.nc-voice {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
}
.nc-voice [data-voice-btn] {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.nc-voice [data-voice-btn]:hover,
.nc-voice [data-voice-btn]:focus-visible {
  color: var(--paper);
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}
.nc-voice [data-voice-btn][aria-pressed="true"],
.nc-voice [data-voice-btn].is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

body.admin .nc-nav { justify-content: flex-start; top: 0; margin: 0; padding: 12px 20px; }
body.admin .nc-nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  border-radius: 12px;
}
body.admin .nc-voice { display: none; }

.nc-main { padding-bottom: 4rem; padding-top: 0; position: relative; z-index: 1; }
.nc-wrap {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}
.nc-wrap.narrow { width: min(100% - 40px, 560px); }

.hero-split,
.entity-hero,
.page-intro,
.band-yellow,
.band-accent,
.story,
#welcome,
#about,
#districts,
#corps,
#gangs,
#people,
#timeline {
  scroll-margin-top: var(--nav-clearance);
}

/* —— Buttons (WCAG: dark text on celadon/brass) —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  font: inherit;
  font-weight: 750;
  font-size: 0.9rem;
  border: 2px solid var(--ink);
  background: var(--accent);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}
.btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 0 0 1px var(--accent);
  color: var(--btn-fg);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn.ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn.dark {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--ink);
}
.btn.dark:hover { color: var(--accent); }
html[data-voice="glitch"] .btn:not(.ghost):not(.dark) {
  background: var(--accent-a);
  color: var(--paper);
  border-color: var(--ink);
}
html[data-voice="corpo"] .btn:not(.ghost):not(.dark) {
  background: var(--brass);
  color: var(--ink);
}

/* —— Split hero —— */
.hero-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 1.15fr;
  min-height: clamp(420px, 72vh, 720px);
  margin-top: var(--nav-clearance);
  border-bottom: 3px solid var(--accent);
}
.hero-copy {
  background: var(--hero-bg);
  color: var(--hero-fg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.5rem);
  position: relative;
  overflow: hidden;
  border-right: 3px solid var(--accent);
}
.hero-copy::before {
  content: "01";
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  pointer-events: none;
}
.hero-kicker {
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 1.1rem;
  color: var(--accent);
}
.hero-copy h1 {
  font-size: var(--fs-display);
  font-weight: var(--weight-head);
  letter-spacing: var(--track-display);
  line-height: 1.08;
  max-width: 12ch;
  margin-bottom: 1.15rem;
}
.hero-copy .lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 34ch;
  opacity: var(--deemph);
  margin-bottom: 1.85rem;
  font-weight: 500;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; position: relative; z-index: 1; }
.hero-visual {
  position: relative;
  overflow: hidden;
  background: var(--carbon);
  min-height: 320px;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  will-change: transform;
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--hero-bg) 0%, transparent 18%),
    linear-gradient(to top, rgba(18,21,26,0.45), transparent 40%);
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { border-right: 0; border-bottom: 3px solid var(--accent); }
  .hero-visual { min-height: 260px; max-height: 360px; }
  .hero-visual::after {
    background: linear-gradient(to top, var(--hero-bg) 0%, transparent 28%);
  }
}

/* —— Accent narrative band (was yellow) —— */
.band-yellow,
.band-accent {
  background: var(--band-bg);
  color: var(--band-fg);
  padding: var(--space-section) 0;
  margin-top: 0;
  position: relative;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}
.band-yellow .eyebrow,
.band-accent .eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 1rem;
}
.band-yellow h2,
.band-accent h2 {
  font-size: var(--fs-h1);
  font-weight: var(--weight-head);
  letter-spacing: var(--track-display);
  max-width: 16ch;
  margin-bottom: 1.25rem;
}
.band-yellow .band-lead,
.band-accent .band-lead {
  max-width: 52ch;
  font-size: var(--fs-lead);
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 2.75rem;
  font-weight: 500;
}

.poster-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.poster-card {
  display: flex;
  flex-direction: column;
  background: var(--carbon);
  border: 2px solid var(--ink);
  color: var(--paper);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.poster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--accent);
  color: var(--paper);
}
.poster-card .ph {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}
.poster-card .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.poster-card:hover .ph img { transform: scale(1.05); }
.poster-card .pb {
  padding: 1rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  background: var(--carbon);
  border-top: 2px solid var(--accent);
}
.poster-card .pb h3 {
  font-size: var(--fs-h3);
  letter-spacing: var(--track-head);
}
.poster-card .pb p { font-size: 0.8rem; color: var(--muted); line-height: 1.45; opacity: var(--deemph); }
.poster-card .more {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.04em;
}
@media (max-width: 960px) { .poster-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .poster-row { grid-template-columns: 1fr; } }

.story { padding: var(--space-section) 0 1rem; }
.story-head {
  margin-bottom: var(--space-block);
  max-width: 40rem;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  position: relative;
}
.story-head .kicker {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.story-head h2 {
  font-size: var(--fs-h2);
  letter-spacing: var(--track-head);
  margin-bottom: 0.7rem;
}
.story-head .lead {
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 42ch;
  opacity: var(--deemph);
}
.story-foot { margin-top: 1.85rem; }

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.bento > li { grid-column: span 4; }
.bento > li:nth-child(1) { grid-column: span 6; }
.bento > li:nth-child(2) { grid-column: span 6; }
.bento.people > li { grid-column: span 3; }
.bento.people > li:nth-child(1),
.bento.people > li:nth-child(2) { grid-column: span 6; }
@media (max-width: 900px) {
  .bento > li,
  .bento > li:nth-child(1),
  .bento > li:nth-child(2),
  .bento.people > li,
  .bento.people > li:nth-child(1),
  .bento.people > li:nth-child(2) { grid-column: span 6; }
}
@media (max-width: 560px) {
  .bento > li,
  .bento > li:nth-child(1),
  .bento > li:nth-child(2),
  .bento.people > li,
  .bento.people > li:nth-child(1),
  .bento.people > li:nth-child(2) { grid-column: span 12; }
}

.media-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.media-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 16px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
  color: inherit;
}
.media-card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--carbon);
}
.bento > li:nth-child(1) .media-card .thumb,
.bento > li:nth-child(2) .media-card .thumb { aspect-ratio: 16 / 9; }
.media-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.media-card:hover .thumb img { transform: scale(1.06); }
.media-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  border-top: 2px solid var(--accent);
}
.media-card .name {
  font-size: 1.12rem;
  letter-spacing: var(--track-head);
}
.media-card .en {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  font-weight: 600;
  opacity: var(--deemph);
}
.media-card .blurb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: var(--deemph);
}
.media-card .meta {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid, .card-grid.cols-2 { grid-template-columns: 1fr; } }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--brass));
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  padding: 0.65rem 0 0.65rem 1.25rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 1.55rem;
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: var(--accent);
  border: 2px solid var(--ink);
}
.tl-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.tl-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-soft);
  color: inherit;
}
.tl-card .thumb {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--carbon);
}
.tl-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tl-card .body { padding: 1rem 1rem 1rem 0; display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; }
.tl-card .year {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.tl-card .name { font-size: 1.05rem; letter-spacing: var(--track-head); }
.tl-card .en { font-size: 0.75rem; color: var(--accent); opacity: var(--deemph); }
.tl-card .blurb { font-size: 0.85rem; color: var(--muted); line-height: 1.45; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; opacity: var(--deemph); }
@media (max-width: 560px) { .tl-card { grid-template-columns: 96px 1fr; } }

.page-intro {
  padding: calc(var(--nav-clearance) + 0.75rem) 0 1.5rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.25rem;
}
.page-intro h1 {
  font-size: var(--fs-h1);
  letter-spacing: var(--track-display);
  margin-bottom: 0.55rem;
}
.page-intro .section-lead {
  color: var(--muted);
  max-width: 42ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  opacity: var(--deemph);
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-end;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-left: 4px solid var(--accent);
  margin-bottom: 1.25rem;
}
.filters-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.filters-bar input,
.filters-bar select,
.form input,
.form select,
.form textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  background: var(--carbon);
  border: 1px solid var(--line);
  color: var(--text);
  min-width: 160px;
}
.filters-bar input:focus,
.filters-bar select:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.result-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.muted { color: var(--muted); }

.entity-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 420px;
  margin-top: var(--nav-clearance);
  background: var(--surface);
  border-bottom: 3px solid var(--accent);
}
.entity-hero .visual {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: var(--carbon);
}
.entity-hero .visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entity-hero .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  gap: 0.55rem;
  border-left: 3px solid var(--accent);
}
.crumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.crumb a { color: var(--accent); }
.type-pill {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--accent);
  padding: 0.3rem 0.65rem;
}
html[data-voice="glitch"] .type-pill {
  background: var(--accent-a);
  color: var(--paper);
}
html[data-voice="corpo"] .type-pill {
  background: var(--brass);
  color: var(--ink);
}
.entity-hero h1 {
  font-size: var(--fs-h1);
  letter-spacing: var(--track-display);
}
.entity-hero .sub { color: var(--accent); font-weight: 600; }
.note-disputed {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--brass);
  border: 1px solid var(--brass);
  padding: 0.2rem 0.5rem;
  margin-top: 0.35rem;
}
@media (max-width: 800px) {
  .entity-hero { grid-template-columns: 1fr; }
  .entity-hero .copy { border-left: 0; border-top: 3px solid var(--accent); }
  .entity-hero .visual { max-height: 280px; }
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 2.25rem 0 1rem;
}
.detail-reading {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 70ch;
}
.panel {
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 1.5rem 1.6rem;
}
.panel h2,
.detail-h {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--accent);
}
.panel-prose .detail-h { margin-bottom: 0.9rem; }
.prose p, .summary {
  font-size: 1.05rem;
  line-height: 1.72;
  color: rgba(232, 238, 242, 0.92);
  white-space: pre-wrap;
  max-width: 70ch;
}
.panel-facts .fact-list { display: grid; gap: 0; }
.fact-list li {
  display: grid;
  grid-template-columns: minmax(4.5rem, 7rem) 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
  line-height: 1.5;
}
.fact-list li:last-child { border-bottom: none; }
.fact-list strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rel-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.95rem;
}
.rel-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--carbon);
  border: var(--border-w) solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  color: inherit;
}
.rel-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 12px 28px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  color: inherit;
}
.rel-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--carbon);
}
.rel-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.rel-card:hover .thumb img { transform: scale(1.06); }
.rel-card .body {
  padding: 0.85rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  border-top: 2px solid var(--accent);
}
.rel-card .rel {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.18rem 0.4rem;
  margin-bottom: 0.15rem;
}
.rel-card .name {
  font-size: 0.98rem;
  letter-spacing: var(--track-head);
  line-height: 1.25;
}
.rel-card .en {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  opacity: var(--deemph);
}
.rel-card .notes {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: var(--deemph);
}
@media (max-width: 900px) { .rel-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .rel-cards { grid-template-columns: 1fr; }
  .fact-list li { grid-template-columns: 1fr; gap: 0.2rem; }
}

.edge-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.65rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.edge-list .rel {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.45rem;
}
.edge-list a { color: var(--accent); font-weight: 650; }
.edge-list .notes { width: 100%; font-size: 0.85rem; color: var(--muted); }

.refs details {
  margin: 1.25rem 0 0;
  max-width: 70ch;
}
.refs summary {
  color: #6e6e73;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.refs summary::-webkit-details-marker { display: none; }
.refs ul {
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}
.refs li {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.2rem 0;
}

.nc-foot {
  width: min(100% - 40px, var(--max));
  margin: 3rem auto 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.nc-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.nc-foot a:hover { color: var(--accent); }
.nc-foot .credits { max-width: 58ch; line-height: 1.45; }

[data-reveal] {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js-motion:not([data-reduced-motion="1"]) [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(18px);
}
html.js-motion:not([data-reduced-motion="1"]) [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* —— Admin —— */
body.admin .container {
  width: min(100% - 40px, var(--max));
  margin: 1.5rem auto 3rem;
}
body.admin .container.narrow { width: min(100% - 40px, 480px); }
body.admin .neon-title { font-size: 1.6rem; margin-bottom: 1rem; color: var(--accent); }
body.admin .neon-panel,
body.admin .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
body.admin .btn { border-radius: 6px; }
body.admin .form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}
body.admin .form input,
body.admin .form select,
body.admin .form textarea {
  width: 100%;
  min-width: 0;
}
body.admin .admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
body.admin .badge {
  font-size: 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.4rem;
  margin-left: 0.35rem;
}
body.admin .link-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
body.admin .warn { color: var(--brass); font-size: 0.9rem; }
body.admin .error { color: #ff6b6b; }
body.admin table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
body.admin th, body.admin td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
}
body.admin .source-article {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(232,238,242,0.88);
}
