/* ==========================================================================
   itsfully.online — Video watch page + player
   Same bench-dark system as the rest of the site: graphite panels, hairline
   borders, mono readouts, one vermilion accent spent on the playhead and the
   play affordance. No gradients, no glow, no glass.
   The film's own background is a deep navy (#090c15); the frame matches it so
   a letterboxed edge never shows as a seam.
   ========================================================================== */

/* ── Page head ─────────────────────────────────────────────────────── */
.vid-intro { padding-top: var(--s-7); padding-bottom: var(--s-4); }
.vid-h1 {
  margin: 0 0 var(--s-4);
  font-size: clamp(1.5rem, 3.1vw, 2.35rem);   /* one line on desktop so the controls stay near the fold */
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}
.vid-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--ink-3);
}
@media (min-width: 720px) {
  .vid-meta span + span::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.9em;
    margin-right: var(--s-5);
    vertical-align: -0.1em;
    background: var(--line-3);
  }
}

/* ── Player ────────────────────────────────────────────────────────── */
.vp {
  position: relative;
  scroll-margin-top: calc(var(--header-height) + var(--s-4));
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-4);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.vp-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #090c15;
  overflow: hidden;
}
.vp-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090c15;
}
.vp-fallback { padding: var(--s-6); color: var(--ink-2); }
.vp.is-enhanced .vp-frame { cursor: pointer; }
.vp-frame:focus-visible { outline-offset: -3px; }

/* Duration badge while the poster is showing */
.vp-badge {
  position: absolute;
  right: var(--s-4);
  bottom: var(--s-4);
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.6;
  color: var(--ink-1);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  pointer-events: none;
}
.vp:not(.is-enhanced) .vp-badge,
.vp.is-started:not(.is-ended) .vp-badge { display: none; }

/* Big play / replay button, shown before the first play and after the end */
.vp-big {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 0;
  color: var(--ink-inverse);
  background: var(--accent);
  border: 0;
  border-radius: var(--r-4);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), scale var(--d-fast) var(--ease);
}
.vp-big:hover { background: #ff8466; }
.vp-big:active { scale: 0.96; }
.vp-big-ic { grid-area: 1 / 1; display: grid; place-items: center; }
.vp-big .ic { width: 30px; height: 30px; }
.vp-big-ic--play .ic { translate: 2px 0; }
.vp-big-ic--replay { display: none; }
.vp.is-ended .vp-big-ic--play { display: none; }
.vp.is-ended .vp-big-ic--replay { display: grid; }
.vp.is-started:not(.is-ended) .vp-big { display: none; }

/* Captions: drawn by the script (not the browser) so they can sit above the
   control bar in fullscreen. Opaque panel, not a blur: legible on any frame. */
.vp-captions {
  position: absolute;
  left: 50%;
  bottom: var(--vp-cap-bottom, 7%);
  translate: -50% 0;
  max-width: min(86%, 46em);
  text-align: center;
  pointer-events: none;
  transition: bottom var(--d-base) var(--ease);
}
.vp-captions:empty { display: none; }
.vp-captions > * {
  display: inline;
  padding: 0.12em 0.55em;
  font-size: clamp(0.8rem, 2.15vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-1);
  white-space: pre-line;
  background: rgba(9, 12, 21, 0.9);
  border-radius: var(--r-1);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.vp-error {
  position: absolute;
  inset: auto var(--s-4) var(--s-4) var(--s-4);
  display: grid;
  gap: 2px;
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-small);
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--err);
  border-radius: var(--r-2);
}
.vp-error strong { color: var(--ink-1); }

