:root {
  --void: #08090d;
  --ink: #12151c;
  --panel: #181d26;
  --line: rgba(212, 176, 108, 0.22);
  --paper: #f4ead8;
  --muted: #b3a792;
  --gold: #d4b06c;
  --teal: #7ebfb8;
  --danger: #c45c4c;
  --sans: "Sora", "Trebuchet MS", sans-serif;
  --serif: "Fraunces", "Palatino Linotype", serif;
  --header-h: 58px;
  --gutter: 16px;
}
@media (min-width: 700px) {
  :root { --gutter: 4vw; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--void); }
body {
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(212, 176, 108, 0.07), transparent 52%),
    radial-gradient(720px 360px at 100% 0%, rgba(126, 191, 184, 0.06), transparent 48%),
    var(--void);
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(rgba(244, 234, 216, 0.4) 0.55px, transparent 0.65px);
  background-size: 3px 3px;
  mix-blend-mode: screen;
  z-index: 0;
}
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.sr-only, .skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  inset: 12px;
  padding: 8px 12px;
  background: var(--gold);
  color: #111;
  z-index: 10;
}

.site-header, .site-footer, .site-main { position: relative; z-index: 1; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: var(--header-h);
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(10px);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 720;
  letter-spacing: 0.05em;
}
.wordmark-mark {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gold);
  border-radius: 99px;
  box-shadow: 6px -5px 0 -5px var(--teal), -7px 5px 0 -5px var(--danger);
}
.site-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.site-nav a:hover { color: var(--paper); }
.site-nav a.is-current {
  color: #1a1408;
  background: var(--gold);
  border-color: var(--gold);
}
.header-search {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.header-search input { width: 160px; min-width: 0; padding: 8px 12px; }
.header-search button { padding: 8px 12px; font-size: 0.82rem; }

.is-page .site-main {
  padding: 28px 6vw 72px;
  max-width: 1400px;
  margin: 0 auto;
}
/* A definite height, not just a minimum: the chart sizes itself from the flex
   chain, and with only a min-height a long relation list in the side panel
   stretches the whole page and pushes the graph below the fold. */
.is-canvas {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.is-canvas .site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  max-width: none;
}
.is-canvas .site-footer { padding: 12px var(--gutter) 16px; }

.site-footer {
  padding: 24px 6vw 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.eyebrow {
  color: var(--teal);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin: 0 0 8px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; line-height: 1.12; margin: 0 0 10px; }
.is-page h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); max-width: 18ch; }
.canvas-page h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: none; }
.lede { max-width: 68ch; color: var(--muted); font-size: 0.98rem; }
.meta { color: var(--gold); font-size: 0.86rem; }

.hero { padding: 18px 0 42px; }
.search-form, .search-inline, .graph-toolbar label, .graph-toolbar fieldset {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-form { margin-top: 28px; max-width: 560px; }
input, select, button {
  font: inherit;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
}
button {
  background: var(--gold);
  color: #1a1408;
  font-weight: 600;
  cursor: pointer;
}
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin: 18px 0 20px; flex-wrap: wrap; }
.section-head p, .empty-copy { color: var(--muted); }

