:root {
  --bg: #080808;
  --ink: #eceae4;
  --ink-muted: rgba(236, 234, 228, 0.62);
  --ink-faint: rgba(236, 234, 228, 0.34);
  --rule: rgba(236, 234, 228, 0.17);
  --accent: #d13426;
  --panel-bg: #0c0c0c;
  --panel-ink: #eceae4;
  --panel-muted: rgba(236, 234, 228, 0.64);
  --panel-rule: rgba(236, 234, 228, 0.18);
  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --px: 0px;
  --py: 0px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.mode-cv {
  overflow: auto;
}

/* ============================================================
   Study Themes (Zero glass blur, zero rounded SaaS pills)
   ============================================================ */
body.study-contact {
  --bg: #080808;
  --ink: #eceae4;
  --ink-muted: rgba(236, 234, 228, 0.58);
  --ink-faint: rgba(236, 234, 228, 0.32);
  --rule: rgba(236, 234, 228, 0.18);
  --accent: #d13426;
  --panel-bg: #0b0b0b;
  --panel-ink: #eceae4;
  --panel-muted: rgba(236, 234, 228, 0.62);
  --panel-rule: rgba(236, 234, 228, 0.18);
  --font-display: "Archivo", sans-serif;
  --font-body: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

body.study-vga {
  --bg: #070705;
  --ink: #f3f3eb;
  --ink-muted: rgba(243, 243, 235, 0.66);
  --ink-faint: rgba(243, 243, 235, 0.36);
  --rule: rgba(243, 243, 235, 0.28);
  --accent: #f5a623;
  --panel-bg: #090907;
  --panel-ink: #f3f3eb;
  --panel-muted: rgba(243, 243, 235, 0.68);
  --panel-rule: rgba(243, 243, 235, 0.3);
  --font-display: "VT323", monospace;
  --font-body: "IBM Plex Mono", monospace;
  --font-mono: "IBM Plex Mono", monospace;
}

/* ============================================================
   Layer 1 — Analog Physical Substrate
   ============================================================ */
.analog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

.analog-plate {
  position: absolute;
  inset: -4%;
  transform: translate3d(var(--px), var(--py), 0) scale(1.04);
  transition: transform 0.25s ease-out;
  background-size: cover;
  background-position: center;
}

/* Silver-gelatin contact sheet placeholder */
body.study-contact .analog-plate:not(.has-photo) {
  background:
    radial-gradient(ellipse 68% 58% at 24% 26%, rgba(165, 165, 160, 0.14), transparent 62%),
    radial-gradient(ellipse 60% 55% at 78% 72%, rgba(110, 110, 108, 0.12), transparent 65%),
    radial-gradient(circle at 50% 48%, #1d1d1c 0%, #090909 75%);
}

/* Warm tungsten analog emulsion behind digital VGA overlay */
body.study-vga .analog-plate:not(.has-photo) {
  background:
    radial-gradient(ellipse 62% 52% at 22% 30%, rgba(182, 112, 48, 0.28), transparent 64%),
    radial-gradient(ellipse 58% 60% at 80% 74%, rgba(72, 96, 118, 0.24), transparent 64%),
    radial-gradient(circle at 50% 48%, #261e16 0%, #090806 76%);
}

.analog-plate.has-photo {
  filter: saturate(0.88) contrast(1.1) brightness(0.56) blur(1px);
}

body.study-contact .analog-plate.has-photo {
  filter: grayscale(0.92) contrast(1.12) brightness(0.48) blur(1.2px);
}

.analog-grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.analog-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(8, 8, 8, 0.12) 0%, rgba(8, 8, 8, 0.65) 100%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.5) 0%, transparent 18%, transparent 80%, rgba(8, 8, 8, 0.68) 100%);
}

/* ============================================================
   Layer 2 — Digital Polygon Mesh Canvas + Registration Frame
   ============================================================ */
#meshCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
  touch-action: none;
}

body.study-vga #meshCanvas {
  mix-blend-mode: difference;
}

#meshCanvas.is-dragging {
  cursor: grabbing;
}

