/* The figure viewer (figures/viewer.js): hover notes, full screen, zoom and pan, and a
   walk-through. Its own palette, so it reads the same on the light tracker and the dark
   interview pages; figures always sit on white. */
[data-fig] { cursor: zoom-in; position: relative; }
[data-fig]:focus-visible { outline: 2px solid #3f6ea8; outline-offset: 3px; }
[data-fig] [data-n], [data-fig] [data-e] { cursor: pointer; }
[data-fig] [data-n].fv-hover rect, [data-fig] [data-n].fv-hover circle, [data-fig] [data-n].fv-hover ellipse { stroke-width: 2.2; }
[data-fig] [data-e].fv-hover path, [data-fig] [data-e].fv-hover line { stroke-width: 2.4; }
.fv-hit { stroke: transparent; stroke-width: 12; fill: none; }

.fv-tip { position: fixed; z-index: 1001; display: none; max-width: 300px; padding: 9px 12px; background: #16161c; color: #f2f1ee;
  font: 13.5px/1.45 "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; }
.fv-tip b { display: block; font-size: var(--fs-sm, 13px); }
.fv-tip span { display: block; color: #c9c8d2; margin-top: 3px; }

html.fv-open, html.fv-open body { overflow: hidden; }
.fv { position: fixed; inset: 0; z-index: 1000; display: none; flex-direction: column; background: #f4f3ef; color: #1a1a19;
  font-family: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif; }
.fv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 18px; border-bottom: 1px solid #d9d6cd; background: #fbfaf7; }
.fv-title { font-size: var(--fs-lg, 17px); font-weight: 600; flex: 1; min-width: 0; }
.fv-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fv-b { font: inherit; font-size: var(--fs-sm, 13px); min-width: 34px; height: 32px; padding: 0 10px; border: 1px solid #c3c0b7; background: #fff; color: #1a1a19; cursor: pointer; border-radius: 6px; }
.fv-b:hover { border-color: #1a1a19; }
.fv-b:focus-visible { outline: 2px solid #3f6ea8; outline-offset: 1px; }
.fv-walk { font-weight: 700; }
.fv-x { font-size: var(--fs-lg, 17px); margin-left: 8px; }
.fv-count { font-size: var(--fs-sm, 13px); color: #6b6a65; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.fv-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.fv-stage { position: relative; overflow: hidden; background: #fff; cursor: grab; touch-action: none; }
.fv-stage:active { cursor: grabbing; }
.fv-pan { position: absolute; inset: 0; display: grid; place-items: center; padding: 32px; transform-origin: 0 0; color: #1a1a19; }
.fv-wrap { margin: 0 !important; padding: 0 !important; border: 0 !important; width: 100%; height: 100%; display: grid; place-items: center; overflow: visible !important; box-shadow: none !important; }
.fv-pan svg { width: 100%; height: 100%; max-height: calc(100vh - 140px); min-width: 0 !important; max-width: none !important; }
.fv-pan svg.fv-dim [data-n], .fv-pan svg.fv-dim [data-e] { opacity: .28; transition: opacity .15s ease; }
.fv-pan svg.fv-dim .fv-on { opacity: 1; }
.fv-pan .fv-on rect, .fv-pan .fv-on circle, .fv-pan .fv-on ellipse { stroke-width: 2.6; }
.fv-pan .fv-on path, .fv-pan .fv-on line { stroke-width: 2.6; }
.fv-side { overflow-y: auto; padding: 22px 24px 30px; border-left: 1px solid #d9d6cd; font-size: var(--fs-md, 15px); line-height: 1.55; }
.fv-cap { color: #33322e; }
.fv-cap b { color: #1a1a19; }
.fv-hint { color: #6b6a65; font-size: var(--fs-sm, 13px); margin-top: 14px; }
.fv-kind { font-size: var(--fs-sm, 13px); font-weight: 600; color: #6b6a65; margin: 18px 0 4px; }
.fv-kind:first-child { margin-top: 0; }
.fv-sel h3 { font-size: var(--fs-lg, 17px); line-height: 1.3; margin: 0 0 10px; }
.fv-sel p { margin: 0 0 12px; }
.fv-links { margin: 0 0 16px; padding: 0; list-style: none; }
.fv-links li { margin: 0 0 8px; padding-left: 14px; position: relative; }
.fv-links li::before { content: ""; position: absolute; left: 0; top: .75em; width: 5px; height: 1.5px; background: #6b6a65; }
.fv-links a { color: #1a1a19; text-decoration: underline; text-decoration-color: #c3c0b7; text-underline-offset: 3px; }
.fv-links a:hover { text-decoration-color: #1a1a19; }
.fv-link { border: 0; background: none; padding: 0; height: auto; min-width: 0; text-decoration: underline; color: #55544f; font-size: var(--fs-sm, 13px); }
@media (max-width: 800px) {
  .fv-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); }
  .fv-side { border-left: 0; border-top: 1px solid #d9d6cd; }
  .fv-title { font-size: var(--fs-md, 15px); flex-basis: 100%; }
  .fv-tools { gap: 4px; }
  .fv-b { min-width: 30px; height: 30px; padding: 0 8px; }
  .fv-x { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .fv-pan svg.fv-dim [data-n], .fv-pan svg.fv-dim [data-e] { transition: none; } }
