:root {
  --ink: rgba(17, 17, 17, 0.88);
  --ink-soft: rgba(17, 17, 17, 0.64);
  --ink-muted: rgba(17, 17, 17, 0.45);
  --line: rgba(17, 17, 17, 0.18);
  --line-soft: rgba(17, 17, 17, 0.08);
  --paper: #fbfbfc;
  --panel: rgba(255, 255, 255, 0.74);
  --label-bg: rgba(17, 17, 17, 0.045);
  --female: rgba(17, 17, 17, 0.9);
  --male: rgba(17, 17, 17, 0.7);
  --neutral: rgba(17, 17, 17, 0.45);
  --bg: #f2f3f5;
  --header-bg: rgba(242, 243, 245, 0.92);
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Noto Serif JP", serif;
  --phase-0: rgba(217, 190, 113, 0.16);
  --phase-1: rgba(103, 197, 163, 0.14);
  --phase-2: rgba(174, 132, 222, 0.14);
  --phase-0-strong: rgba(217, 190, 113, 0.34);
  --phase-1-strong: rgba(103, 197, 163, 0.3);
  --phase-2-strong: rgba(174, 132, 222, 0.3);
  --max: 1320px;
}

body[data-theme="dark"] {
  --ink: rgba(246, 246, 241, 0.92);
  --ink-soft: rgba(246, 246, 241, 0.68);
  --ink-muted: rgba(246, 246, 241, 0.46);
  --line: rgba(246, 246, 241, 0.2);
  --line-soft: rgba(246, 246, 241, 0.09);
  --paper: #17191c;
  --panel: rgba(255, 255, 255, 0.055);
  --label-bg: rgba(246, 246, 241, 0.08);
  --female: rgba(255, 255, 255, 0.95);
  --male: rgba(255, 255, 255, 0.62);
  --neutral: rgba(255, 255, 255, 0.42);
  --bg: #101114;
  --header-bg: rgba(16, 17, 20, 0.92);
  --phase-0: rgba(217, 190, 113, 0.13);
  --phase-1: rgba(103, 197, 163, 0.12);
  --phase-2: rgba(174, 132, 222, 0.13);
  --phase-0-strong: rgba(217, 190, 113, 0.25);
  --phase-1-strong: rgba(103, 197, 163, 0.23);
  --phase-2-strong: rgba(174, 132, 222, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  transition: background 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  padding: 18px 32px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}

.system-name {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 650;
}

.system-subtitle {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  padding: 5px 9px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

.nav a.active,
.nav a:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--label-bg);
}

