:root {
  --paper: #faf9f6;
  --paper-subtle: #f3f1eb;
  --ink: #141311;
  --ink-2: #5b564e;
  --ink-3: #8c867c;
  --hairline: #e5e1d8;
  --hairline-strong: #cfc9bc;
  --teal: #175a55;
  --vermilion: #a23628;
  --ochre: #8f6218;
  --darkroom: #11100e;
  --darkroom-2: #1c1a17;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 980px;
  --maxw-wide: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Subtle archival silver-halide / 35mm paper grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
  opacity: 0.036;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

a { color: inherit; }
button, select, input { font-family: inherit; }
[hidden] { display: none !important; }

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.shell-wide {
  max-width: var(--maxw-wide);
}

/* ==================== HEADER ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--maxw-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 54px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(20, 19, 17, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover .brand-logo {
  transform: translateY(-0.5px) scale(1.04);
  box-shadow: 0 3px 8px rgba(20, 19, 17, 0.2);
}

/* The reel inside the manhole cover spins up and coasts to a stop on hover.
   It has five-fold symmetry, so ending on a multiple of 72deg looks seamless. */
.logo-reel {
  transform-box: fill-box;
  transform-origin: center;
}

.brand:hover .logo-reel,
.brand:focus-visible .logo-reel,
.foot-mark:hover .logo-reel {
  animation: reelSpin 1.8s cubic-bezier(0.25, 0.6, 0.2, 1);
}

@keyframes reelSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(720deg); }
}

@media (prefers-reduced-motion: reduce) {
  .brand:hover .logo-reel,
  .brand:focus-visible .logo-reel,
  .foot-mark:hover .logo-reel { animation: none; }
}


.brand-name {
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.brand-span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 22px;
  height: 100%;
}

.header-donate { align-self: center; }
#mobile-menu, .motor-picker { display: none; }

.random-street-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  min-height: 36px;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.random-street-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(23, 90, 85, 0.05);
}

.random-street-btn:active {
  transform: translateY(1px);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

#scroll-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--teal);
  opacity: 0.78;
  transition: width 0.08s linear;
}

.nav-tab {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-tab:hover { color: var(--ink); }

.nav-tab.active {
  color: var(--ink);
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: var(--ink);
}

.nav-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  font-weight: 400;
}

/* ==================== VIEWS ==================== */
.main-wrap {
  flex: 1 0 auto;
}

.view {
  padding: 52px 0 88px;
  animation: viewIn 0.22s ease;
}

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

.view[hidden] { display: none; }

@media (max-width: 960px) {
  .brand-span {
    display: none;
  }
  .header-inner {
    padding-inline: 18px;
    gap: 10px;
  }
  .primary-nav {
    gap: 8px;
  }
  .primary-nav .header-donate {
    padding-inline: 10px;
  }
}

/* ==================== TYPOGRAPHY & MICRO UI ==================== */
.micro-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  margin: 0;
}

.text-action {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.text-action:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.btn-outline, .btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}

.btn-outline:hover { border-color: var(--ink); background: var(--paper-subtle); }

.btn-solid {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.btn-solid:hover { background: #2c2a26; }

/* ==================== FINDINGS MASTHEAD ==================== */
.masthead {
  padding-bottom: 24px;
}

.masthead-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.masthead h1 {
  font-family: var(--serif);
  font-size: clamp(2.35rem, 4.4vw, 3.35rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0;
}

@media (max-width: 480px) {
  .random-btn-label { display: none; }
  .random-street-btn { width: 44px; height: 44px; }
}

.masthead-lead {
  font-family: var(--serif);
  font-size: clamp(1.06rem, 1.6vw, 1.2rem);
  line-height: 1.56;
  color: var(--ink-2);
  max-width: 780px;
  margin: 0;
}

.lead-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.14s ease, text-decoration-color 0.14s ease;
}

.lead-link:hover {
  color: var(--teal);
  text-decoration-color: var(--teal);
}

/* Quiet single-line typographic colophon beneath the hero filmstrip */
.colophon-strip {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  color: var(--ink-3);
}

.colophon-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.colophon-val {
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.colophon-label {
  color: var(--ink-3);
}

/* ==================== HERO FILMSTRIP (OPTICAL 35MM GATE) ==================== */
.strip-band {
  padding: 6px 0 38px;
  border-bottom: 1px solid var(--hairline);
}

.band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.clip-era {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.clip-tile {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.clip-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--darkroom);
  overflow: hidden;
  border-radius: 0;
  border: 1px solid #1c1a17;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(20, 19, 17, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.clip-tile:hover .clip-media {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 16px rgba(20, 19, 17, 0.2);
}

.clip-media img,
.clip-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clip-media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.clip-tile.is-playing .clip-media video,
.clip-tile:hover .clip-media video {
  opacity: 1;
}

.clip-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding-top: 7px;
}

.clip-city {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-year {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  flex-shrink: 0;
}

.clip-tile:hover .clip-city { text-decoration: underline; text-underline-offset: 2px; }

/* ==================== FINDING BLOCKS ==================== */
.finding-block {
  padding: 64px 0;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 68px;
}

.finding-header {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(0, 1fr);
  gap: 16px 48px;
  align-items: start;
  margin-bottom: 30px;
}

.finding-prose {
  min-width: 0;
}

/* Reusable Tufte-style inline citation & marginalia system */
.cite-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.14s ease, text-decoration-color 0.14s ease;
}

.cite-link:hover,
.cite-link.is-highlighted {
  color: var(--ink);
  text-decoration-color: var(--teal);
}

.cite-ref {
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 0;
  margin-left: 2px;
  vertical-align: super;
}

.cite-ref a {
  display: inline-block;
  padding: 0 2px;
  color: var(--teal);
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.14s ease, color 0.14s ease;
}

.cite-ref a:hover,
.cite-ref.is-highlighted a {
  background: rgba(23, 90, 85, 0.12);
  color: var(--ink);
}

.margin-notes {
  padding-top: 46px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--hairline);
  padding-left: 16px;
}

.margin-notes:empty {
  display: none;
}

.margin-note {
  font-size: 0.72rem;
  line-height: 1.48;
  color: var(--ink-3);
  transition: color 0.14s ease, border-color 0.14s ease;
}

.margin-note.is-highlighted {
  color: var(--ink);
}

.margin-num {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--teal);
  margin-right: 5px;
  font-weight: 500;
}

.margin-note cite {
  font-style: italic;
  color: var(--ink-2);
}

.margin-note.is-highlighted cite {
  color: var(--ink);
}

.margin-ext {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--teal);
  text-decoration: none;
  margin-left: 4px;
  white-space: nowrap;
}