/* ── Control bar ───────────────────────────────────────────────────── */
.vp-bar {
  position: relative;
  padding: var(--s-3) var(--s-4) var(--s-2);
  background: var(--bg-2);
  border-top: 1px solid var(--line-1);
}
.vp svg.ic {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vp svg.ic--fill { fill: currentColor; stroke: none; }

/* Timeline: one segment per chapter, widths proportional to chapter length */
.vp-timeline {
  position: relative;
  padding: 9px 0 0;
  outline-offset: 4px;
  cursor: pointer;
  touch-action: pan-y;
}
.vp-segs {
  display: flex;
  gap: 3px;
  height: 6px;
  align-items: stretch;
  transition: height var(--d-fast) var(--ease), margin var(--d-fast) var(--ease);
}
.vp-timeline:hover .vp-segs,
.vp-timeline:focus-visible .vp-segs,
.vp-timeline.is-scrubbing .vp-segs { height: 10px; margin-top: -2px; }
.vp-seg {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background: var(--line-2);
  border-radius: 1px;
  overflow: hidden;
}
.vp-seg i {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: left center;
  transform: scaleX(0);
}
.vp-seg-buf { background: var(--line-3); }
.vp-seg-fill { background: var(--accent); }

/* Chapter names under the segments (hidden when the bar is narrow) */
.vp-ruler {
  display: flex;
  gap: 3px;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
}
.vp-ruler span { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; }
.vp-ruler span.is-current { color: var(--ink-1); }

.vp-head {
  position: absolute;
  left: 0;
  top: 5px;
  width: 2px;
  height: 18px;
  margin-left: -1px;
  background: var(--ink-1);
  border-radius: 1px;
  pointer-events: none;
  will-change: transform;
}

/* Scrub preview */
.vp-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0 var(--s-3);
  width: 172px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line-3);
  border-radius: var(--r-2);
  pointer-events: none;
}
.vp-tip-thumb {
  grid-column: 1 / -1;
  display: block;
  width: 160px;
  height: 90px;
  margin-bottom: 6px;
  background-color: #090c15;
  background-repeat: no-repeat;
  border-radius: var(--r-1);
}
.vp-tip-time { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--accent); order: 2; }
.vp-tip-chap { font-size: var(--t-micro); color: var(--ink-1); line-height: 1.25; order: 1; }

/* Controls row */
.vp-controls {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 44px;
  margin-top: var(--s-1);
}
.vp-group { display: flex; align-items: center; gap: 2px; }
.vp-group--end { margin-left: auto; }
.vp-btn {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  font: inherit;
  color: var(--ink-1);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.vp-btn:hover { background: var(--bg-3); border-color: var(--line-2); }
.vp-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-line); background: var(--accent-fade); }
.vp-btn--text { font-family: var(--font-mono); font-size: var(--t-small); min-width: 48px; }
.vp-btn--play .ic { width: 22px; height: 22px; }

/* Icon state swaps are CSS-only, driven by classes on .vp */
.vp-ic { display: grid; place-items: center; grid-area: 1 / 1; }
.vp-ic--pause, .vp-ic--replay, .vp-ic--muted, .vp-ic--exit { display: none; }
.vp.is-playing .vp-ic--play { display: none; }
.vp.is-playing .vp-ic--pause { display: grid; }
.vp.is-ended .vp-ic--play, .vp.is-ended .vp-ic--pause { display: none; }
.vp.is-ended .vp-ic--replay { display: grid; }
.vp.is-muted .vp-ic--vol { display: none; }
.vp.is-muted .vp-ic--muted { display: grid; }
.vp.is-fullscreen .vp-ic--enter { display: none; }
.vp.is-fullscreen .vp-ic--exit { display: grid; }

.vp-readout {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
  white-space: nowrap;
}
.vp-sep { color: var(--ink-3); }
.vp-readout [data-vp-dur] { color: var(--ink-3); }
.vp.is-waiting .vp-readout [data-vp-time]::after {
  content: " buffering";
  color: var(--ink-3);
}

.vp-chap {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  min-width: 0;
  font-size: var(--t-small);
  color: var(--ink-2);
}
.vp-chap-n { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); }
.vp-chap-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vp-vol { display: flex; align-items: center; }
.vp-range { width: 84px; margin: 0 var(--s-2) 0 2px; accent-color: var(--accent); cursor: pointer; }

/* Keyboard hint (fine pointers only; revealed by the script) */
.vp-hint {
  margin: var(--s-3) 0 0;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  line-height: 1.9;
  color: var(--ink-3);
}
.vp-hint kbd {
  padding: 0 5px;
  font: inherit;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
}
@media (hover: none), (pointer: coarse) { .vp-hint { display: none !important; } }

