:root {
  --ink: #161a18;
  --paper: #f2efe7;
  --paper-deep: #e8e2d7;
  --white: #fffdf8;
  --line: #bbb5a9;
  --muted: #666c67;
  --lime: #dfff45;
  --teal: #0b746a;
  --orange: #ff684f;
  --map: #111715;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Manrope, system-ui, sans-serif;
}
button, select, input { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; background: var(--lime); padding: 12px 16px; }
.skip-link:focus { top: 12px; }
.site-header, main > section, footer { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }
.site-header {
  height: 76px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 500 11px/1 "DM Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { padding: 7px 8px; color: var(--lime); background: var(--ink); }
.brand sup { color: var(--teal); }
nav { display: flex; gap: 24px; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero { padding: 36px 0 0; }
.hero-kicker { display: flex; justify-content: space-between; font: 10px "DM Mono", monospace; text-transform: uppercase; color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: 1.6fr .72fr; gap: 64px; align-items: end; padding: 72px 0 58px; }
h1 { margin: 0; font-size: clamp(60px, 8.5vw, 126px); line-height: .85; letter-spacing: -.075em; font-weight: 600; }
h1 em { color: var(--teal); font-weight: 500; }
.hero-copy { padding-bottom: 4px; }
.hero-copy p { font-size: 14px; line-height: 1.65; }
.hero-copy .lead { margin: 0 0 24px; font-size: clamp(19px, 2vw, 27px); line-height: 1.25; letter-spacing: -.025em; }
.status { display: flex; gap: 10px; align-items: center; margin-top: 30px; font: 10px "DM Mono", monospace; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #d19b00; box-shadow: 0 0 0 4px rgba(209,155,0,.15); }
.status.live .status-dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(11,116,106,.13); }
.status.error .status-dot { background: var(--orange); }
.hero-principle, .design-consequence {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.number { font: 500 12px "DM Mono", monospace; color: var(--teal); }
.hero-principle p, .design-consequence p { margin: 0; max-width: 820px; font-size: 17px; line-height: 1.55; }
.atlas-section, .field-section, .governance-section { padding-top: 100px; }
.section-heading { display: grid; grid-template-columns: 1.4fr .6fr; gap: 70px; align-items: end; margin-bottom: 34px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font: 500 10px/1.35 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
h2 { margin: 0; font-size: clamp(42px, 5vw, 76px); line-height: .95; letter-spacing: -.06em; }
.section-intro { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  background: var(--white);
}
.segmented-control { display: flex; gap: 5px; margin: 0; padding: 0; border: 0; }
.segmented-control legend, .select-control span, .attribute-controls > span { display: block; margin-bottom: 7px; color: var(--muted); font: 9px "DM Mono", monospace; text-transform: uppercase; }
.segmented-control legend { position: absolute; transform: translateY(-19px); }
.segmented-control label { cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control span, .secondary-button, .select-control select {
  min-height: 38px;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 9px 13px;
  font: 10px "DM Mono", monospace;
  text-transform: uppercase;
}
.segmented-control input:checked + span { color: var(--lime); background: var(--ink); }
.segmented-control input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.select-control select { min-width: 190px; background: var(--white); }
.secondary-button { cursor: pointer; background: var(--paper-deep); }
.secondary-button:hover { background: var(--lime); }
.secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.attribute-controls { display: flex; gap: 18px; align-items: center; padding: 14px 0 18px; }
.attribute-controls > span { margin: 0; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 6px 10px; cursor: pointer; color: var(--muted); font: 9px "DM Mono", monospace; text-transform: uppercase; }
.chip:hover, .chip.active { border-color: var(--ink); background: var(--ink); color: var(--lime); }
.atlas-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; border: 1px solid var(--ink); }
.map-panel { min-width: 0; background: var(--map); }
.style-map {
  position: relative;
  height: 650px;
  overflow: hidden;
  background-color: var(--map);
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
}
.style-map::before { content: "VISUAL FEATURE SPACE / AXES UNLABELLED"; position: absolute; left: 14px; top: 12px; color: rgba(255,255,255,.35); font: 8px "DM Mono", monospace; }
#map-nodes { position: absolute; inset: 0; }
.map-node {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  z-index: 2;
  width: 84px;
  padding: 0;
  border: 3px solid var(--node-colour);
  background: var(--ink);
  box-shadow: 0 5px 18px rgba(0,0,0,.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease, filter .2s ease;
}
.map-node img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.node-label { display: none; position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); width: max-content; max-width: 140px; padding: 4px 6px; color: var(--ink); background: var(--lime); font: 8px "DM Mono", monospace; }
.map-node:hover, .map-node:focus-visible, .map-node.selected { z-index: 9; transform: translate(-50%, -50%) scale(1.4); outline: 0; }
.map-node:hover .node-label, .map-node:focus-visible .node-label, .map-node.selected .node-label { display: block; }
.map-node.selected { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(223,255,69,.3), 0 8px 28px rgba(0,0,0,.55); }
.map-node.neighbor { z-index: 5; filter: brightness(1.15); }
.map-node.dimmed { opacity: .16; filter: grayscale(.8); }
.map-node.filtered { display: none; }
.neighbor-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.neighbor-lines line { stroke: var(--lime); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .7; }
.map-error { position: absolute; inset: 0; z-index: 12; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--white); }
.map-error[hidden] { display: none; }
.map-error span { color: #aab0ac; }
.map-footer { min-height: 92px; border-top: 1px solid #414845; padding: 13px 16px; color: #b6bcb8; }
.map-footer p { margin: 13px 0 0; font: 8px "DM Mono", monospace; text-transform: uppercase; }
.legend { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.legend span { display: flex; gap: 5px; align-items: center; font: 8px "DM Mono", monospace; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--legend-colour); }
.detail-panel { min-width: 0; border-left: 1px solid var(--ink); background: var(--white); }
.detail-empty { min-height: 650px; padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.cursor-icon { color: var(--teal); font-size: 42px; margin-bottom: 32px; }
.detail-panel h3 { margin: 0 0 16px; font-size: 30px; letter-spacing: -.04em; line-height: 1.05; }
.detail-empty > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.55; }
.detail-image img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--ink); }
.detail-content { padding: 24px; }
.descriptor-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 22px; }
.descriptor-list span { padding: 5px 7px; background: var(--lime); font: 8px "DM Mono", monospace; text-transform: uppercase; }
.metrics { display: grid; gap: 10px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-row { display: grid; grid-template-columns: 74px 1fr 30px; gap: 8px; align-items: center; font: 8px "DM Mono", monospace; text-transform: uppercase; }
.metric-row > div { height: 5px; background: var(--paper-deep); }
.metric-row i { display: block; height: 100%; background: var(--teal); }
.metric-row strong { text-align: right; font-weight: 500; }
.microcopy { margin: 10px 0 25px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.neighbors { display: grid; gap: 7px; }
.neighbor-item { display: grid; grid-template-columns: 68px 1fr; gap: 10px; padding: 0; border: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.neighbor-item:hover { border-color: var(--teal); background: var(--paper); }
.neighbor-item img { width: 68px; aspect-ratio: 16/9; object-fit: cover; }
.neighbor-item span { align-self: center; min-width: 0; }
.neighbor-item strong, .neighbor-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neighbor-item strong { font-size: 10px; }
.neighbor-item small { margin-top: 3px; color: var(--muted); font: 8px "DM Mono", monospace; text-transform: uppercase; }
.reading-note { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding: 24px; border: 1px solid var(--ink); border-top: 0; background: var(--lime); }
.reading-note .eyebrow { color: var(--ink); }
.reading-note > div { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.reading-note p { margin: 0; font-size: 12px; line-height: 1.55; }
.field-section { padding-bottom: 100px; }
.evidence-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: 14px; }
.evidence-card { margin: 0; border: 1px solid var(--ink); background: var(--white); }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ink); }
.photo-pair img { display: block; width: 100%; height: 330px; object-fit: cover; }
.photo-pair.vertical { grid-template-columns: .7fr 1.3fr; }
.evidence-card figcaption { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 19px; border-top: 1px solid var(--ink); }
.evidence-card figcaption span { font: 10px "DM Mono", monospace; text-transform: uppercase; }
.evidence-card figcaption p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.design-consequence { margin-top: 40px; }
.governance-section { width: 100%; max-width: none; padding: 100px max(24px, calc((100% - 1320px)/2)) 110px; color: var(--white); background: var(--ink); }
.governance-heading { border-bottom: 1px solid #4f5652; padding-bottom: 34px; }
.governance-heading .eyebrow, .governance-heading .section-intro { color: #aab1ac; }
.governance-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #59605c; }
.governance-grid article { min-height: 255px; padding: 25px; }
.governance-grid article + article { border-left: 1px solid #59605c; }
.governance-grid .number { color: var(--lime); }
.governance-grid h3 { margin: 70px 0 10px; font-size: 25px; }
.governance-grid p { margin: 0; color: #b4bbb6; font-size: 12px; line-height: 1.55; }
.governance-details { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #59605c; }
.governance-details article { padding: 42px 25px 46px; }
.governance-details article + article { border-left: 1px solid #59605c; }
.governance-details h3 { margin: 0 0 18px; font-size: 22px; }
.governance-details p { color: #b4bbb6; font-size: 12px; line-height: 1.65; }
.governance-details a { color: var(--lime); }
.paper-link { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 42px; align-items: center; padding: 36px 0 0; }
.paper-link h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.paper-link > p { color: #b4bbb6; font-size: 12px; line-height: 1.6; }
.paper-link > a { padding: 10px 12px; border: 1px solid var(--lime); color: var(--lime); text-decoration: none; font: 9px "DM Mono", monospace; text-transform: uppercase; }
footer { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px 0 46px; border-top: 1px solid var(--ink); font: 9px/1.5 "DM Mono", monospace; text-transform: uppercase; }
footer p:last-child { color: var(--muted); }

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 1.2fr .8fr; }
  .atlas-layout { grid-template-columns: 1fr; }
  .detail-panel { border-left: 0; border-top: 1px solid var(--ink); }
  .detail-empty { min-height: 270px; }
  .detail-content { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
  .detail-content .eyebrow, .detail-content h3, .descriptor-list { grid-column: 1; }
  .metrics, .microcopy { grid-column: 1; }
  .neighbors { grid-column: 2; grid-row: 1 / span 6; }
  .paper-link { grid-template-columns: 1fr 1fr; }
  .paper-link > a { justify-self: start; }
}

@media (max-width: 760px) {
  .site-header, main > section, footer { width: min(100% - 24px, 1320px); }
  nav { display: none; }
  .hero-kicker span:nth-child(2) { display: none; }
  .hero-grid, .section-heading { grid-template-columns: 1fr; gap: 34px; }
  .hero-grid { padding: 52px 0 42px; }
  h1 { font-size: clamp(52px, 16vw, 82px); }
  .hero-principle, .design-consequence { grid-template-columns: 40px 1fr; gap: 12px; }
  .atlas-section, .field-section { padding-top: 70px; }
  .toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .segmented-control { padding-top: 18px; }
  .select-control select, .secondary-button { width: 100%; }
  .attribute-controls { align-items: flex-start; flex-direction: column; }
  .style-map { height: 560px; }
  .map-node { width: 66px; }
  .reading-note, .reading-note > div { grid-template-columns: 1fr; gap: 14px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .photo-pair img { height: 220px; }
  .evidence-card figcaption { grid-template-columns: 1fr; gap: 8px; }
  .governance-section { padding-inline: 12px; }
  .governance-grid, .governance-details { grid-template-columns: 1fr; }
  .governance-grid article { min-height: auto; }
  .governance-grid article + article, .governance-details article + article { border-left: 0; border-top: 1px solid #59605c; }
  .governance-grid h3 { margin-top: 30px; }
  .paper-link, footer { grid-template-columns: 1fr; }
  .detail-content { display: block; }
  .neighbors { margin-top: 26px; }
}

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