.margin-ext:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Mobile / narrow bottom footnotes (shown only when marginalia collapses) */
.mobile-footnotes {
  display: none;
  padding: 36px 0 8px;
  border-bottom: 1px solid var(--hairline);
}

.footnotes-heading {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}

.footnotes-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footnotes-list li {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 4px;
}

.footnotes-list li:target {
  background: rgba(23, 90, 85, 0.07);
  border-radius: 2px;
}

.footnotes-list cite {
  font-style: italic;
  color: var(--ink);
}

.fn-back {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-decoration: none;
  margin-left: 6px;
}

.fn-back:hover { color: var(--ink); }

.finding-header h2 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.016em;
  margin: 0 0 12px;
}

.band-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.finding-copy {
  font-size: 0.98rem;
  line-height: 1.68;
  color: var(--ink-2);
  margin: 0;
}

.finding-copy + .finding-copy {
  margin-top: 12px;
}

.finding-copy strong {
  color: var(--ink);
  font-weight: 600;
}

/* Frameless Tufte-style figures */
.figure-block {
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

.figure-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  max-width: 100%;
  box-sizing: border-box;
}

.figure-bar .micro-label {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.figure-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
}

.tab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.tab-link {
  position: relative;
  background: none;
  border: none;
  padding: 2px 0 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.15s ease;
}

.tab-link:hover { color: var(--ink); }

.tab-link.active {
  color: var(--ink);
}

.tab-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
}

.chart-stage {
  width: 100%;
}

.chart-stage svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.figure-note {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin: 12px 0 0;
  max-width: 740px;
  line-height: 1.5;
}

/* Box-verified specimen strips on Findings page */
.specimen-band {
  margin-top: 32px;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

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

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

.specimen {
  cursor: pointer;
}

.specimen-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--darkroom);
  overflow: hidden;
  border-radius: 0;
  border: 1px solid #1c1a17;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(20, 19, 17, 0.14);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.specimen-media {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.specimen-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.specimen-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.specimen-svg.is-ghost { opacity: 0.42; }

.specimen-t1-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  background: rgba(16, 15, 13, 0.82);
  border: 1px solid rgba(250, 249, 246, 0.28);
  color: #f3efe7;
  font-family: var(--mono);
  font-size: 0.64rem;
  padding: 2px 7px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.specimen-t1-btn:hover { background: rgba(16, 15, 13, 0.96); border-color: #faf9f6; }
.specimen-t1-btn.active { background: #faf9f6; color: #141311; border-color: #faf9f6; }

.specimen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.specimen-place {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink);
}

.specimen-stat {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}

.specimen-stat.accent-red { color: var(--vermilion); }
.specimen-stat.accent-teal { color: var(--teal); }
.specimen-stat.accent-amber { color: #b45309; }

.specimen-cap {
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.46;
  margin: 0;
}

/* Opt-in collapsed methodology disclosure drawers */
.method-drawer {
  margin-top: 26px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.method-drawer summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.method-drawer summary::-webkit-details-marker { display: none; }
.method-drawer summary:hover { color: var(--ink); }
.method-drawer summary:focus { outline: none; }
.method-drawer summary:focus-visible { outline: 1.5px solid var(--ink-3); outline-offset: 2px; }

.method-drawer summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--ink-3);
}

.method-drawer[open] summary::after {
  content: "−";
}

.drawer-body {
  padding: 2px 0 18px;
  max-width: 780px;
}

.drawer-body p {
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0 0 12px;
}

.drawer-body p:last-child { margin-bottom: 0; }

.drawer-body code {
  font-family: var(--mono);
  font-size: 0.76rem;
  background: var(--paper-subtle);
  padding: 1px 5px;
  border-radius: 2px;
}

.drawer-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.drawer-stat-item dt {
  font-size: 0.74rem;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.drawer-stat-item dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  line-height: 1.4;
}

.drawer-stat-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-top: 2px;
}

/* Single-reel diptych */
.diptych {
  margin-top: 32px;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

.diptych-meta {
  margin: 0 0 12px;
  font: 500 1.3rem/1.25 var(--serif);
}

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

.diptych-fig {
  margin: 0;
}

.diptych-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.diptych-fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: 1px solid #1c1a17;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(20, 19, 17, 0.14);
  background: var(--darkroom);
}

.diptych-fig figcaption {
  font-size: 0.78rem;
  color: var(--ink-2);
  margin-top: 7px;
}

.diptych-fig .text-action { display: block; min-height: 44px; color: var(--teal); }

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

.end-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.end-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ==================== WORKBENCH HEAD (ARCHIVE / COMPARE / METHOD) ==================== */
.workbench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 22px;
}

.view-title {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 5px;
}

.view-sub {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin: 0;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  overflow: hidden;
}

.mode-btn {
  background: transparent;
  border: none;
  padding: 6px 13px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.mode-btn + .mode-btn {
  border-left: 1px solid var(--hairline-strong);
}

.mode-btn:hover { color: var(--ink); background: var(--paper-subtle); }

.mode-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.subtle-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 3px;
}

/* ==================== ARCHIVE FILTER TOOLBAR ==================== */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.search-field {
  position: relative;
  flex: 1 1 240px;
  max-width: 340px;
}

.search-field input,
.filter-toolbar select,
.inline-search {
  width: 100%;
  height: 34px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  padding: 0 10px;
  font-size: 0.81rem;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.search-field input { padding-right: 30px; }

.filter-toolbar select {
  width: auto;
  min-width: 142px;
  cursor: pointer;
}

.search-field input:focus,
.filter-toolbar select:focus,
.inline-search:focus {
  outline: none;
  border-color: var(--ink);
}

.kbd-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  padding: 0 5px;
  line-height: 1.5;
  pointer-events: none;
}

/* ==================== CONTACT SHEET GRID ==================== */
.film-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 18px;
}

.film-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.film-card.is-excluded {
  opacity: 0.56;
}

.film-card.is-excluded:hover { opacity: 0.92; }

.film-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--darkroom);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

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

.film-thumb video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.film-card:hover .film-thumb video { opacity: 1; }

.film-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-3);
}

.clip-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 5px;
  vertical-align: 1px;
}

.film-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.32;
  margin: 2px 0 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.film-card:hover .film-title { text-decoration: underline; text-underline-offset: 2px; }

.film-datum {
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-2);
}