.site-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 28px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.site-ad[hidden] { display: none; }
.site-ad-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-ad-native { width: 100%; overflow-x: auto; }
.site-ad-native > div { margin: 0 auto; }
.site-ad-frame {
  display: block;
  margin: 0 auto;
  border: 0;
  background: transparent;
}
.tab-panel .site-ad {
  margin: 24px 0 8px;
  border-bottom: 0;
}
.dossier-ad {
  grid-column: 1 / -1;
  align-items: center;
  margin: 6px 0 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.dossier-ad .site-ad-label { margin: 0 0 4px; }

.archive-hero { margin: 8px 0 22px; }
.archive-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: none; }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
@media (min-width: 600px) {
  .archive-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
}
.poster-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.poster-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line);
}
@media (min-width: 600px) {
  .poster-card img { height: 260px; }
}
.poster-card h2 {
  font-size: 0.95rem;
  text-align: center;
  margin: 10px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-card:hover img { border-color: var(--gold); }

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 0;
}
.pagination a {
  color: #1a1408;
  background: var(--gold);
  border: 1px solid var(--gold);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 999px;
}
.pagination a:hover { color: #1a1408; background: var(--paper); border-color: var(--paper); }

.canvas-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dossier {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px var(--gutter) 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 21, 28, 0.92), rgba(8, 9, 13, 0.4));
}
@media (min-width: 960px) {
  .dossier {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
  }
  .canvas-page .dossier { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .dossier-ad {
    grid-column: auto;
    justify-self: end;
    align-self: center;
    margin: 0;
    padding: 0;
    border-top: 0;
    align-items: flex-end;
  }
}
.dossier-art {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #000;
}
.dossier-copy .lede { margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dossier-copy .meta { margin: 0; }
.dossier-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 10px 0 0;
}
.dossier-facts div { min-width: 8rem; }
.dossier-facts dt {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dossier-facts dd { margin: 2px 0 0; font-size: 0.88rem; }

/* On a canvas page the chart is the content, so the header material above it
   stays terse — every pixel here is a pixel the graph does not get. */
.canvas-page .dossier {
  gap: 14px;
  padding: 10px var(--gutter) 8px;
}
.canvas-page .dossier-art { width: 64px; height: 86px; }
.canvas-page .dossier-copy .lede { -webkit-line-clamp: 1; margin-bottom: 4px; }
.canvas-page h1 { font-size: 1.6rem; margin-bottom: 2px; }
.canvas-page .view-tabs { padding: 8px var(--gutter); }

.view-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px var(--gutter);
}
.view-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.view-tab.is-active {
  background: var(--gold);
  color: #1a1408;
  border-color: var(--gold);
}
.tab-panel[hidden] { display: none !important; }
.viz-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* The graph tab owns the viewport, so the other tabs scroll inside it. */
.page-sheet {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px var(--gutter) 48px;
}

.viz-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(16, 19, 26, 0.96), rgba(7, 8, 12, 0.94));
  border-top: 1px solid var(--line);
}
.graph-toolbar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px var(--gutter);
  z-index: 5;
}
.toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.search-inline { flex: 1 1 140px; min-width: 0; }
.search-inline input { width: 100%; min-width: 0; }
.toolbar-inline { flex: 0 1 auto; min-width: 0; }
.toolbar-inline select { max-width: 100%; }
.toolbar-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
}
.filter-badge[hidden] { display: none; }

/* A drawer over the stage, so opening the filters never shrinks the graph. */
.graph-panel {
  position: absolute;
  top: calc(100% - 4px);
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
  max-height: 62dvh;
  padding: 14px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 13, 19, 0.97);
  backdrop-filter: blur(12px);
}
.graph-panel[hidden] { display: none; }
.graph-toolbar .toolbar-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.toolbar-label,
.graph-toolbar legend {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.toolbar-field select { min-width: 9.5rem; max-width: 100%; }
.graph-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.graph-control {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--ink);
  border-color: var(--line);
  font-size: 0.76rem;
  font-weight: 500;
  transition:
    color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.graph-control:hover:not(:disabled) {
  color: var(--paper);
  border-color: rgba(212, 176, 108, 0.55);
}
.graph-control.is-active {
  color: #1a1408;
  background: var(--gold);
  border-color: var(--gold);
}
.graph-control:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.graph-help {
  flex: 1 1 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}
.graph-toolbar fieldset { border: 0; padding: 0; margin: 0; display: block; }
.rel-legend { flex: 1 1 100%; min-width: 0; }
.graph-toolbar legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.link-button {
  padding: 2px 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.link-button:hover { color: var(--paper); }
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}
.filter-pill { display: block; }
.filter-pill span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.76rem;
  cursor: pointer;
}
.filter-pill strong { letter-spacing: 0.04em; }
.filter-pill em { display: none; }
.filter-pill span::before,
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--swatch);
  display: inline-block;
  flex: 0 0 auto;
}
.filter-pill span::before { content: ""; }
.filter-pill input { position: absolute; opacity: 0; pointer-events: none; }
.filter-pill input:not(:checked) + span { opacity: 0.34; }
.filter-pill input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
/* Wide screens get chips sized to their label; the full wording of each
   relation lives in the tooltip and on the Relations tab. */