#meshCanvas.is-pointer {
  cursor: pointer;
}

.plate-frame {
  position: fixed;
  inset: 12px;
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.study-vga .plate-frame {
  border-color: rgba(243, 243, 235, 0.14);
}

.reg {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--ink-faint);
}

.reg-tl { top: -7px; left: -4px; }
.reg-tr { top: -7px; right: -4px; }
.reg-bl { bottom: -7px; left: -4px; }
.reg-br { bottom: -7px; right: -4px; }

body.mode-cv #meshCanvas,
body.mode-cv .hud-dock,
body.mode-cv .inspector,
body.mode-cv .hover-pill,
body.mode-cv .plate-frame {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   Hover Readout (Sharp rectangular plate tag)
   ============================================================ */
.hover-pill {
  position: fixed;
  z-index: 25;
  pointer-events: none;
  max-width: 300px;
  padding: 6px 10px;
  background: var(--panel-bg);
  color: var(--panel-ink);
  border: 1px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hover-pill[hidden] {
  display: none;
}

.hover-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

body.study-contact .hover-meta,
body.study-contact .hover-title {
  text-transform: lowercase;
}

body.study-vga .hover-meta {
  text-transform: uppercase;
}

.hover-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.15;
}

body.study-vga .hover-title {
  font-size: 20px;
}

/* ============================================================
   Layer 3 — Top Edge Typographic Header
   ============================================================ */
.hud-top {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

.brand-cluster {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-back,
.audio-toggle,
.track-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.studio-back:hover,
.audio-toggle:hover,
.track-btn:hover {
  color: var(--accent);
}

.audio-toggle.is-on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

body.study-vga .audio-toggle,
body.study-vga .track-btn {
  text-transform: uppercase;
}

body.study-vga .audio-toggle.is-on {
  color: var(--accent);
}

.track-btn[hidden] {
  display: none;
}

.hud-sep {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  user-select: none;
}

.title-wrap h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}

body.study-contact .title-wrap h1 {
  text-transform: lowercase;
  letter-spacing: -0.02em;
}

body.study-vga .title-wrap h1 {
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.title-sub {
  color: var(--ink-muted);
}

.telemetry {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.plate-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}

.plate-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

.plate-btn {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 0;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.plate-btn:hover {
  color: var(--ink);
}

.plate-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

body.study-vga .plate-label,
body.study-vga .plate-btn {
  text-transform: uppercase;
}

body.study-vga .plate-btn.is-active {
  color: var(--accent);
}

body.study-vga .telemetry {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.study-switch,
.view-switch {
  display: inline-flex;
  border: 1px solid var(--rule);
  background: rgba(8, 8, 8, 0.72);
}

.study-btn,
.switch-btn {
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.study-btn:last-child,
.switch-btn:last-child {
  border-right: 0;
}

body.study-contact .study-btn,
body.study-contact .switch-btn {
  text-transform: lowercase;
}

body.study-vga .study-btn,
body.study-vga .switch-btn {
  text-transform: uppercase;
}

.study-btn.is-active,
.switch-btn.is-active {
  background: var(--ink);
  color: #0b0b0b;
}

body.study-contact .study-btn.is-active,
body.study-contact .switch-btn.is-active {
  background: var(--accent);
  color: #f6f4ef;
}

body.study-vga .study-btn.is-active,
body.study-vga .switch-btn.is-active {
  background: var(--accent);
  color: #090907;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  background: rgba(8, 8, 8, 0.72);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   Legend Overlay
   ============================================================ */
.legend-popover {
  position: fixed;
  top: 66px;
  right: 26px;
  z-index: 30;
  width: min(330px, calc(100vw - 32px));
  padding: 16px 18px;
  background: var(--panel-bg);
  color: var(--panel-ink);
  border: 1px solid var(--panel-rule);
}

.legend-popover[hidden] {
  display: none;
}

.legend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.study-contact .mono-label {
  text-transform: lowercase;
}

.close-x {
  border: 0;
  background: transparent;
  color: var(--panel-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.close-x:hover {
  color: var(--accent);
}

.legend-copy,
.legend-foot {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--panel-muted);
}

.legend-copy code,
.legend-foot code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--panel-ink);
}

.legend-list {
  list-style: none;
  margin: 12px 0;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--panel-ink);
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.key-glyph {
  width: 16px;
  text-align: center;
  display: inline-block;
  color: var(--panel-ink);
}

/* ============================================================
   Bottom Edge-Anchored Bare Typographic Strip (No SaaS Dock)
   ============================================================ */
.hud-dock {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  padding: 9px 18px;
  border-top: 1px solid var(--rule);
  background: rgba(8, 8, 8, 0.78);
  transition: opacity 0.2s ease;
}

.dock-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.dock-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.text-btn,
.filter-chip,
.zoom-btn {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

body.study-vga .text-btn,
body.study-vga .filter-chip,
body.study-vga .zoom-btn {
  text-transform: uppercase;
  font-size: 10.5px;
}

.text-btn:hover,
.filter-chip:hover,
.zoom-btn:hover {
  color: var(--ink);
}

.text-btn.is-active,
.text-btn.is-on,
.filter-chip.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

body.study-vga .text-btn.is-active,
body.study-vga .text-btn.is-on,
body.study-vga .filter-chip.is-active {
  color: var(--accent);
}

.count-chip {
  font-size: 10px;
  opacity: 0.7;
}

.search-box {
  flex: 0 1 160px;
  min-width: 120px;
}

.search-box input {
  width: 100%;
  padding: 2px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  outline: none;
}

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

.search-box input:focus {
  border-bottom-color: var(--accent);
}

.zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   Inspector — Archival Plate / VGA Window / Printed Catalog Slip
   ============================================================ */
.inspector {
  position: fixed;
  top: 78px;
  right: 24px;
  bottom: 66px;
  width: min(384px, calc(100vw - 36px));
  z-index: 22;
  overflow-y: auto;
  background: var(--panel-bg);
  color: var(--panel-ink);
  border: 1px solid var(--panel-rule);
  padding: 18px 20px;
}

.inspector[hidden] {
  display: none;
}

.inspector-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.inspector-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-medium,
.badge-year,
.badge-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid var(--panel-rule);
  color: var(--panel-muted);
}

.badge-medium {
  color: var(--panel-ink);
  border-color: var(--panel-ink);
}

.badge-status.is-live {
  border-color: var(--accent);
  color: var(--accent);
}

.badge-status.is-ghost {
  border-style: dashed;
  color: var(--panel-muted);
}

body.study-contact .badge-medium,
body.study-contact .badge-year,
body.study-contact .badge-status {
  text-transform: lowercase;
}

body.study-vga .badge-medium,
body.study-vga .badge-year,
body.study-vga .badge-status {
  text-transform: uppercase;
}

.inspector-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.study-vga .inspector-title {
  font-size: 32px;
  line-height: 0.98;
}

.inspector-thumb {
  border: 1px solid var(--panel-rule);
  max-height: 175px;
  overflow: hidden;
}

.inspector-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inspector-excerpt {
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--panel-muted);
}

.inspector-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.primary-link-btn:hover {
  background: var(--accent);
  color: #f6f4ef;
}

body.study-vga .primary-link-btn:hover {
  color: #090907;
}

.primary-link-btn.ghost-btn {
  border-style: dashed;
  border-color: var(--panel-rule);
  color: var(--panel-muted);
}

.primary-link-btn.ghost-btn:hover {
  border-color: var(--panel-ink);
  background: transparent;
  color: var(--panel-ink);
}

.inspector-section {
  border-top: 1px solid var(--panel-rule);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.inspector-section[hidden] {
  display: none;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}

.link-list a {
  color: var(--panel-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--panel-rule);
  word-break: break-word;
}

.link-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.dead-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--panel-muted);
  flex-shrink: 0;
}

.neighbor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.neighbor-chip {
  border: 1px solid var(--panel-rule);
  background: transparent;
  color: var(--panel-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 7px;
  cursor: pointer;
  text-align: left;
}

.neighbor-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.neighbor-chip.is-ghost {
  border-style: dashed;
  color: var(--panel-muted);
}

/* ============================================================
   Living CV / Personalized History View (Styled per Study)
   ============================================================ */
.cv-view {
  position: relative;
  z-index: 15;
  padding: 96px clamp(16px, 4vw, 48px) 64px;
  min-height: 100vh;
}

.cv-view[hidden] {
  display: none;
}

.cv-sheet {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
  background: var(--panel-bg);
  color: var(--panel-ink);
  border: 1px solid var(--panel-rule);
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--panel-rule);
}

.cv-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.02;
  margin: 6px 0;
}

body.study-contact .cv-name {
  text-transform: lowercase;
}

.cv-tagline {
  color: var(--panel-muted);
  font-size: 14px;
}

.cv-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cv-action-btn {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}

.cv-action-btn:hover {
  background: var(--accent);
  color: #f6f4ef;
}

.cv-action-btn.secondary {
  border-color: var(--panel-rule);
  color: var(--panel-muted);
}

.cv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0;
  margin: 20px 0;
  border-top: 1px solid var(--panel-rule);
  border-left: 1px solid var(--panel-rule);
}

.cv-stat-box {
  padding: 12px 14px;
  border-right: 1px solid var(--panel-rule);
  border-bottom: 1px solid var(--panel-rule);
}

.cv-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--panel-ink);
}