/* ==================== LEDGER TABLE ==================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ledger-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--hairline-strong);
  white-space: nowrap;
  user-select: none;
}

.ledger-table th[data-sort] { cursor: pointer; }
.ledger-table th[data-sort]:hover { color: var(--ink); }
.ledger-table th.sort-asc::after { content: " ↑"; color: var(--ink); }
.ledger-table th.sort-desc::after { content: " ↓"; color: var(--ink); }

.ledger-table td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-2);
  vertical-align: baseline;
}

.ledger-table tr.clickable-row { cursor: pointer; }
.ledger-table tr.clickable-row:hover td { background: var(--paper-subtle); color: var(--ink); }

.ledger-table .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.76rem;
  padding-right: 0;
  padding-left: 10px;
  white-space: nowrap;
}

.ledger-table .cell-title {
  color: var(--ink);
  font-weight: 500;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-table.compact td { padding: 7px 8px 7px 0; font-size: 0.76rem; }
.ledger-table.compact .num { font-size: 0.72rem; padding-left: 6px; }

/* ==================== SIGNAGE VIEW ==================== */
.sign-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 16px;
  padding-bottom: 24px;
}

.sign-card {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.sign-crop {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--darkroom);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}

.sign-card:hover .sign-crop {
  border-color: var(--ink-2);
}

.sign-crop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.22s ease;
}

.sign-card:hover .sign-crop img {
  transform: scale(1.04);
}

.sign-cat-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  background: rgba(18, 17, 15, 0.8);
  color: #fcd34d;
  font-family: var(--mono);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 2px;
}

.sign-meta {
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.sign-text {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.35;
}

.sign-card:hover .sign-text { text-decoration: underline; text-underline-offset: 2px; }

.sign-note {
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.48;
  margin: 0;
}

.sign-index-block {
  padding-top: 32px;
}

.inline-search {
  max-width: 260px;
  height: 30px;
}

/* ==================== COMPARE LIGHT TABLE ==================== */
.compare-transport {
  display: flex;
  align-items: center;
  gap: 16px;
}

.preset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
}

.preset-link {
  position: relative;
  background: none;
  border: none;
  padding: 2px 0 5px;
  font-size: 0.81rem;
  color: var(--ink-3);
  cursor: pointer;
}

.preset-link:hover { color: var(--ink); }
.preset-link.active { color: var(--ink); font-weight: 500; }
.preset-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
}

.comparator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.comp-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comp-select-wrap select {
  flex: 1;
  height: 34px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  padding: 0 10px;
  font-size: 0.81rem;
  color: var(--ink);
}

.comp-stage {
  aspect-ratio: 4 / 3;
  background: var(--darkroom);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.comp-stage video,
.comp-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.comp-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-top: 9px;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.comp-ledger-wrap {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}

/* ==================== METHOD & DATA ==================== */
.method-shell { max-width: 1020px; }
.method-header { border-bottom: 1px solid var(--hairline-strong); padding-bottom: clamp(1.5rem, 4vw, 2.6rem); }
.method-byline { margin: .65rem 0 0; font: .83rem/1.5 var(--sans); color: var(--ink-2); }
.method-lead { max-width: 47ch; margin: 1.45rem 0 0; font: clamp(1.35rem, 2.6vw, 1.8rem)/1.35 var(--serif); }
.method-layout { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(0, 3.4fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; padding-top: 2rem; }
.method-contents { position: sticky; top: 76px; display: grid; justify-items: start; gap: .2rem; }
.method-contents a { padding: .3rem 0; color: var(--ink-2); font: .92rem/1.5 var(--sans); text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--hairline-strong); }
.method-contents a:hover, .method-reading a:hover { color: var(--teal); text-decoration-color: currentColor; }
.method-reading { min-width: 0; }
.method-reading > section { scroll-margin-top: 78px; }
.method-reading > section + section { border-top: 1px solid var(--hairline); margin-top: 2.2rem; padding-top: 2rem; }
.method-reading h2 { margin: 0 0 .7rem; font: 500 clamp(1.65rem, 3.2vw, 2.1rem)/1.12 var(--serif); }
.method-reading h3 { margin: 1.4rem 0 .45rem; font: 500 1.35rem/1.25 var(--serif); }
.method-reading p { margin: .7rem 0; max-width: 68ch; font: 1.04rem/1.7 var(--sans); }
.method-reading strong { font-weight: 600; }
.method-reading a { text-decoration-thickness: 1px; text-underline-offset: .18em; }
.method-reading details { margin: 1rem 0 0; border-block: 1px solid var(--hairline); }
.method-reading details + details { margin-top: 0; border-top: 0; }
.method-reading summary { padding: .78rem 0; cursor: pointer; font: 500 .96rem/1.5 var(--sans); color: var(--teal); }
.method-reading details[open] { padding-bottom: .85rem; }
.method-reading details summary::marker { font-size: .77em; }
.method-reading details p, .method-reading .method-note { font-size: .94rem; line-height: 1.6; color: var(--ink-2); }
.method-reading .method-note-list { margin: .5rem 0 0; padding-left: 1.15rem; font-size: .93rem; line-height: 1.62; color: var(--ink-2); }
.method-reading .method-note-list li + li { margin-top: .45rem; }
.method-reading details details { margin-top: .7rem; border-bottom: 0; }
.method-example { margin: 1.2rem 0; background: var(--paper-subtle); }
.method-stills { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px; }
.method-stills figure { position: relative; margin: 0; }
.method-stills img { display: block; width: 100%; height: auto; }
.method-stills figcaption { position: absolute; bottom: .5rem; left: .5rem; padding: .16em .45em; font: .74rem/1.4 var(--sans); background: #1d1b18db; color: #fff; }
.method-example > figcaption { padding: .85rem 1rem 1rem; color: var(--ink-2); font: .95rem/1.55 var(--sans); }
.method-example > figcaption a { color: var(--ink); }
.density-chart-wrap { overflow-x: auto; }
.density-chart-wrap svg { display: block; width: 100%; min-width: 560px; }
.method-table-scroll { overflow-x: auto; margin: .75rem 0; }
.method-table-scroll:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.method-table { width: 100%; border-collapse: collapse; font: .89rem/1.45 var(--sans); text-align: left; font-variant-numeric: tabular-nums; }
.method-table caption { padding: 0 0 .55rem; text-align: left; color: var(--ink-2); font-size: .87rem; }
.method-table th, .method-table td { padding: .55rem .65rem .55rem 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.method-table thead th { font-weight: 600; border-bottom-color: var(--hairline-strong); }
.method-table tbody th { font-weight: 400; }
.method-table td { text-align: right; }
.method-table thead th:not(:first-child) { text-align: right; }
#method-robustness-table .method-table td, #method-robustness-table .method-table thead th { text-align: left; }
#audit-kpis .method-table { max-width: 35rem; }
#bench-table-wrap table { min-width: 610px; }
#method-weight-table table, #audit-table { min-width: 360px; }
.audit-scroll { max-height: 25rem; }
.audit-scroll thead { position: sticky; top: 0; background: var(--paper); }
.method-downloads { list-style: none; padding: 0; margin: 1.15rem 0; }
.method-downloads li { display: grid; grid-template-columns: minmax(11.5rem, .85fr) minmax(0, 1.5fr); align-items: baseline; gap: .25rem 1rem; border-top: 1px solid var(--hairline); padding: .65rem 0; }
.method-downloads a { width: fit-content; font-weight: 500; }
.method-downloads small { white-space: nowrap; font: .7rem var(--mono); }
.method-downloads span { font-size: .93rem; line-height: 1.5; color: var(--ink-2); }
.method-downloads code { font-size: .87em; }
.citation-box { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--hairline-strong); }
.citation-box h3 { margin-top: 1rem; }
.citation-box p { font-size: .93rem; color: var(--ink-2); }
.citation-box button { flex-shrink: 0; }
@media (max-width: 760px) {
  .method-layout { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; padding-top: .8rem; }
  .method-contents { position: static; display: flex; flex-wrap: wrap; gap: .1rem 1rem; border-bottom: 1px solid var(--hairline); padding-bottom: .8rem; }
  .method-reading > section { scroll-margin-top: 68px; }
  .method-reading > section + section { margin-top: 1.6rem; padding-top: 1.55rem; }
  .method-downloads li { grid-template-columns: 1fr; }
}

/* ==================== FILM & FRAME INSPECTOR LIGHTBOX ==================== */
.inspector-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 16, 14, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.inspector-shell {
  width: min(1320px, 100%);
  height: min(860px, calc(100vh - 40px));
  background: var(--darkroom);
  border: 1px solid #2b2824;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  overflow: hidden;
}

.inspector-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--darkroom);
}

.stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #26231f;
}

.stage-nav,
.stage-actions,
.overlay-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ov-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid #35312b;
  border-radius: 2px;
  color: #b7b0a4;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 9px;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.ov-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ov-purple .ov-dot { background: #c084fc; }
.ov-pink .ov-dot { background: #f472b6; }
.ov-social .ov-dot { background: #2dd4bf; }
.ov-motion .ov-dot { background: #fb923c; }
.ov-signs .ov-dot { background: #f59e0b; }

.ov-btn.ov-signs.active {
  border-color: #f59e0b;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.rail-signs li.is-boxed {
  cursor: pointer;
  padding: 4px 6px;
  margin: 0 -6px;
  border-radius: 2px;
  transition: background 0.12s ease;
}

.rail-signs li.is-boxed:hover {
  background: rgba(245, 158, 11, 0.12);
}

.rail-sign-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: #92400e;
  background: rgba(245, 158, 11, 0.22);
  padding: 0 4px;
  border-radius: 2px;
  margin-right: 6px;
}

.ov-btn:hover { border-color: #8f887c; color: #faf9f6; }
.ov-btn.active { background: rgba(250, 249, 246, 0.11); color: #ffffff; border-color: #faf9f6; }
.ov-purple.active { border-color: #c084fc; background: rgba(168, 85, 247, 0.22); }
.ov-pink.active { border-color: #f472b6; background: rgba(244, 114, 182, 0.22); }
.ov-social.active { border-color: #2dd4bf; background: rgba(45, 212, 191, 0.18); }
.ov-motion.active { border-color: #fb923c; background: rgba(251, 146, 60, 0.18); }

.stage-btn {
  background: transparent;
  border: 1px solid #35312b;
  border-radius: 2px;
  color: #dcd7ce;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.stage-btn:hover { border-color: #9e978b; color: #ffffff; }
.stage-btn.active { background: #faf9f6; color: var(--ink); border-color: #faf9f6; }

.stage-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
}

.stage-media-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.18s ease-out;
  transform-origin: 50% 50%;
}

.stage-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.stage-viewport.is-zoomed .stage-media-wrap {
  transform: scale(2.15);
}

.stage-viewport.is-zoomed .stage-media-wrap img {
  cursor: zoom-out;
}

.box-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.box-overlay-svg .det-hit {
  pointer-events: all;
  cursor: pointer;
  transition: opacity 0.12s ease;
}

.box-overlay-svg.has-focus .det-group { opacity: 0.28; }
.box-overlay-svg.has-focus .det-group.is-focused { opacity: 1; }

.overlay-legend {
  position: absolute;
  bottom: 10px;
  left: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(17, 16, 14, 0.78);
  padding: 4px 9px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.67rem;
  color: #dcd7ce;
  pointer-events: none;
}

.ov-leg-item { display: inline-flex; align-items: center; gap: 5px; }
.ov-leg-swatch { width: 8px; height: 8px; border-radius: 1px; border: 1.5px solid currentColor; }
.ov-leg-swatch.is-dashed { border-style: dashed; }

.ov-sep { width: 1px; height: 14px; background: #3b3630; margin: 0 2px; }
.ov-btn.ov-t1 { color: #dcd7ce; }
.ov-btn.ov-t1.active { border-color: #faf9f6; background: rgba(250, 249, 246, 0.14); color: #ffffff; }
.box-overlay-svg.is-t1-ghost { opacity: 0.45; }

.t1-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 6;
  white-space: nowrap;
  padding: 4px 9px;
  background: rgba(16, 15, 13, 0.88);
  border: 1px solid #4a453e;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #f3efe7;
  pointer-events: none;
}

.stage-viewport video {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.rail-box-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.rail-box-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.12s ease;
}

.rail-box-item:hover { background: var(--paper-subtle); }
.rail-box-num { font-family: var(--mono); font-weight: 600; color: #7e22ce; margin-right: 6px; }
.rail-box-tags { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); white-space: nowrap; }
.rail-tag-hat { color: #be185d; font-weight: 500; }
.rail-tag-amb { color: var(--ink-3); font-style: italic; }

.zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(250, 249, 246, 0.55);
  pointer-events: none;
}

.stage-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid #26231f;
  background: var(--darkroom-2);
}

.strip-thumb {
  position: relative;
  background: none;
  border: 1.5px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.58;
  transition: opacity 0.14s ease, border-color 0.14s ease;
  text-align: left;
}

.strip-thumb:hover { opacity: 0.9; }
.strip-thumb.active { opacity: 1; border-color: #faf9f6; }

.strip-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.strip-thumb-lbl {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #b7b0a4;
  padding: 3px 2px 0;
}

.inspector-rail {
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--hairline);
}

.rail-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--hairline);
}

.rail-head h2 {
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 500;
  line-height: 1.22;
  margin: 5px 0 8px;
}

.rail-note {
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 10px;
}

.rail-source { font-size: 0.77rem; }

.rail-frame-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 22px;
}

.kv-list {
  margin: 0;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.8rem;
}

.kv-row dt {
  color: var(--ink-3);
  font-size: 0.77rem;
}

.kv-row dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.77rem;
  color: var(--ink);
  text-align: right;
}

.rail-section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 16px 0 6px;
}

.rail-detail {
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.52;
  margin: 0;
}

.rail-signs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rail-signs li {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink);
  padding: 5px 0;
  border-bottom: 1px solid var(--hairline);
}

.rail-signs span {
  display: block;
  font-family: var(--sans);
  font-size: 0.71rem;
  color: var(--ink-3);
}

.rail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-top: 1px solid var(--hairline);
}

.rail-step {
  display: flex;
  gap: 16px;
}

/* ==================== FOOTER (35MM DARKROOM CELLULOID STRIP) ==================== */
.site-footer {
  margin-top: 64px;
  position: relative;
  overflow: hidden;
  background: #141311;
  color: #dcd6ca;
  font-size: 0.84rem;
  border-top: 1px solid #2a2722;
}

/* Ghosted 1906 Market Street archival film frame emulsion */
.foot-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 85% 95% at 50% 45%, rgba(20, 19, 17, 0.58) 0%, rgba(20, 19, 17, 0.94) 78%, #141311 100%),
    url("media/frames/1906_sf_market_street_f1.webp");
  background-size: cover;
  background-position: center 42%;
  filter: grayscale(1) contrast(1.12);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

/* 35mm film sprocket-hole rails top & bottom */
.foot-sprockets {
  position: relative;
  z-index: 2;
  height: 18px;
  background-color: #0e0d0c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Crect x='11' y='4.5' width='14' height='9' rx='2.2' fill='%23292622' stroke='%233b3630' stroke-width='0.6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
}

.foot-sprockets-top {
  border-bottom: 1px solid #26231e;
}

.foot-sprockets-bottom {
  border-top: 1px solid #26231e;
}

.foot-content {
  position: relative;
  z-index: 2;
  max-width: var(--maxw-wide);
}

.foot-edge-code {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0 6px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: rgba(214, 174, 108, 0.54);
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

.foot-top {
  border-top: 1px solid rgba(244, 241, 234, 0.12);
  border-bottom: 1px solid rgba(244, 241, 234, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px 56px;
  flex-wrap: wrap;
  padding: 28px 0 32px;
}

.foot-brand-col {
  max-width: 390px;
}

.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #f6f3ec;
  text-decoration: none;
  margin-bottom: 10px;
}

.foot-mark:hover {
  color: #ffffff;
}

.foot-logo {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
}

.foot-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.55;
  color: #b4ada0;
  margin: 0;
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  display: grid;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: 48px;
  row-gap: 8px;
}

.foot-links a {
  color: #cbc4b7;
  text-decoration: none;
  font-size: 0.83rem;
  transition: color 0.14s ease;
}

.foot-links a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-cameo-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: #f6f3ec !important;
}

.foot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dd4bf;
  display: inline-block;
}

.foot-sig {
  position: relative;
  padding: 26px 0 30px;
}

.foot-sig-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 400;
  color: #a49d90;
}