@media (min-width: 901px) {
  .rel-legend { flex: 1 1 340px; }
  .filter-row { display: flex; flex-wrap: wrap; }
  .filter-pill span { min-height: 34px; }
}

/* The stage takes every pixel the page chrome does not need. */
.viz-stage-wrap {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  /* minmax(0, …) stops a long relation list in the aside from stretching the
     row and pushing the chart off the bottom of the window. */
  grid-template-rows: minmax(0, 1fr);
  min-height: 340px;
}
.graph-stage {
  min-height: 0;
  height: 100%;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 50%, rgba(212, 176, 108, 0.07), transparent 42%),
    #090b10;
  border-top: 1px solid rgba(244, 234, 216, 0.06);
}
.graph-stage.is-dragging { cursor: grabbing; }

.stage-controls {
  position: absolute;
  top: 12px;
  right: 292px;
  display: grid;
  gap: 6px;
  z-index: 3;
}
.stage-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 21, 28, 0.86);
  color: var(--paper);
  backdrop-filter: blur(6px);
}
.stage-control svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.stage-control:hover { color: var(--gold); border-color: var(--gold); }

.graph-aside {
  position: relative;
  min-height: 0;
  padding: 14px 16px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  border-left: 1px solid var(--line);
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(8, 9, 13, 0.55);
}
.graph-aside h2 { font-size: 1.2rem; margin: 0 0 2px; }
.graph-aside img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.aside-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 34px;
}
.aside-head .eyebrow { margin: 0 0 2px; }
.aside-count { margin: 0; font-size: 0.82rem; }
.aside-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1408;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}
.aside-cta:hover { color: #1a1408; background: #e6c07a; }
.aside-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 21, 28, 0.9);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}
.aside-close:hover { color: var(--paper); border-color: var(--gold); }

.rel-groups { display: grid; gap: 16px; }
.rel-group {
  border: 1px solid var(--line);
  background: var(--panel);
}
.rel-group .section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  letter-spacing: 0.04em;
}
.partner-list, .roster-partners {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-sheet {
  max-width: 820px;
}
.profile-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}
.profile-head img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px 18px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.profile-grid dt {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-grid dd { margin: 4px 0 0; font-size: 1rem; }
.data-table { min-width: 920px; }

.person-chip, .fixture-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 6px;
  border: 1px solid transparent;
  background: rgba(7, 8, 12, 0.45);
}
.person-chip:hover, .fixture-chip:hover { border-color: var(--gold); }
.person-chip img, .fixture-chip img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.person-chip em, .fixture-chip em, .roster-partners em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 0.74rem;
}
.is-filtered { display: none !important; }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.roster-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px;
}
.roster-head {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
}
.roster-head img { width: 72px; height: 72px; object-fit: cover; }
.roster-head em { display: block; color: var(--muted); font-style: normal; font-size: 0.78rem; }
.seed {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 0.95rem;
  min-width: 2.2rem;
}
.roster-partners { display: grid; gap: 6px; }
.cast-plain {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.cast-name {
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 6px;
  background: var(--panel);
  border: 1px solid transparent;
}
.cast-name:hover { border-color: var(--gold); }
.cast-name img { width: 36px; height: 36px; object-fit: cover; }
.partner-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding: 0 0 8px;
}
.partner-list .person-chip img, .partner-list .fixture-chip img { width: 48px; height: 48px; }

.fixtures-wrap { overflow-x: auto; margin-bottom: 40px; }
.fixtures-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.fixtures-table th, .fixtures-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(244, 234, 216, 0.08);
  text-align: left;
  vertical-align: middle;
}
.fixtures-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fixture-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.fixture-side img { width: 40px; height: 40px; object-fit: cover; }
.fixture-vs {
  text-align: center;
  color: var(--teal);
  font-size: 0.82rem;
  white-space: normal;
  max-width: 220px;
}

.relation-list {
  columns: 1;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.relation-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(244, 234, 216, 0.08);
  font-size: 0.88rem;
}
.rel-kind { color: var(--muted); font-size: 0.76rem; margin-right: 6px; }
.rel-kind::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 99px;
  background: var(--swatch, var(--teal));
}