.cv-stat-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-muted);
  margin-top: 5px;
}

.cv-bio {
  font-size: 15px;
  line-height: 1.65;
  color: var(--panel-ink);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--panel-rule);
  margin-bottom: 26px;
}

.cv-section {
  margin-bottom: 32px;
}

.cv-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--panel-rule);
}

body.study-contact .cv-section-title {
  text-transform: lowercase;
}

.cv-list {
  display: grid;
}

.cv-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--panel-rule);
}

.cv-year {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--panel-muted);
}

.cv-item-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  color: var(--panel-ink);
  text-decoration: none;
}

.cv-item-title:hover {
  color: var(--accent);
}

.cv-item-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--panel-muted);
  margin-top: 2px;
}

.locate-btn {
  border: 1px solid var(--panel-rule);
  background: transparent;
  color: var(--panel-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.locate-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cv-festivals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.festival-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 8px;
  border: 1px solid var(--panel-rule);
  color: var(--panel-ink);
}

.cv-ventures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-top: 1px solid var(--panel-rule);
  border-left: 1px solid var(--panel-rule);
}

.venture-card {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid var(--panel-rule);
  border-bottom: 1px solid var(--panel-rule);
  text-decoration: none;
  color: inherit;
}

.venture-card:hover {
  background: rgba(128, 128, 128, 0.08);
}