.signature .sig-name {
  font-weight: 600;
  color: #f6f3ec;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 241, 234, 0.34);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.signature .sig-name:hover {
  color: #ffffff;
  border-bottom-color: #f6f3ec;
}

.signature .sig-logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: 2px;
  box-shadow: 0 0 0 1px rgba(244, 241, 234, 0.28);
  transition: transform 0.28s ease;
}

.signature .sig-logo:hover {
  transform: rotate(-8deg);
}

.signature .sig-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.coffee-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #d7b272;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid rgba(215, 178, 114, 0.32);
  border-radius: 999px;
  background: rgba(215, 178, 114, 0.06);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.coffee-link:hover {
  background: rgba(215, 178, 114, 0.15);
  border-color: rgba(215, 178, 114, 0.65);
  color: #f3d69d;
}

.footer-keys {
  position: absolute;
  right: 0;
  top: 32px;
  font-size: 0.7rem;
  color: #857e72;
}

.footer-keys kbd {
  font-family: var(--mono);
  font-size: 0.65rem;
  border: 1px solid rgba(244, 241, 234, 0.2);
  border-radius: 2px;
  padding: 0 4px;
  color: #bfb8ab;
  background: rgba(255, 255, 255, 0.04);
}

/* ==================== NOTABLE CAMEOS (CURATOR'S CABINET) ==================== */
.cameos-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 24px 40px;
  align-items: end;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 36px;
}

.cameos-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  margin: 0 0 8px;
}

.cameos-intro {
  max-width: 680px;
  margin-top: 8px;
}

.cameos-fairuse-note {
  padding: 12px 14px;
  border-left: 2px solid var(--hairline-strong);
  background: rgba(235, 231, 222, 0.34);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.cameos-fairuse-note p {
  margin: 5px 0 0;
}

.cameos-section {
  margin-bottom: 52px;
}

.cameos-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}

.cameos-section-head h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
}

.cameos-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cameo-card {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 24px 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}

.cameo-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cameo-media-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cameo-frame-wrap {
  position: relative;
  background: #141311;
  border: 1px solid #1c1a17;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(20, 19, 17, 0.16);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.cameo-frame-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.cameo-frame-wrap:hover img {
  transform: scale(1.02);
}

.cameo-frame-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(20, 19, 17, 0.84);
  color: #f9f8f4;
  font-family: var(--mono);
  font-size: 0.67rem;
  padding: 3px 7px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.cameo-media-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.cameo-body-col {
  min-width: 0;
}

.cameo-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.cameo-badge {
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.cameo-badge-verified {
  background: rgba(23, 90, 85, 0.11);
  color: var(--teal);
}

.cameo-badge-probable {
  background: rgba(154, 106, 28, 0.14);
  color: #8a5a10;
}

.cameo-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 4px;
  color: var(--ink);
}

.cameo-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-2);
  margin: 0 0 10px;
}

.cameo-beat {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent, #a23628);
  margin: 0 0 12px;
  line-height: 1.45;
}

.cameo-summary {
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0 0 14px;
}

.cameo-context-box {
  background: rgba(23, 90, 85, 0.055);
  border-left: 2.5px solid var(--teal);
  padding: 11px 14px;
  margin-bottom: 14px;
}

.cameo-context-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 5px;
}

.cameo-context-head strong {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal);
}

.cameo-context-stats {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-2);
}