/* ── Fullscreen: bar overlays the bottom edge and hides while playing ── */
.vp:fullscreen, .vp:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #000;
}
.vp:fullscreen .vp-frame, .vp:-webkit-full-screen .vp-frame { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; background: #000; }
.vp:fullscreen .vp-video, .vp:-webkit-full-screen .vp-video { background: #000; }
.vp:fullscreen .vp-bar, .vp:-webkit-full-screen .vp-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding-bottom: var(--s-3);
  transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease);
}
.vp.is-fullscreen { --vp-cap-bottom: 128px; }
.vp.is-fullscreen .vp-captions > * { font-size: clamp(1.1rem, 2.5vw, 2.1rem); }
.vp.is-fullscreen.is-idle { --vp-cap-bottom: 6%; }
.vp.is-fullscreen.is-idle .vp-bar { opacity: 0; transform: translateY(100%); pointer-events: none; }
.vp.is-fullscreen.is-idle .vp-frame { cursor: none; }

/* ── Narrow screens ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .vp-ruler { display: none; }
  .vp-chap { display: none; }
}
@media (max-width: 640px) {
  .vp-bar { padding: var(--s-2) var(--s-3) var(--s-1); }
  .vp-controls { gap: var(--s-2); }
  .vp-range { display: none; }
  .vp-btn { min-width: 38px; }
  .vp-btn--text { min-width: 42px; }
  .vp-big { width: 60px; height: 60px; }
  .vp-big .ic { width: 24px; height: 24px; }
  .vp-tip { width: 132px; }
  .vp-tip-thumb { width: 120px; height: 67px; }
}
@media (max-width: 420px) {
  .vp-group > [data-vp="prev"], .vp-group > [data-vp="next"] { display: none; }
}

/* ── Page body ─────────────────────────────────────────────────────── */
.vid-stage { padding-bottom: var(--s-4); }
.vid-body { padding-bottom: var(--s-12); }
.vid-sec { margin-top: var(--s-10); }
.vid-sec > h2 {
  margin: 0 0 var(--s-5);
  font-size: var(--t-h2);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  letter-spacing: var(--ls-display);
}
.vid-prose { max-width: 66ch; }
.vid-prose p { font-size: 1.0625rem; line-height: var(--lh-loose); }
.vid-prose p:first-child { color: var(--ink-1); }
.vid-credit { font-size: var(--t-small); color: var(--ink-3); }
.vid-files {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
}
.vid-files li { margin: 0; }