main {
  width: min(var(--max), calc(100vw - 42px));
  margin: 0 auto;
  padding: 54px 0 90px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-head {
  max-width: 920px;
  margin-bottom: 34px;
}

.page-head.compact {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.32;
  letter-spacing: 0;
  font-weight: 680;
  font-family: var(--serif);
}

.profile-title,
.metric .value {
  font-family: var(--serif);
}

.lede {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.lede.narrow {
  max-width: 660px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 36px;
}

.metrics-grid.compact-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  min-height: 112px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.metric .value {
  display: block;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 680;
}

.metric .label {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.metric .sub {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.section-grid {
  display: grid;
  gap: 14px;
}

.home-grid {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.chart-panel,
.note-panel {
  min-height: 440px;
}

.note-panel {
  padding: 14px;
}

.section-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.4;
}

.section-label-loose {
  border: 0;
  padding: 0 0 10px;
}

.module-section {
  margin: 18px 0 36px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink-soft);
  background: var(--label-bg);
}

.module-index {
  color: var(--ink-muted);
  font-size: 11px;
}

.module-card strong {
  display: block;
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.28;
  font-weight: 560;
}

.module-card span:not(.module-index) {
  display: block;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.module-card em {
  display: block;
  margin-top: 22px;
  color: var(--ink);
  font-style: normal;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.note-panel p {
  margin: 16px 0 20px;
  color: var(--ink-soft);
}

.method-list {
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.method-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.method-list dt {
  color: var(--ink-muted);
  font-size: 11px;
}

.method-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.chart-wrap {
  position: relative;
  min-height: 390px;
  padding: 14px;
}

.chart-wrap.tall {
  min-height: 560px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.axis text,
.chart-caption {
  fill: var(--ink-muted);
  font-size: 11px;
}

.grid-line {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.axis-line {
  stroke: var(--ink-soft);
  stroke-width: 1;
}

.line-female {
  fill: none;
  stroke: var(--female);
  stroke-width: 2.2;
}

.line-rolling {
  fill: none;
  stroke: var(--neutral);
  stroke-width: 3.2;
}

.line-neutral {
  fill: none;
  stroke: var(--male);
  stroke-width: 2;
}

.dot {
  fill: var(--female);
  opacity: 0.9;
}

.dot.zero {
  fill: var(--ink-muted);
  opacity: 0.45;
}

.bar-female {
  fill: var(--female);
}

.bar-male {
  fill: var(--male);
  opacity: 0.6;
}

.phase-band {
  fill: rgba(17, 17, 17, 0.025);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 10px 0 14px;
}

.segmented,
.filter-row,
.mini-segmented {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.segmented button,
.filter-row button,
.mini-segmented button {
  border: 0;
  border-right: 1px solid var(--line-soft);
  padding: 7px 11px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
}

.segmented button:last-child,
.filter-row button:last-child,
.mini-segmented button:last-child {
  border-right: 0;
}

.segmented button.active,
.filter-row button.active,
.mini-segmented button.active {
  color: var(--bg);
  background: var(--ink);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.phase-note {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.phase-note strong {
  display: block;
  margin-bottom: 4px;
}

.phase-note span,
.phase-note p {
  color: var(--ink-muted);
  font-size: 12px;
}

.phase-note p {
  margin: 8px 0 0;
}

.rank-list {
  border-top: 1px solid var(--line);
}

.rank-row {
  display: grid;
  grid-template-columns: 56px minmax(160px, 1.1fr) minmax(220px, 1.6fr) minmax(180px, 1fr);
  gap: 18px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.rank-number {
  color: var(--ink-muted);
  font-size: 12px;
}

.rank-name {
  font-weight: 650;
}

.rank-note,
.rank-meta {
  color: var(--ink-soft);
  font-size: 12px;
}

.sparkline {
  width: 100%;
  height: 34px;
  margin-top: 8px;
}

.explorer-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.explorer-list,
.profile-panel {
  min-height: 650px;
}

.explorer-list {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: hidden;
  padding: 14px;
}

.search-label {
  display: block;
  color: var(--ink-muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 9px 10px;
  color: var(--ink);
  outline: none;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-input:focus {
  border-color: var(--ink-soft);
}

.filter-row {
  margin: 10px 0 12px;
}

.photographer-list {
  max-height: calc(100vh - 245px);
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

.person-button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  padding: 10px 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.person-button.active .person-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.person-name {
  font-size: 12px;
  font-weight: 600;
}

.person-note,
.person-count {
  color: var(--ink-muted);
  font-size: 11px;
}

.profile-panel {
  padding: 22px;
}

.profile-kicker {
  color: var(--ink-muted);
  font-size: 11px;
}

.profile-title {
  margin: 4px 0 10px;
  font-size: 30px;
  line-height: 1.35;
}

.profile-timeline {
  width: 100%;
  height: auto;
  margin: 12px 0 4px;
}

.profile-timeline text {
  fill: var(--ink-muted);
  font-size: 11px;
}

.timeline-axis,
.spark-axis {
  stroke: var(--line);
}

.profile-dots,
.spark-dots {
  fill: var(--male);
}

.profile-dots.female,
.spark-dots {
  fill: var(--female);
}

.spark-dot {
  fill: var(--accent);
  stroke: var(--ink);
  stroke-width: 0.8;
}

.spark-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: var(--label-bg);
  color: var(--ink-soft);
  font-size: 11px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.profile-stat {
  padding: 12px;
  border: 1px solid var(--line-soft);
}

.profile-stat strong {
  display: block;
  font-size: 22px;
}

.profile-stat span {
  color: var(--ink-muted);
  font-size: 11px;
}

.timeline {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.timeline-row {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.timeline-row .issue {
  font-weight: 650;
}

.timeline-row .date,
.timeline-row .pages {
  color: var(--ink-muted);
}

.tooltip {
  position: fixed;
  z-index: 60;
  max-width: 280px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 42px;
  align-items: start;
  min-height: 260px;
  margin: 16px 0 12px;
}

.hero-copy h1 {
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.25;
}

.hero-number {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 62px);
  line-height: 1.05;
  font-weight: 680;
  letter-spacing: 0;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 34px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.45;
}

.hero-metrics strong {
  font-weight: 520;
}

.project-stamp {
  justify-self: end;
  text-align: right;
  font-family: var(--serif);
  font-size: clamp(22px, 3.6vw, 32px);
  font-weight: 680;
  line-height: 1.12;
}

.project-stamp span {
  display: inline-block;
  margin: 2px 0;
  padding: 0 7px 3px;
  color: var(--bg);
  background: var(--ink);
}

.research-chart {
  margin-top: 16px;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}

.chart-heading h2 {
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 680;
}

.chart-tabs {
  max-width: 100%;
  flex-wrap: wrap;
}

.chart-tabs button {
  min-height: 36px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-size: 11px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--neutral);
}

.legend-swatch.line-female,
.legend-swatch.bar-female {
  background: var(--female);
}

.legend-swatch.line-rolling {
  height: 3px;
  background: var(--neutral);
}

.legend-swatch.line-benchmark {
  border-top: 1px dashed var(--ink-muted);
  background: transparent;
}

.legend-swatch.bar-male {
  height: 8px;
  background: var(--male);
  opacity: 0.6;
}

.legend-swatch.phase {
  height: 8px;
  background: linear-gradient(90deg, var(--phase-0), var(--phase-1), var(--phase-2));
}

.chart-frame {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
}

body[data-theme="dark"] .chart-frame {
  background: rgba(255, 255, 255, 0.03);
}

.chart-wrap {
  padding: 26px 34px 20px;
}

.chart-wrap.tall {
  min-height: 580px;
}

.benchmark-line {
  stroke: var(--ink-muted);
  stroke-width: 1.2;
  stroke-dasharray: 6 5;
}

.phase-band {
  opacity: 0.62;
  transition: opacity 140ms ease, fill 140ms ease;
}

.phase-band.phase-0 {
  fill: var(--phase-0);
}

.phase-band.phase-1 {
  fill: var(--phase-1);
}

.phase-band.phase-2 {
  fill: var(--phase-2);
}

.chart-wrap[data-active-phase="0"] .phase-band.phase-0,
.chart-wrap[data-active-phase="1"] .phase-band.phase-1,
.chart-wrap[data-active-phase="2"] .phase-band.phase-2 {
  opacity: 1;
}

.chart-wrap[data-active-phase="0"] .phase-band.phase-0 {
  fill: var(--phase-0-strong);
}

.chart-wrap[data-active-phase="1"] .phase-band.phase-1 {
  fill: var(--phase-1-strong);
}

.chart-wrap[data-active-phase="2"] .phase-band.phase-2 {
  fill: var(--phase-2-strong);
}

.conclusion-card {
  display: flex;
  flex-direction: column;
  grid-template-columns: 140px minmax(220px, 0.8fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: baseline;
  margin: 18px 0 18px;
  padding: 16px 0;
}

.conclusion-card span {
  color: var(--ink-muted);
  font-size: 11px;
}

.conclusion-card strong {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 620;
}

.conclusion-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.phase-grid {
  gap: 30px;
  margin: 10px auto 68px;
  max-width: 970px;
}

.phase-note {
  position: relative;
  padding: 4px 0 0 18px;
  border: 0;
  background: transparent;
  cursor: default;
}

.phase-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 5px;
  height: 70px;
  background: var(--phase-0);
  transition: background 140ms ease, transform 140ms ease;
}

.phase-note.phase-1::before {
  background: var(--phase-1);
}

.phase-note.phase-2::before {
  background: var(--phase-2);
}

.phase-note.active::before,
.phase-note:hover::before {
  transform: scaleX(1.5);
}

.phase-note.phase-0.active::before,
.phase-note.phase-0:hover::before {
  background: var(--phase-0-strong);
}

.phase-note.phase-1.active::before,
.phase-note.phase-1:hover::before {
  background: var(--phase-1-strong);
}

.phase-note.phase-2.active::before,
.phase-note.phase-2:hover::before {
  background: var(--phase-2-strong);
}

.home-lower-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(0, 1.72fr);
  gap: 32px;
  align-items: stretch;
}

.home-lower-grid .module-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.home-lower-grid .module-card {
  min-height: 150px;
  padding: 28px 34px;
}

.home-lower-grid .module-card strong {
  margin-top: 0;
  font-size: 29px;
}

.home-lower-grid .module-card span {
  max-width: 620px;
}

.site-footer {
  width: min(var(--max), calc(100vw - 42px));
  margin: 0 auto 30px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 28px;
  color: var(--ink-soft);
  font-size: 12px;
}

.site-footer p {
  margin: 0 0 5px;
}

.footer-logo-slot {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.footer-logo-slot img:not([hidden]) {
  display: block;
  width: 180px;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.footer-logo-slot img:not([hidden]) + span {
  display: none;
}

.site-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.control-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 11px;
}

.mini-segmented button {
  padding: 5px 8px;
  font-size: 11px;
}

@media (max-width: 900px) {
  .site-header,
  .toolbar {
    display: block;
  }

  .nav {
    justify-content: flex-start;
    margin-top: 12px;
  }

  main {
    width: min(100vw - 28px, var(--max));
    padding-top: 34px;
  }

  .metrics-grid,
  .metrics-grid.compact-metrics,
  .module-grid,
  .home-grid,
  .phase-grid,
  .explorer-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .explorer-list {
    position: relative;
    top: auto;
    max-height: none;
  }

  .photographer-list {
    max-height: 360px;
  }

  .rank-row,
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .module-card {
    min-height: 156px;
  }

  .site-footer {
    width: min(100vw - 28px, var(--max));
    display: block;
  }

  .footer-controls {
    justify-content: flex-start;
    margin-top: 16px;
  }
}

/* Exhibition redesign layer */
:root {
  --paper: #f7f4ee;
  --bg: #e9e6df;
  --panel: rgba(255, 252, 245, 0.78);
  --ink: rgba(12, 12, 11, 0.94);
  --ink-soft: rgba(12, 12, 11, 0.68);
  --ink-muted: rgba(12, 12, 11, 0.44);
  --line: rgba(12, 12, 11, 0.24);
  --line-soft: rgba(12, 12, 11, 0.1);
  --header-bg: rgba(247, 244, 238, 0.82);
  --accent: #e3203d;
  --accent-2: #c9ff28;
  --accent-3: #11100e;
  --female: #e3203d;
  --male: rgba(12, 12, 11, 0.76);
  --neutral: rgba(12, 12, 11, 0.38);
  --phase-0: rgba(227, 32, 61, 0.12);
  --phase-1: rgba(180, 226, 76, 0.18);
  --phase-2: rgba(12, 12, 11, 0.08);
  --phase-0-strong: rgba(227, 32, 61, 0.16);
  --phase-1-strong: rgba(180, 226, 76, 0.22);
  --phase-2-strong: rgba(12, 12, 11, 0.08);
}

body[data-theme="dark"] {
  --paper: #12110f;
  --bg: #080807;
  --panel: rgba(255, 250, 238, 0.06);
  --ink: rgba(255, 251, 241, 0.94);
  --ink-soft: rgba(255, 251, 241, 0.7);
  --ink-muted: rgba(255, 251, 241, 0.46);
  --line: rgba(255, 251, 241, 0.22);
  --line-soft: rgba(255, 251, 241, 0.1);
  --header-bg: rgba(8, 8, 7, 0.84);
  --female: #ff405c;
  --male: rgba(255, 251, 241, 0.72);
  --neutral: rgba(255, 251, 241, 0.42);
}

body {
  background:
    linear-gradient(90deg, rgba(12, 12, 11, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 12, 11, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 520px),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(0deg, rgba(12, 12, 11, 0.09) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 5px);
  mix-blend-mode: multiply;
}

body[data-theme="dark"]::before {
  opacity: 0.16;
  mix-blend-mode: screen;
}

.site-header {
  align-items: center;
  padding: 13px 32px 12px;
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.system-name {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.system-subtitle,
.eyebrow,
.section-label,
.profile-kicker,
.control-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav a,
.segmented button,
.filter-row button,
.mini-segmented button {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav a.active,
.nav a:hover,
.segmented button.active,
.filter-row button.active,
.mini-segmented button.active {
  background: var(--accent);
  color: #fff8ef;
  border-color: var(--accent);
}

main {
  padding-top: 0;
}

.view:not(#home) {
  padding-top: 34px;
}

.view.active {
  animation: viewIn 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-grid {
  position: relative;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.64fr);
  min-height: calc(100svh - 58px);
  max-height: calc(100svh - 58px);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  margin: 0 0 42px;
  padding: clamp(16px, 3vh, 32px) 0 clamp(16px, 3vh, 32px);
}

.hero-grid::before {
  content: "VISIBLE / INVISIBLE";
  position: absolute;
  right: 0;
  bottom: 14px;
  z-index: -1;
  color: rgba(12, 12, 11, 0.055);
  font-family: var(--serif);
  font-size: clamp(52px, 11vw, 150px);
  font-weight: 680;
  line-height: 0.8;
  white-space: nowrap;
}

body[data-theme="dark"] .hero-grid::before {
  color: rgba(255, 251, 241, 0.045);
}

.hero-copy {
  max-width: 720px;
}

.hero-copy .eyebrow {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.hero-copy h1 {
  margin-top: 14px;
  font-size: clamp(24px, 3.35vw, 46px);
  line-height: 1.08;
}

.hero-number {
  position: relative;
  display: inline-block;
  margin: 4px 0 2px;
  color: var(--accent);
  font-size: clamp(72px, 14.4vw, 188px);
  line-height: 0.84;
  letter-spacing: -0.02em;
  text-shadow: 0.025em 0.025em 0 var(--ink);
}

.hero-number::after {
  content: "";
  position: absolute;
  left: 1%;
  right: 2%;
  bottom: 0.08em;
  height: 0.12em;
  z-index: -1;
  background: var(--accent-2);
}

.hero-definition {
  max-width: none;
  margin: 10px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(14px, 1.25vw, 19px);
  line-height: 1.35;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.action-link.primary {
  background: var(--accent);
  color: #fff8ef;
  border-color: var(--accent);
}

.action-link.subtle {
  background: transparent;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 1px;
  max-width: 680px;
  margin-top: 22px;
  background: var(--ink);
  color: var(--ink);
  font-family: inherit;
}

.hero-metrics span {
  display: grid;
  align-content: space-between;
  min-height: 70px;
  padding: 10px;
  background: var(--paper);
  font-size: 11px;
  line-height: 1.35;
}

.hero-metrics strong {
  display: block;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 31px);
  line-height: 1;
}

.hero-artifact {
  position: relative;
  justify-self: end;
  width: min(100%, 322px);
  transform: rotate(1.2deg);
}

.hero-artifact::before,
.hero-artifact::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.hero-artifact::before {
  left: -18px;
  top: 34px;
  width: 82px;
  height: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(12, 12, 11, 0.16);
  transform: rotate(-7deg);
}

.hero-artifact::after {
  content: "ARCHIVE EVIDENCE";
  right: -18px;
  top: 44%;
  padding: 5px 8px;
  background: var(--accent);
  color: #fff8ef;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.1em;
  transform: rotate(90deg);
  transform-origin: right top;
}

.artifact-image-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 14px 14px 0 var(--ink);
}

.artifact-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 68%, rgba(12, 12, 11, 0.58) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.artifact-image-wrap img {
  display: block;
  width: 100%;
  filter: grayscale(1) contrast(1.18);
}

.artifact-caption {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding-left: 18px;
  border-left: 5px solid var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.artifact-caption strong {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.artifact-caption em {
  color: var(--ink-muted);
  font-style: normal;
}

.chart-intro {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(420px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px 0 16px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.chart-intro h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 7vw, 96px);
  line-height: 0.78;
  color: var(--accent);
  text-shadow: 0.035em 0.035em 0 var(--ink);
}

.chart-intro h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: -0.08em;
  bottom: 0.02em;
  z-index: -1;
  height: 0.16em;
  background: var(--accent-2);
}

.chart-controls {
  display: flex;
  justify-content: flex-end;
  justify-items: end;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.chart-controls .segmented {
  display: flex;
  justify-content: flex-end;
  gap: 0;
  align-items: center;
  padding: 0;
}

.chart-frame {
  position: relative;
  overflow: hidden;
  border-color: var(--line);
  margin-top: 16px;
  background:
    linear-gradient(90deg, rgba(12, 12, 11, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 12, 11, 0.055) 1px, transparent 1px),
    rgba(255, 252, 245, 0.82);
  background-size: 22px 22px;
  box-shadow: 3px 3px 0 rgba(12, 12, 11, 0.28);
}

.chart-wrap {
  overflow-x: auto;
  scrollbar-color: var(--accent) transparent;
  background: transparent;
}

.chart-wrap svg {
  min-width: 980px;
}

.line-female,
.line-rolling,
.line-neutral,
.spark-path {
  stroke-linecap: square;
  stroke-linejoin: round;
}

.chart-wrap .line-female,
.chart-wrap .line-rolling {
  animation: none;
  stroke-dasharray: none;
}

.benchmark-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.grid-line {
  stroke: rgba(12, 12, 11, 0.16);
  stroke-dasharray: 2 5;
}

.issue-grid-line {
  stroke: rgba(12, 12, 11, 0.07);
  stroke-width: 1;
}

.axis-line,
.axis-tick {
  stroke: var(--ink);
  stroke-width: 1.3;
}

.axis text {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.phase-band {
  mix-blend-mode: multiply;
  opacity: 0.34;
}

.line-area {
  fill: rgba(227, 32, 61, 0.055);
}

.stem {
  stroke: rgba(227, 32, 61, 0.34);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.stem.zero {
  stroke: rgba(12, 12, 11, 0.16);
}

.line-female {
  stroke: var(--accent);
  stroke-width: 2.6;
  filter: drop-shadow(1px 1px 0 rgba(12, 12, 11, 0.32));
}

.line-rolling {
  stroke: var(--accent-2);
  stroke-width: 3.8;
  opacity: 0.95;
  mix-blend-mode: multiply;
}

.benchmark-line {
  stroke: var(--accent-2);
  stroke-width: 2.2;
  stroke-dasharray: 8 6;
}

.benchmark-label {
  fill: var(--accent-2);
  paint-order: stroke;
  stroke: var(--ink);
  stroke-width: 3px;
}

.dot-halo {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.4;
}

.dot {
  fill: var(--accent);
  stroke: var(--ink);
  stroke-width: 0.9;
}

.dot.zero {
  fill: var(--ink);
  opacity: 0.52;
}

.data-point {
  cursor: crosshair;
}

.data-point:hover .dot-halo {
  fill: var(--accent-2);
}

.dot,
.bar-female,
.bar-male,
.bar-cap {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: markIn 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.bar-male {
  fill: var(--ink);
  opacity: 0.88;
}

.bar-female {
  fill: var(--accent);
  opacity: 1;
}

.bar-cap {
  fill: var(--accent-2);
}

.chart-wrap g[data-issue]:hover .bar-male {
  opacity: 1;
}

.chart-wrap g[data-issue]:hover .bar-cap,
.chart-wrap g[data-issue]:hover .bar-female {
  filter: drop-shadow(2px 0 0 var(--ink));
}

.conclusion-card {
  display: none;
  max-width: none;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 24px;
  margin: 16px 0 10px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 0;
  align-items: start;
}

.conclusion-card strong {
  color: var(--accent);
  font-size: clamp(21px, 2.4vw, 32px);
  line-height: 1.18;
}

.conclusion-card p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}

.chart-legend {
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--ink);
}

.chart-footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.chart-footer-row p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.chart-legend span {
  min-height: 30px;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chart-legend span::before {
  content: attr(data-legend-index);
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
}

.legend-swatch {
  width: 26px;
  background: var(--ink);
}

.legend-swatch.line-female,
.legend-swatch.bar-female {
  background: var(--accent);
}

.legend-swatch.line-rolling,
.legend-swatch.line-benchmark {
  height: 4px;
  background: var(--accent-2);
}

.legend-swatch.phase {
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, var(--phase-0-strong), var(--phase-1-strong), var(--phase-2-strong));
}

.phase-grid {
  max-width: none;
  border-top: 0;
  padding-top: 0;
  margin-top: 14px;
}

.module-card,
.phase-note,
.rank-row,
.person-button,
.profile-stat,
.timeline-row {
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.module-card {
  border-color: var(--ink);
  background: var(--paper);
}

.module-card:hover {
  background: var(--accent);
  color: #fff8ef;
  transform: translateY(-5px);
}

.module-card:hover span,
.module-card:hover .module-index,
.module-card:hover em,
.module-card:hover .module-preview,
.home-lower-grid .module-card:hover strong {
  color: #fff8ef;
}

.module-preview {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}

.home-lower-grid .module-card strong {
  color: var(--accent);
}

.insight-summary {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
}

.insight-summary ol {
  margin: 0;
  padding-left: 18px;
}

.panel,
.profile-panel,
.explorer-list {
  border-color: var(--ink);
  background: rgba(255, 252, 245, 0.82);
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .profile-panel,
body[data-theme="dark"] .explorer-list,
body[data-theme="dark"] .chart-frame {
  background: rgba(18, 17, 15, 0.86);
}

.rank-list {
  border-top: 2px solid var(--ink);
}

.rank-header {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr) minmax(220px, 1.35fr) minmax(180px, 0.8fr);
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rank-header em {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.rank-row {
  grid-template-columns: 72px minmax(180px, 1fr) minmax(220px, 1.35fr) minmax(180px, 0.8fr);
  padding: 19px 0;
  cursor: pointer;
}

.rank-row:hover {
  background: rgba(227, 32, 61, 0.08);
  transform: translateX(4px);
}

.rank-number {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.rank-name,
.profile-title {
  color: var(--ink);
  font-size: 18px;
}

.explorer-layout {
  gap: 22px;
}

.search-input {
  border-color: var(--ink);
  background: var(--paper);
  border-radius: 0;
}

.sort-label {
  margin-top: 12px;
}

.sort-select {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}

.person-button:hover,
.person-button.active {
  background: var(--ink);
  color: var(--paper);
  padding-left: 10px;
  padding-right: 10px;
}

.person-button:hover .person-note,
.person-button:hover .person-count,
.person-button.active .person-note,
.person-button.active .person-count {
  color: rgba(255, 248, 239, 0.68);
}

.profile-title {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.96;
}

.profile-empty {
  min-height: 460px;
  display: grid;
  align-content: center;
  max-width: 520px;
}

.profile-empty h2 {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.profile-empty p:last-child {
  color: var(--ink-soft);
}

.timeline-note {
  margin: 6px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.timeline-head {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill {
  border-color: var(--ink);
  border-radius: 0;
}

.profile-stat {
  border-color: var(--ink);
  background: var(--paper);
}

.profile-stat strong {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 34px;
}

.tooltip {
  border-color: var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.method-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.method-card span {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 28px;
}

.method-card h2 {
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
}

.method-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  from {
    stroke-dashoffset: 1400;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes markIn {
  from {
    opacity: 0;
    transform: scaleY(0.15);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 12px 14px;
  }

  main {
    width: min(100vw - 24px, var(--max));
    padding-top: 0;
  }

  .view:not(#home) {
    padding-top: 22px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
    gap: 28px;
    margin-bottom: 34px;
    padding-top: 18px;
  }

  .hero-number {
    font-size: clamp(68px, 24vw, 118px);
    text-shadow: 0.018em 0.018em 0 var(--ink);
  }

  .hero-definition {
    white-space: normal;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-artifact {
    justify-self: start;
    width: min(82vw, 320px);
    transform: rotate(0.6deg);
  }

  .artifact-image-wrap {
    box-shadow: 10px 10px 0 var(--ink);
  }

  .chart-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .chart-intro h2 {
    font-size: 70px;
  }

  .chart-controls {
    display: block;
    gap: 12px;
  }

  .chart-footer-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chart-footer-row p {
    text-align: left;
  }

  .segmented,
  .filter-row,
  .mini-segmented {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .segmented button,
  .filter-row button,
  .mini-segmented button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .chart-wrap {
    padding: 24px 14px 14px;
  }

  .chart-wrap.tall {
    min-height: 400px;
  }

  .chart-wrap svg {
    min-width: 820px;
  }

  .conclusion-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .phase-grid,
  .home-lower-grid,
  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rank-header {
    display: none;
  }

  .rank-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px 0;
  }

  .rank-row > .rank-note,
  .rank-row > .rank-meta[title] {
    display: none;
  }

  .rank-number {
    font-size: 24px;
  }

  .rank-name {
    font-size: 16px;
    line-height: 1.25;
  }

  .sparkline {
    width: min(100%, 220px);
  }

  .home-lower-grid .module-card {
    min-height: 128px;
    padding: 20px;
  }

  .explorer-layout {
    grid-template-columns: 1fr;
  }

  .explorer-list,
  .profile-panel {
    min-height: auto;
  }

  .explorer-list {
    position: relative;
    top: auto;
  }

  .profile-title {
    font-size: 42px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: min(100vw - 24px, var(--max));
    flex-direction: column;
    gap: 18px;
  }

  .footer-controls {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