.cameo-context-box p {
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.cameo-prov {
  font-family: var(--mono);
  font-size: 0.71rem;
  line-height: 1.55;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.cameo-prov a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cameo-prov a:hover {
  color: var(--ink);
}

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

.cameo-corpus-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cameo-corpus-thumb {
  aspect-ratio: 4 / 3;
  background: #141311;
  border: 1px solid #1c1a17;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(20, 19, 17, 0.14);
  overflow: hidden;
  position: relative;
}

.cameo-corpus-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.cameo-corpus-card:hover .cameo-corpus-thumb img {
  transform: scale(1.03);
}

.cameo-corpus-card h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.cameo-corpus-card:hover h3 {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cameo-corpus-card p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}

.cameos-neg-intro {
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--ink-2);
  margin: 0 0 14px;
  max-width: 720px;
}

/* Forensic Plate Lightbox */
.plate-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(14, 13, 12, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.plate-lightbox[hidden] {
  display: none;
}

.plate-lb-inner {
  background: #161513;
  color: #f9f8f4;
  border: 1px solid #302d28;
  border-radius: 3px;
  max-width: 1280px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.plate-lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #2c2924;
}

.plate-lb-bar h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  margin: 2px 0 0;
  color: #faf9f6;
}

.plate-lb-bar .micro-label {
  color: #a69f93;
}

.plate-lb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plate-lb-stage {
  overflow: auto;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0e0d;
}

.plate-lb-stage img {
  max-width: 100%;
  max-height: 78vh;
  height: auto;
  display: block;
}

.chart-tooltip {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  background: rgba(20, 19, 17, 0.94);
  color: #faf9f6;
  padding: 8px 11px;
  border-radius: 2px;
  font-size: 0.76rem;
  max-width: 280px;
  line-height: 1.4;
}

.chart-tooltip[hidden] { display: none; }

.tt-title { font-weight: 500; margin-bottom: 3px; }
.tt-mono { font-family: var(--mono); font-size: 0.7rem; color: #cbc5ba; }

/* ==================== WARDROBE CATALOG & CASUALIZATION ==================== */
.wardrobe-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

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

.w-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.w-card-plate {
  position: relative;
  aspect-ratio: 4 / 4.2;
  background: var(--darkroom);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.w-card-plate.is-compact {
  aspect-ratio: 1 / 1;
}

.w-card-plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.w-card:hover .w-card-plate img {
  transform: scale(1.04);
}

.w-card:hover .w-card-plate {
  border-color: var(--ink-2);
}

.w-plate-badge {
  position: absolute;
  left: 7px;
  bottom: 7px;
  background: rgba(18, 17, 15, 0.84);
  color: #f4f1ea;
  font-family: var(--mono);
  font-size: 0.64rem;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.01em;
}

.w-plate-cat {
  position: absolute;
  right: 7px;
  top: 7px;
  background: rgba(18, 17, 15, 0.74);
  color: #d6d0c4;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 5px;
  border-radius: 2px;
}

.w-plate-cycle-idx {
  position: absolute;
  left: 7px;
  top: 7px;
  background: rgba(23, 90, 85, 0.9);
  color: #f9f8f4;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  padding: 2px 5px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.w-plate-cycle-idx.is-visible {
  opacity: 1;
}

.w-plate-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.w-card.is-cycling .w-plate-progress {
  opacity: 1;
}

.w-plate-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #2dd4bf;
  transition: width 0.22s ease;
}

.w-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.w-card-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

.w-card:hover .w-card-title {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.w-card-count {
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--accent, #175a55);
  white-space: nowrap;
}

.w-card-meta {
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--ink-3);
  margin: 0 0 7px;
}

.w-spark {
  width: 100%;
  height: 24px;
  display: block;
}

.w-card-sub {
  font-size: 0.74rem;
  color: var(--ink-2);
  margin: 5px 0 0;
  line-height: 1.38;
}

.wardrobe-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 10px;
}

.w-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 24px;
}

.w-detail-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.w-detail-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.15;
}

.w-detail-desc {
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 14px;
  max-width: 56ch;
}

.w-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-2);
}

.w-detail-stats strong {
  color: var(--ink);
  font-weight: 500;
}

.w-detail-chart {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--hairline);
  padding: 12px 14px 8px;
}

.w-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.w-specimen-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 12px;
}

.w-grab {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.w-grab-frame {
  position: relative;
  aspect-ratio: 3 / 3.5;
  background: var(--darkroom);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.w-grab-frame.is-head {
  aspect-ratio: 1 / 1;
}

.w-grab-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.w-grab:hover .w-grab-frame {
  border-color: var(--ink);
}

.w-grab:hover .w-grab-frame img {
  transform: scale(1.05);
}

.w-grab-yr {
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

.w-grab-place {
  font-size: 0.72rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.det-highlight-ring {
  pointer-events: none;
  animation: boxPulse 1.4s ease-in-out infinite;
}

@keyframes boxPulse {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.35; }
}

/* ==================== ROBUSTNESS & COVERAGE SECTION (METHOD) ==================== */
/* ==================== FULL-BLEED DARKROOM INTERLUDE (WARDROBE LIGHT TABLE) ==================== */
.darkroom-interlude {
  background: #141311;
  color: #f4f1ea;
  border-top: 1px solid #2b2722;
  border-bottom: 1px solid #2b2722;
  padding: 58px 0 64px;
  margin: 0;
  position: relative;
}

#casualization {
  border-bottom: none;
  padding-bottom: 48px;
}

.interlude-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.12);
}

.interlude-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7b272;
  margin-bottom: 8px;
}

.interlude-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #faf8f3;
  margin: 0 0 8px;
}

.interlude-sub {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #a8a194;
  margin: 0;
  max-width: 580px;
}

.interlude-cta {
  color: #f4f1ea !important;
  border-bottom: 1px solid rgba(244, 241, 234, 0.35);
  padding-bottom: 2px;
}

.interlude-cta:hover {
  color: #2dd4bf !important;
  border-bottom-color: #2dd4bf;
  text-decoration: none;
}

.darkroom-interlude .w-card-plate {
  border-radius: 0;
  border: 1px solid #2e2a25;
  background: #0b0a09;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.darkroom-interlude .w-card:hover .w-card-plate {
  border-color: #2dd4bf;
}

.darkroom-interlude .w-card-title {
  color: #f6f3ec;
}

.darkroom-interlude .w-card:hover .w-card-title {
  color: #2dd4bf;
}

.darkroom-interlude .w-card-count {
  color: #2dd4bf;
}

.darkroom-interlude .w-card-meta,
.darkroom-interlude .w-card-sub {
  color: #9e978a;
}

.darkroom-interlude .w-spark rect {
  fill: #2dd4bf;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .finding-header { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .margin-notes { display: none; }
  .mobile-footnotes { display: block; }
  .film-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wardrobe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wardrobe-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .w-specimen-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .w-detail-head { grid-template-columns: minmax(0, 1fr); }
  .sign-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inspector-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 46%); height: calc(100vh - 24px); }
  .inspector-stage { min-height: 0; }
  .inspector-rail { min-height: 0; overflow-y: auto; border-left: none; border-top: 1px solid var(--hairline); }
}