/* Chapters as a vertical timeline: time rail on the left, square nodes */
.vid-chapters { --rail: 76px; --inset: var(--s-3); margin: 0; padding: 0; list-style: none; }
.vid-ch {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  margin: 0;
  padding: var(--s-5) var(--s-4) var(--s-5) var(--inset);
  border-bottom: 1px solid var(--line-1);
}
.vid-ch:first-child { border-top: 1px solid var(--line-1); }
.vid-ch::before {            /* the rail */
  content: "";
  position: absolute;
  left: calc(var(--inset) + var(--rail));
  top: 0;
  bottom: -1px;
  width: 1px;
  background: var(--line-2);
}
.vid-ch::after {             /* the node */
  content: "";
  position: absolute;
  left: calc(var(--inset) + var(--rail) - 3.5px);
  top: calc(var(--s-5) + 8px);
  width: 8px;
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--ink-4);
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.vid-ch-time {
  padding-top: 1px;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.vid-ch-body { padding-left: var(--s-6); }
.vid-ch-title { margin: 0 0 var(--s-2); font-size: var(--t-h3); font-weight: 600; letter-spacing: var(--ls-snug); }
.vid-ch-title a { color: var(--ink-1); }
.vid-ch-title a::after { content: ""; position: absolute; inset: 0; }   /* whole row is the hit area */
.vid-ch-title a:focus-visible { outline: none; }
.vid-ch:has(.vid-ch-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.vid-ch-body p { max-width: 62ch; margin: 0; font-size: var(--t-small); color: var(--ink-2); }
.vid-ch-go {
  position: absolute;
  right: var(--s-4);
  top: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--d-fast) var(--ease);
}
.vid-ch:hover { background: var(--bg-1); }
.vid-ch:hover::after { border-color: var(--accent); }
.vid-ch:hover .vid-ch-go, .vid-ch:has(a:focus-visible) .vid-ch-go { opacity: 1; }
.vid-ch.is-active .vid-ch-time { color: var(--accent); }
.vid-ch.is-active::after { background: var(--accent); border-color: var(--accent); }
.vid-ch.is-active .vid-ch-title a { color: var(--accent); }
@media (hover: none) { .vid-ch-go { display: none; } }

/* Comparison table */
.vid-table { min-width: 720px; }
.vid-table th, .vid-table td { vertical-align: top; }
.vid-table tbody th {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line-1);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--ink-1);
}
.vid-table td small { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); }
.vid-own { display: inline-block; padding: 0 7px; font-family: var(--font-mono); font-size: var(--t-small); border: 1px solid transparent; border-radius: var(--r-1); }
.vid-own--owned { margin-left: -8px; color: var(--ink-1); border-color: var(--line-3); }
.vid-own--rented { color: var(--ink-3); padding-left: 0; }
.vid-note { margin-top: var(--s-3); font-size: var(--t-small); color: var(--ink-3); }

/* Sources */
.vid-sources { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-1); }
.vid-sources li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: var(--s-4);
  margin: 0;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-1);
}
.vid-sources .pub { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); padding-top: 3px; }
.vid-sources a { color: var(--ink-1); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.vid-sources a:hover { color: var(--accent); text-decoration-color: var(--accent-line); }

/* Transcript */
.vid-transcript { border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--bg-1); }
.vid-transcript > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  font-weight: 500;
  color: var(--ink-1);
  cursor: pointer;
  list-style: none;
}
.vid-transcript > summary::-webkit-details-marker { display: none; }
.vid-transcript > summary .text-dim { margin-left: var(--s-2); font-weight: 400; font-size: var(--t-small); }
.vid-transcript > summary::after {
  content: "Show";
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--accent);
}
.vid-transcript[open] > summary::after { content: "Hide"; }
.vid-transcript[open] > summary { border-bottom: 1px solid var(--line-1); }
.vid-tx-body { padding: var(--s-2) var(--s-5) var(--s-6); }
.vid-tx-chapter {
  margin: var(--s-6) 0 var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-tag);
  font-weight: 500;
  letter-spacing: var(--ls-tag);
  text-transform: uppercase;
  color: var(--ink-3);
}
.vid-tx-chapter a { color: var(--accent); }
.vid-tx-beat {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--s-4);
  max-width: 76ch;
  margin: 0;
  padding: var(--s-2) 0 var(--s-2) var(--s-3);
  border-left: 1px solid var(--line-1);
  transition: border-color var(--d-fast) var(--ease);
}
.vid-tx-beat > a { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-3); padding-top: 3px; }
.vid-tx-beat > a:hover { color: var(--accent); }
.vid-tx-beat p { margin: 0; color: var(--ink-2); line-height: var(--lh-loose); }
.vid-tx-beat.is-live { border-left-color: var(--accent); }
.vid-tx-beat.is-live p { color: var(--ink-1); }

/* Related */
.vid-cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-5) 0 var(--s-7); }

@media (max-width: 640px) {
  .vid-intro { padding-top: var(--s-6); }
  .vid-chapters { --rail: 52px; --inset: var(--s-2); }
  .vid-ch { padding-right: var(--s-2); }
  .vid-ch-body { padding-left: var(--s-5); }
  .vid-sources li { grid-template-columns: 1fr; gap: 2px; }
  .vid-tx-beat { grid-template-columns: 1fr; gap: 0; }
  .vid-transcript > summary, .vid-tx-body { padding-left: var(--s-4); padding-right: var(--s-4); }
}