.prose-page { max-width: 68ch; padding: 28px 0 64px; }
.prose-page p,
.prose-page li { color: var(--muted); }
.prose-page h1 { margin: 0 0 18px; }
.prose-page h2 {
  margin: 32px 0 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--paper);
}
.prose-page h3 {
  margin: 22px 0 8px;
  font-size: 1.02rem;
  color: var(--paper);
}
.prose-page ul { padding-left: 1.2em; margin: 8px 0 18px; }
.prose-page li { margin: 6px 0; }
.prose-page a { color: var(--gold); }
.contact-form {
  display: grid;
  gap: 14px;
  margin: 16px 0 28px;
}
.contact-form label { display: grid; gap: 6px; color: var(--paper); font-size: 0.9rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--paper);
  font: inherit;
}
.contact-form button {
  justify-self: start;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: var(--void);
  font-weight: 600;
  cursor: pointer;
}
.empty-state { max-width: 40ch; padding: 12vh 0; }
code { font-family: ui-monospace, monospace; color: var(--gold); font-size: 0.86em; }

@media (max-width: 900px) {
  .dossier { grid-template-columns: 72px 1fr; }
  .dossier-art { width: 72px; height: 96px; }
  .viz-stage-wrap { grid-template-columns: 1fr; overflow: hidden; }
  .stage-controls { right: 12px; }
  .graph-aside {
    position: absolute;
    inset: auto 0 0 0;
    max-height: 46%;
    border-left: 0;
    border-top: 1px solid var(--line);
    background: rgba(9, 11, 16, 0.97);
    backdrop-filter: blur(10px);
    transform: translateY(101%);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 4;
  }
  .viz-stage-wrap.has-selection .graph-aside { transform: translateY(0); }
  .roster-head, .profile-head { grid-template-columns: auto 56px 1fr; }
  .profile-head { grid-template-columns: 72px 1fr; }
  .profile-head img { width: 72px; height: 72px; }
  .is-page h1 { max-width: none; }
}