@media (max-width: 760px) {
  .shell { padding: 0 18px; }
  .site-header { background: var(--paper); backdrop-filter: none; }
  .header-inner { position: relative; height: 52px; }
  #mobile-menu { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; }
  #mobile-menu[aria-expanded="false"] + .header-right { display: none; }
  .header-right {
    position: absolute; top: 100%; right: 0; height: auto;
    width: min(16rem, 100%); max-height: calc(100dvh - 52px); overflow-y: auto;
    display: block; padding: 6px 16px 10px; background: var(--paper);
    border: 1px solid var(--hairline-strong); box-shadow: 0 6px 18px #241e141a;
  }
  .primary-nav { display: grid; height: auto; gap: 0; }
  .primary-nav .nav-tab { min-height: 44px; font-size: 1rem; }
  .primary-nav .nav-tab.active { color: var(--teal); font-weight: 650; }
  .primary-nav .nav-tab.active::after, .primary-nav .nav-count { display: none; }
  .header-donate { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; }
  #motor-mode-controls { display: none; }
  .motor-picker { display: flex; width: 100%; align-items: center; gap: 10px; color: var(--ink-2); font-size: .85rem; }
  .motor-picker select {
    min-width: 0; max-width: 100%; flex: 1; height: 44px; padding: 0 8px;
    border: 1px solid var(--hairline-strong); border-radius: 3px;
    background: var(--paper); color: var(--ink); font: inherit;
  }
  #motor-chart svg[role="slider"] { cursor: crosshair; touch-action: pan-y pinch-zoom; }
  #motor-chart svg:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
  .motor-era { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0; gap: 8px; }
  .motor-era strong { font: 500 .9rem var(--mono); }
  .motor-era span { color: var(--ink-2); font-size: .77rem; }
  .motor-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: .81rem; line-height: 1.5; color: var(--ink-2); }
  .motor-legend-item::before { content: ""; display: inline-block; width: .75rem; margin-right: .3rem; vertical-align: middle; border-top: 2px solid var(--series-color); }
  .motor-legend-item.is-dashed::before { border-top-style: dashed; }
  .motor-legend-item.is-dot::before { width: 7px; height: 7px; background: var(--series-color); border: 0; border-radius: 50%; }
  .motor-legend.has-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
  .motor-legend-item b { display: block; color: var(--ink); font: 500 1rem/1.5 var(--mono); }
  #motor-footnote { color: var(--ink-2); }
  .view { padding: 34px 0 64px; }
  .ledger-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .ledger-item:nth-child(odd) { padding-left: 0; border-left: none; }
  .filmstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .specimen-row,
  .specimen-triptych,
  .drawer-stats,
  .diptych-grid,
  .two-col,
  .comparator-grid,
  .sign-gallery { grid-template-columns: minmax(0, 1fr); }
  .wardrobe-grid,
  .wardrobe-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .w-specimen-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .control-cell + .control-cell { padding-left: 0; border-left: none; border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 14px; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .cameos-header,
  .cameo-card { grid-template-columns: minmax(0, 1fr); }
  .cameos-corpus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-links { grid-template-rows: repeat(5, auto); column-gap: 28px; }
  .footer-keys { position: static; display: block; text-align: center; margin-top: 14px; }
}

@media (max-width: 370px) {
  .foot-links { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; }
}

/* A featured passage with an optional linked heading. */
.featured-text {
  margin: 2rem 0 0;
  padding: clamp(1.1rem, 2.6vw, 1.85rem) clamp(1.2rem, 3.3vw, 2.25rem);
  border: 1px solid var(--hairline-strong);
  border-inline-start: 4px solid var(--vermilion);
  background: var(--paper-subtle);
}
.featured-text h2 { margin: 0 0 .45rem; font: 500 clamp(1.55rem, 3vw, 2.1rem)/1.15 var(--serif); }
.featured-text h2 a { text-decoration-thickness: 1px; text-underline-offset: .16em; }
.featured-text a:hover { color: var(--vermilion); }
.featured-text h2 a span { font: .63em var(--sans); color: var(--vermilion); }
.featured-text p { max-width: 66ch; margin: 0; font: 1.05rem/1.55 var(--sans); color: var(--ink-2); }

/* ==================== CITY TIME MACHINE (COMPARE) ==================== */
.compare-mode-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tm-city-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.tm-city-pill {
  border: 1px solid var(--hairline-strong);
  background: var(--paper-subtle);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font: 500 .88rem/1.2 var(--sans);
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}
.tm-city-pill:hover {
  border-color: var(--ink);
  background: #efebe2;
}
.tm-city-pill span {
  font: 400 .73rem/1 var(--mono);
  color: var(--ink-2);
}
.tm-city-pill.active {
  background: #141311;
  border-color: #141311;
  color: #f6f2e8;
}
.tm-city-pill.active span {
  color: #d8a75b;
}