.venture-card strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.venture-card span {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--panel-muted);
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cv-footer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--panel-muted);
}

@media (max-width: 1140px) {
  .inspector {
    top: 148px;
    bottom: 96px;
  }
}

@media (max-width: 720px) {
  .hud-top {
    padding: 10px 12px;
  }

  .inspector {
    top: auto;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    max-height: 54vh;
  }

  .cv-row {
    grid-template-columns: 48px 1fr;
  }

  .locate-btn {
    grid-column: 2;
    width: fit-content;
  }
}

@media print {
  .analog-backdrop,
  #meshCanvas,
  .plate-frame,
  .hud-top,
  .hud-dock,
  .inspector,
  .legend-popover,
  .hover-pill,
  .cv-header-actions,
  .locate-btn {
    display: none !important;
  }

  body,
  html {
    background: #ffffff !important;
    color: #111111 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .cv-view {
    display: block !important;
    padding: 0 !important;
  }

  .cv-sheet {
    background: #ffffff !important;
    color: #111111 !important;
    border: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .cv-name,
  .cv-item-title,
  .cv-bio,
  .festival-pill,
  .venture-card strong {
    color: #111111 !important;
  }

  .cv-tagline,
  .cv-item-desc,
  .cv-year,
  .cv-stat-lbl,
  .cv-footer {
    color: #444444 !important;
  }

  .cv-section-title,
  .cv-stat-num,
  .mono-label {
    color: #8a2417 !important;
  }
}