/* Every pixel of chrome above the stage is a pixel of graph the reader loses. */
@media (max-width: 700px) {
  .is-canvas .site-header {
    gap: 8px 10px;
    padding: 8px var(--gutter);
    min-height: 0;
  }
  .is-canvas .header-search { display: none; }
  .is-canvas .wordmark { font-size: 1.05rem; }
  .is-canvas .site-nav { gap: 4px; }
  .is-canvas .site-nav a { padding: 5px 10px; font-size: 0.7rem; letter-spacing: 0.09em; }
  .canvas-page .dossier { grid-template-columns: 56px 1fr; gap: 12px; padding: 10px var(--gutter) 8px; }
  .canvas-page .dossier-art { width: 56px; height: 76px; }
  .canvas-page .dossier-copy .lede { display: none; }
  .canvas-page h1 { font-size: 1.3rem; margin-bottom: 4px; }
  .canvas-page .eyebrow { margin-bottom: 4px; }
  .view-tabs { padding: 8px var(--gutter); }
  .view-tab { padding: 7px 12px; }
  .graph-toolbar { padding: 8px var(--gutter); gap: 8px; }
  /* One row, always: a wrapped toolbar costs the graph a whole line of height. */
  .toolbar-main { flex-wrap: nowrap; gap: 6px; }
  .search-inline { flex: 1 1 70px; }
  .search-inline input { padding: 9px 12px; font-size: 0.82rem; }
  .toolbar-inline select { min-width: 0; padding: 9px 24px 9px 10px; font-size: 0.78rem; }
  .toolbar-toggle { padding: 8px 10px; font-size: 0.74rem; }
  .is-canvas .site-footer { padding: 8px var(--gutter) 10px; font-size: 0.7rem; line-height: 1.4; }
  .is-canvas .site-footer p { margin: 2px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .graph-control { transition: none; }
  .graph-aside { transition: none; }
}

.make-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.make-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  user-select: none;
}
.make-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px var(--gutter);
}
.make-hint { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.make-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.make-types {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.make-type,
.make-erase,
.make-chip,
.make-erase-menu button {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.make-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.make-type.is-active { border-color: var(--gold); color: var(--gold); }
.make-type i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.make-erase-wrap { position: relative; flex: none; }
.make-erase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.make-erase svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.make-erase.is-active {
  background: var(--danger);
  border-color: var(--danger);
  color: #1a1408;
}
.make-erase-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: min(240px, calc(100vw - 32px));
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.make-erase-menu[hidden] { display: none; }
.make-erase-menu p { margin: 0 0 10px; color: var(--muted); font-size: 0.82rem; }
.make-erase-menu button {
  width: 100%;
  padding: 8px 12px;
  border-color: var(--danger);
  font-size: 0.82rem;
}
.make-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.make-pool-wrap {
  min-height: 0;
  overflow: auto;
  padding: 10px;
  background: var(--void);
  overscroll-behavior: contain;
}
.make-search {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  background: var(--void);
}
.make-search input { width: 100%; margin: 0; }
.make-pool { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.make-chip {
  width: 72px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
  touch-action: pan-y;
  cursor: grab;
}
.make-chip img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--paper);
  display: block;
  pointer-events: none;
}
.make-chip span, .make-node > span {
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}
.make-chip span { pointer-events: none; }
.make-portrait {
  display: block;
  border-radius: 50%;
  border: 2px solid var(--paper);
}
.make-chip .make-portrait { width: 56px; height: 56px; }
.make-face .make-portrait { width: 68px; height: 68px; }
.make-stage {
  position: relative;
  z-index: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(212, 176, 108, 0.08), transparent 46%),
    linear-gradient(rgba(244, 234, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 234, 216, 0.035) 1px, transparent 1px),
    #090b10;
  background-size: auto, 32px 32px, 32px 32px, auto;
}
.make-stage.is-over { outline: 2px solid var(--gold); outline-offset: -2px; }
.make-stage.is-drawing,
.make-stage.is-drawing .make-face { cursor: crosshair; }
.make-stage.is-erasing .make-face,
.make-stage.is-erasing .make-label { cursor: pointer; }
.make-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}
.make-empty[hidden] { display: none; }
.make-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.make-svg .make-line { stroke-width: 2.5; stroke-linecap: round; pointer-events: none; }
.make-svg .make-hit { stroke-width: 18; pointer-events: none; }
.make-stage.is-erasing .make-hit { pointer-events: stroke; }
.make-svg .make-rubber { stroke-dasharray: 6 5; stroke-width: 2.5; stroke-linecap: round; pointer-events: none; }
.make-nodes, .make-labels { position: absolute; inset: 0; pointer-events: none; }
.make-nodes { z-index: 3; }
.make-labels { z-index: 2; }
.make-node {
  position: absolute;
  width: 92px;
  transform: translate(-50%, -34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.make-node.is-dragging { z-index: 4; }
.make-face {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
  pointer-events: auto;
}
.make-node.is-dragging .make-face { cursor: grabbing; }
.make-face img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--paper);
  display: block;
  pointer-events: none;
  transition: box-shadow 0.12s ease;
}
.make-node.is-armed .make-face img { box-shadow: 0 0 0 3px var(--gold); }
.make-node.is-target .make-face img { box-shadow: 0 0 0 3px var(--teal); }
.make-stage.is-erasing .make-face img { box-shadow: 0 0 0 2px var(--danger); }
.make-stage.is-erasing .make-plus { display: none; }
.make-plus {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid #090b10;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1408;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  touch-action: none;
  cursor: crosshair;
}
.make-plus svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.make-plus:hover,
.make-plus:focus-visible { color: #1a1408; }
.make-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #090b10;
  pointer-events: auto;
  cursor: text;
}
.make-label span {
  min-width: 3ch;
  font-size: 0.75rem;
  font-weight: 700;
  outline: none;
  user-select: text;
  pointer-events: auto;
}
.make-stage.is-erasing .make-label {
  border-color: var(--danger);
  cursor: pointer;
}
.make-ghost {
  position: fixed;
  z-index: 40;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  pointer-events: none;
}
@media (max-width: 800px) {
  .make-layout { grid-template-columns: 1fr; grid-template-rows: 168px minmax(280px, 1fr); }
  .make-pool-wrap { border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .make-face img { transition: none; }
}