.tm-theater {
  position: relative;
  background: #141311;
  color: #f3eee3;
  border: 1px solid #2b2822;
  padding: 18px 20px 20px;
  margin-bottom: 20px;
  box-shadow: 0 18px 44px rgba(18, 16, 12, 0.16);
}
.tm-theater::before,
.tm-theater::after {
  content: "";
  display: block;
  height: 7px;
  margin: -10px -12px 14px;
  opacity: 0.34;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 10px,
    #877c68 10px 18px,
    transparent 18px 28px
  );
}
.tm-theater::after {
  margin: 16px -12px -12px;
}
.tm-theater-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tm-theater-id {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tm-edge-code {
  font: 500 .74rem/1.2 var(--mono);
  letter-spacing: .12em;
  color: #d8a75b;
  text-transform: uppercase;
}
.tm-stop-pill {
  font: 400 .72rem/1.2 var(--mono);
  color: #a8a092;
  border: 1px solid #35312a;
  padding: 3px 8px;
}
.tm-theater-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tm-btn {
  border: 1px solid #403c34;
  background: #1e1c18;
  color: #f1ece2;
  padding: 6px 12px;
  font: 500 .76rem/1.2 var(--mono);
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.tm-btn:hover { background: #2d2a24; border-color: #6b6355; }
.tm-btn[aria-pressed="true"],
.tm-btn.is-on {
  background: var(--teal);
  border-color: #298981;
  color: #fff;
}
.tm-btn-accent {
  border-color: #91692c;
  color: #f7d9a3;
}
.tm-btn-accent[aria-pressed="true"] {
  background: #a23628;
  border-color: #d05848;
  color: #fff;
}

.tm-stage-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}
.tm-arrow {
  height: 72px;
  border: 1px solid #302d27;
  background: rgba(28, 26, 22, 0.85);
  color: #e9e3d7;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.tm-arrow:hover { background: #2d2a24; border-color: #877c68; }

.tm-aperture {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 540px;
  width: 100%;
  margin: 0 auto;
  background: #080807;
  border: 2px solid #2b2822;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-media-slot {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-media-inner {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}
.tm-media-inner video,
.tm-media-inner img {
  display: block;
  max-width: 100%;
  max-height: 536px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.tm-media-inner svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tm-year-stamp {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 6;
  pointer-events: none;
  background: rgba(14, 13, 11, 0.78);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(216, 167, 91, 0.36);
  padding: 7px 13px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tm-year-big {
  font: 500 clamp(1.85rem, 3.2vw, 2.7rem)/0.95 var(--serif);
  color: #faf6ed;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tm-year-delta {
  font: 400 .69rem/1.1 var(--mono);
  color: #d8a75b;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tm-shutter {
  position: absolute;
  inset: 0;
  background: #0b0a09;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity .22s ease;
}
.tm-shutter.flash { opacity: 0.72; transition: opacity .05s ease; }

.tm-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  z-index: 7;
}
.tm-progress-bar {
  height: 100%;
  width: 0%;
  background: #d8a75b;
}

/* Proportional chronological scrubber */
.tm-scrubber-wrap {
  margin: 22px 54px 16px;
}
.tm-track {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}
.tm-track-rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #3a362e;
}
.tm-track-fill {
  position: absolute;
  left: 0;
  height: 2px;
  background: #d8a75b;
  transition: width .25s ease;
}
.tm-node {
  position: absolute;
  transform: translate(-50%, 0);
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
.tm-node-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #141311;
  border: 2px solid #92897a;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tm-node:hover .tm-node-dot {
  border-color: #f6e7c8;
  transform: scale(1.22);
}
.tm-node.active .tm-node-dot {
  background: #d8a75b;
  border-color: #fff6e0;
  transform: scale(1.38);
  box-shadow: 0 0 0 5px rgba(216, 167, 91, 0.22);
}
.tm-node-yr {
  position: absolute;
  top: 24px;
  font: 400 .69rem/1 var(--mono);
  color: #9e9688;
  white-space: nowrap;
}
.tm-node.active .tm-node-yr {
  color: #f7e6c4;
  font-weight: 600;
}
.tm-axis-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font: 400 .68rem/1 var(--mono);
  color: #777064;
  letter-spacing: .04em;
}

.tm-telemetry {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2b2822;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.65fr);
  gap: 18px;
  align-items: center;
}
.tm-tel-desc h3 {
  margin: 0 0 4px;
  font: 500 1.08rem/1.25 var(--serif);
  color: #faf6ed;
}
.tm-tel-desc p {
  margin: 0 0 8px;
  font-size: .84rem;
  line-height: 1.5;
  color: #b5aea1;
}
.tm-tel-desc .tm-inspect-link {
  background: none;
  border: 0;
  padding: 0;
  color: #63c7be;
  font: 500 .78rem/1 var(--mono);
  cursor: pointer;
}
.tm-tel-desc .tm-inspect-link:hover { text-decoration: underline; }
.tm-tel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.tm-stat {
  background: #1c1a17;
  border: 1px solid #2d2a24;
  padding: 9px 10px;
}
.tm-stat-k {
  display: block;
  font: 400 .66rem/1.1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #978f81;
  margin-bottom: 4px;
}
.tm-stat-v {
  display: block;
  font: 500 1.05rem/1.15 var(--serif);
  color: #f8f4ea;
}
.tm-stat-sub {
  display: block;
  font: 400 .68rem/1.2 var(--mono);
  color: #9e9688;
  margin-top: 2px;
}

.tm-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tm-filmstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.tm-card {
  text-align: left;
  background: var(--paper-subtle);
  border: 1.5px solid var(--hairline-strong);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.tm-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.tm-card.active {
  border-color: #141311;
  box-shadow: 0 0 0 2px #141311;
}
.tm-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #141311;
  overflow: hidden;
}
.tm-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tm-card-yr {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(20, 19, 17, 0.86);
  color: #faf6ed;
  font: 500 .72rem/1 var(--mono);
  padding: 3px 6px;
}
.tm-card-clip {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(23, 90, 85, 0.9);
  color: #fff;
  font: 500 .62rem/1 var(--mono);
  padding: 2px 5px;
  letter-spacing: .04em;
}
.tm-card-body {
  padding: 8px 9px 9px;
}
.tm-card-title {
  display: block;
  font: 500 .8rem/1.25 var(--sans);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tm-card-sub {
  display: block;
  margin-top: 3px;
  font: 400 .7rem/1.2 var(--mono);
  color: var(--ink-2);
}

/* ==================== GARMENT COMPARISON STUDIO (WARDROBE) ==================== */
.garment-studio {
  background: var(--paper-subtle);
  border: 1px solid var(--hairline-strong);
  padding: 20px 22px 22px;
  margin: 0 0 28px;
}
.gs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.gs-title {
  margin: 3px 0 0;
  font: 500 clamp(1.3rem, 2.2vw, 1.65rem)/1.18 var(--serif);
}
.gs-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.gs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.gs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  padding: 5px 10px;
  font: 500 .8rem/1.2 var(--sans);
  color: var(--ink);
}
.gs-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.gs-chip-x {
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.gs-chip-x:hover { color: var(--vermilion); }
.gs-add-wrap select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font: 400 .82rem var(--sans);
}
.gs-chart-wrap {
  background: #faf9f6;
  border: 1px solid var(--hairline);
  padding: 10px 8px 6px;
}
.gs-chart-wrap svg { display: block; width: 100%; height: auto; }
.gs-specimen-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.gs-spec-card {
  display: flex;
  gap: 11px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-left: 3.5px solid var(--gs-col, var(--teal));
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, transform .14s ease;
}
.gs-spec-card:hover {
  border-color: var(--ink);
  border-left-color: var(--gs-col, var(--teal));
  transform: translateY(-1px);
}
.gs-spec-card img {
  width: 54px;
  height: 64px;
  object-fit: cover;
  background: #141311;
  flex: none;
}
.gs-spec-info { min-width: 0; }
.gs-spec-info strong {
  display: block;
  font: 500 .86rem/1.2 var(--sans);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-spec-info span {
  display: block;
  margin-top: 3px;
  font: 400 .72rem/1.3 var(--mono);
  color: var(--ink-2);
}

@media (max-width: 780px) {
  .tm-theater { padding: 14px 12px 16px; }
  .tm-stage-wrap { grid-template-columns: 1fr; }
  .tm-arrow { display: none; }
  .tm-scrubber-wrap { margin: 16px 8px 12px; }
  .tm-telemetry { grid-template-columns: 1fr; }
  .tm-tel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-filmstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garment-studio { padding: 15px 14px; }
}
