/* DexSuite data viewer page (on top of site.css) */
.dv-page { background: var(--bg); }
.nav .links a.cur { opacity: 1; font-weight: 600; }
.dv-head { padding: calc(var(--nav-h) + 72px) 0 36px; }
.dv-head .lede { margin-top: 18px; }

/* task picker */
.dv-picker { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.dv-picker button {
  flex: 0 0 196px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; scroll-snap-align: start;
  font-family: inherit; color: var(--ink);
}
.dv-picker img { width: 196px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--bg-2);
  outline: 2px solid transparent; outline-offset: 3px; transition: outline-color .2s, transform .2s; }
.dv-picker button:hover img { transform: translateY(-2px); }
.dv-picker button.on img { outline-color: var(--blue); }
.dv-picker b { display: block; font-size: 15px; font-weight: 600; margin-top: 10px; letter-spacing: -0.01em; }
.dv-picker small { font-size: 12px; color: var(--ink-3); }

/* title + controls */
.dv-main { padding: 26px 0 40px; }
.dv-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.dv-title { font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -0.03em; }
.dv-sub { font-size: 17px; color: var(--ink-2); margin-top: 6px; max-width: 52ch; }
.dv-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 980px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); padding: 7px 14px;
  border-radius: 980px; cursor: pointer; white-space: nowrap; transition: background .2s, box-shadow .2s;
}
.seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); font-weight: 600; }
.seg button:focus-visible, .dv-picker button:focus-visible, .play:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.seg.small button { padding: 7px 12px; min-width: 34px; }

/* cameras: one clip holds both cameras side by side; each tile shows its half */
.dv-cams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dv-cams figure { margin: 0; }
.cam { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 22px; background: #111; }
.cam video { position: absolute; top: 0; left: 0; height: 100%; width: 200%; max-width: none; object-fit: cover; }
.cam.wrist video { left: -100%; }
.dv-cams figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; text-align: center; }

/* transport */
.dv-transport { display: flex; align-items: center; gap: 16px; margin: 18px 0 30px; }
.play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; position: relative; flex: none; }
.play span { position: absolute; inset: 0; margin: auto; width: 12px; height: 14px; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.play.paused span { width: 0; height: 0; border: 0; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 15px; }
#dv-scrub { flex: 1; accent-color: var(--ink); height: 4px; }
.time { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink-2); min-width: 64px; text-align: right; }

/* charts */
.dv-charts { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.chart-card { background: var(--bg-2); border-radius: 22px; padding: 20px 22px 14px; }
.chart-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.chart-head p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.dv-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.dv-legend i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 6px; }
.chart-card svg { width: 100%; height: 190px; display: block; margin-top: 6px; cursor: crosshair; }
svg .grid { stroke: #e3e3e8; stroke-width: 1; }
svg .axis { fill: var(--ink-3); font-size: 11px; font-family: Inter, sans-serif; }
svg .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg .area { stroke: none; opacity: 0.12; }
svg .end { fill: var(--ink-2); font-size: 11px; font-family: Inter, sans-serif; }
svg .playhead { stroke: var(--ink); stroke-width: 1.2; }
svg .hover { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.dv-tip { position: absolute; pointer-events: none; background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 13px;
  color: var(--ink-2); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); white-space: nowrap; z-index: 3; }
.dv-tip strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }
.dv-tip i { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 6px; }

/* facts */
.dv-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.dv-facts > div { background: var(--bg-2); border-radius: 18px; padding: 18px 20px; }
.dv-facts .wide { grid-column: span 3; }
.dv-facts span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 6px; }
.dv-facts b { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.dv-facts .chips span { display: inline-block; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); background: #fff;
  border-radius: 980px; padding: 5px 12px; margin: 0 6px 6px 0; }
.dv-cta { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.dv-cta .pill[hidden] { display: none; }
.dv-note { font-size: 14px; color: var(--ink-3); }
.dv-foot { padding: 40px 0 60px; }

@media (max-width: 900px) {
  .dv-cams, .dv-charts { grid-template-columns: 1fr; }
  .dv-facts { grid-template-columns: 1fr 1fr; }
  .dv-facts .wide { grid-column: span 2; }
  .dv-head { padding-top: calc(var(--nav-h) + 40px); }
}
