/* The original-vs-adapted page (landing/original-vs-adapted-movies.html),
   on top of formatter-page.css (the base, .wrap, .section, .pitch, .others,
   .btn). Copied to landing/original-vs-adapted-movies/page.css by build.mjs.

   The explorer is a marquee: a deep plum board, and the three classes in
   three lit colours, amber for the scripts written for the screen, pink for
   the adaptations, teal for the sequels and franchise entries. Inter for
   the words, JetBrains Mono for every number. The chart colours are
   repeated in page.js (T), because the share image is drawn on a canvas
   that cannot read CSS. Change one, change both.
   See .claude/data-pages-registry.md. */

.ov {
  --plum: #1b0f22;
  --plum-2: #26152f;
  --plum-3: #33213d;
  --plum-line: rgba(255, 230, 242, 0.12);
  --plum-line-2: rgba(255, 230, 242, 0.24);
  --milk: #f8eef4;
  --milk-2: #cdb9c8;
  --milk-3: #957f91;
  --orig: #ffb224;
  --adap: #ff5fa2;
  --fran: #37d2c4;
  --orig-ink: #3a2500;
  --adap-ink: #3d0a22;
  --fran-ink: #05302c;
}

/* ───────────────────── the board ───────────────────── */
.ov-board {
  background: var(--plum);
  color: var(--milk);
  padding: 52px 0 72px;
}
.ov-board ::selection { background: var(--orig); color: var(--plum); }
.ov-board a { color: var(--orig); }
.ov-head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px 56px; align-items: end;
}
.ov-kicker { margin: 0 0 14px; font-size: 14px; color: var(--milk-2); }
.ov-board h1 {
  font-size: clamp(36px, 4.4vw, 58px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.0;
  margin: 0; text-wrap: balance;
}
.ov-lede { font-size: 17px; line-height: 1.6; color: var(--milk-2); margin: 0 0 8px; max-width: 44ch; }

/* the sign: three lit figures for the current view */
.ov-sign {
  margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  border: 1px solid var(--plum-line-2);
  border-radius: 18px;
  overflow: hidden;
  background: var(--plum-line);
}
.ov-sign p { margin: 0; }
.ov-sign > div {
  background: var(--plum-2);
  padding: 22px 24px 20px;
  display: grid; gap: 6px; align-content: start;
}
.ov-sign .ov-big {
  font-family: var(--mono); font-size: clamp(38px, 5.2vw, 72px); font-weight: 500; line-height: 1;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.ov-sign .ov-big small { font-size: 0.5em; letter-spacing: 0; margin-left: 2px; }
.ov-sign .ov-what { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.ov-sign .ov-count { font-family: var(--mono); font-size: 13px; color: var(--milk-3); }
.ov-sign .orig .ov-big, .ov-sign .orig .ov-what { color: var(--orig); }
.ov-sign .adap .ov-big, .ov-sign .adap .ov-what { color: var(--adap); }
.ov-sign .fran .ov-big, .ov-sign .fran .ov-what { color: var(--fran); }
.ov-sign-sub { margin: 12px 2px 0; font-size: 14px; color: var(--milk-2); min-height: 1.5em; }
.ov-sign-sub b { color: var(--milk); font-weight: 600; }
.ov-sign-sub .mono { font-family: var(--mono); font-size: 13px; }

/* ───────────────────── controls ───────────────────── */
.ov-controls {
  margin: 30px 0 0;
  display: grid; grid-template-columns: auto auto minmax(260px, 1fr);
  gap: 18px 32px; align-items: end;
}
.ov-field { display: grid; gap: 8px; }
.ov-field > span, .ov-field > label.ov-lab { font-size: 13px; color: var(--milk-2); }
.ov-select {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--milk);
  background: var(--plum-2); border: 1px solid var(--plum-line-2); border-radius: 10px;
  padding: 9px 36px 9px 14px; min-width: 190px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cdb9c8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.ov-select:hover { border-color: var(--milk-3); }
.ov-select option { color: #000; }
.ov-switch {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--milk); padding: 8px 0;
}
.ov-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ov-switch .ov-knob {
  width: 44px; height: 26px; border-radius: 13px; position: relative;
  background: var(--plum-3); border: 1px solid var(--plum-line-2); transition: background 0.15s;
}
.ov-switch .ov-knob::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--milk-2); transition: transform 0.15s, background 0.15s;
}
.ov-switch input:checked + .ov-knob { background: var(--orig); border-color: var(--orig); }
.ov-switch input:checked + .ov-knob::after { transform: translateX(18px); background: var(--plum); }
.ov-switch input:focus-visible + .ov-knob { outline: 2px solid var(--milk); outline-offset: 3px; }
.ov-switch .ov-switch-note { font-family: var(--mono); font-size: 12px; color: var(--milk-3); font-weight: 400; }

/* the two-handled year slider: two range inputs over one track */
.ov-years { display: grid; gap: 8px; }
.ov-years-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--milk-2); }
.ov-years-head output { font-family: var(--mono); font-size: 15px; color: var(--milk); font-weight: 500; }
.ov-range { position: relative; height: 34px; }
.ov-range .ov-track {
  position: absolute; left: 0; right: 0; top: 15px; height: 4px; border-radius: 2px;
  background: var(--plum-3);
}
.ov-range .ov-fill { position: absolute; top: 15px; height: 4px; border-radius: 2px; background: var(--milk-2); }
.ov-range input[type="range"] {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 34px; margin: 0;
  -webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.ov-range input[type="range"]::-webkit-slider-runnable-track { background: none; height: 34px; }
.ov-range input[type="range"]::-moz-range-track { background: none; height: 34px; }
.ov-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: ew-resize;
  width: 22px; height: 22px; margin-top: 6px; border-radius: 50%;
  background: var(--milk); border: 3px solid var(--plum); box-shadow: 0 0 0 1px var(--milk-2);
}
.ov-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto; cursor: ew-resize;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--milk); border: 3px solid var(--plum); box-shadow: 0 0 0 1px var(--milk-2);
}
.ov-range input[type="range"]:focus-visible { outline: none; }
.ov-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--orig); outline-offset: 2px; }
.ov-range input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--orig); outline-offset: 2px; }

/* ───────────────────── the marquee ───────────────────── */
.ov-marquee {
  margin: 30px 0 0;
  border: 1px solid var(--plum-line-2);
  border-radius: 18px;
  background: var(--plum-2);
  padding: 22px 22px 16px;
}
.ov-marquee-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.ov-marquee-top h2 { margin: 0; font-size: 16px; font-weight: 600; }
.ov-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 13px; color: var(--milk-2); }
.ov-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ov-legend i { width: 14px; height: 9px; border-radius: 2px; display: inline-block; }
.ov-legend i.orig { background: var(--orig); }
.ov-legend i.adap { background: var(--adap); }
.ov-legend i.fran { background: var(--fran); }
.ov-chart { display: block; width: 100%; height: auto; }
.ov-chart text { font-family: var(--mono); font-size: 11px; fill: var(--milk-3); }
.ov-chart .ov-col { outline: none; }
.ov-chart .ov-col:focus-visible .ov-hit { stroke: var(--milk); stroke-width: 1.5; }
.ov-chart .ov-hit { fill: transparent; cursor: pointer; }
.ov-chart .ov-tile { cursor: pointer; }
.ov-chart .ov-tile.orig { fill: var(--orig); }
.ov-chart .ov-tile.adap { fill: var(--adap); }
.ov-chart .ov-tile.fran { fill: var(--fran); }
.ov-chart .ov-tile.is-on { stroke: var(--milk); stroke-width: 2; }
.ov-chart .ov-stream.orig { fill: var(--orig); }
.ov-chart .ov-stream.adap { fill: var(--adap); }
.ov-chart .ov-stream.fran { fill: var(--fran); }
.ov-chart .ov-stream { opacity: 0.92; }
.ov-chart .ov-dim { opacity: 0.35; }
.ov-chart .ov-year-on { fill: var(--milk); font-weight: 500; }
.ov-chart .ov-split { stroke: var(--plum-2); stroke-width: 1; }
.ov-chart .ov-cursor { stroke: var(--milk); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.8; }
.ov-how { margin: 12px 0 0; font-size: 13px; color: var(--milk-3); }
.ov-how kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--plum-line-2); border-radius: 4px; padding: 1px 5px; color: var(--milk-2); }

/* the ticket: the chosen film, or a year on a phone */
.ov-ticket {
  margin: 14px 0 0;
  border: 1px solid var(--plum-line-2);
  border-radius: 14px;
  background: var(--plum);
  padding: 18px 22px;
  display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 0 18px;
  min-height: 84px;
}
.ov-ticket .ov-stripe { border-radius: 4px; background: var(--milk-3); }
.ov-ticket.orig .ov-stripe { background: var(--orig); }
.ov-ticket.adap .ov-stripe { background: var(--adap); }
.ov-ticket.fran .ov-stripe { background: var(--fran); }
.ov-ticket-body { min-width: 0; }
.ov-ticket h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.ov-ticket h3 .mono { font-family: var(--mono); font-weight: 500; font-size: 15px; color: var(--milk-2); margin-left: 10px; letter-spacing: 0; }
.ov-ticket .ov-class { font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.ov-ticket.orig .ov-class { color: var(--orig); }
.ov-ticket.adap .ov-class { color: var(--adap); }
.ov-ticket.fran .ov-class { color: var(--fran); }
.ov-ticket p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--milk-2); }
.ov-ticket p.ov-meta { font-size: 13px; color: var(--milk-3); }
.ov-ticket p.ov-meta .mono { font-family: var(--mono); color: var(--milk-2); }
.ov-ticket .ov-empty { color: var(--milk-3); font-size: 15px; margin: 0; }
.ov-ticket ol { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ov-ticket ol li { display: grid; grid-template-columns: 26px 10px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.ov-ticket ol li .mono { font-family: var(--mono); font-size: 12px; color: var(--milk-3); }
.ov-ticket ol li i { width: 10px; height: 10px; border-radius: 2px; }
.ov-ticket ol li i.orig { background: var(--orig); }
.ov-ticket ol li i.adap { background: var(--adap); }
.ov-ticket ol li i.fran { background: var(--fran); }
.ov-ticket ol li button {
  font: inherit; color: var(--milk); background: none; border: 0; padding: 2px 0; text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-ticket ol li button:hover, .ov-ticket ol li button:focus-visible { text-decoration-color: currentColor; outline: none; }

/* share */
.ov-share { margin: 22px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ov-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--milk);
  background: var(--plum-2); border: 1px solid var(--plum-line-2); border-radius: 999px;
  padding: 11px 18px; cursor: pointer;
}
.ov-btn:hover { border-color: var(--milk-2); }
.ov-btn:focus-visible { outline: 2px solid var(--orig); outline-offset: 3px; }
.ov-btn:disabled { opacity: 0.6; cursor: default; }
.ov-btn-lit { background: var(--orig); color: var(--plum); border-color: var(--orig); }
.ov-btn-lit:hover { background: #ffc24f; border-color: #ffc24f; }
.ov-note { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--milk-2); min-height: 1.5em; overflow-wrap: anywhere; }
.ov-note svg { color: var(--fran); flex: none; }

/* ───────────────────── the chapters ───────────────────── */
.ov-chapters { padding: 72px 0 0; }
.ov-chapters .wrap { display: grid; gap: 64px; }
.ov-ch { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 56px; align-items: start; }
.ov-ch h2 {
  margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance;
}
.ov-ch h2 .mono { font-family: var(--mono); font-weight: 500; letter-spacing: -0.02em; }
.ov-ch h2 .orig { color: #b86f00; }
.ov-ch h2 .adap { color: #c81e6b; }
.ov-ch h2 .fran { color: #0f8f86; }
.ov-ch p { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 52ch; }
.ov-ch-chart { min-width: 0; }
.ov-ch-chart svg { display: block; width: 100%; height: auto; }
.ov-ch-chart svg text { font-family: var(--mono); font-size: 11.5px; fill: var(--muted); }
.ov-ch-chart svg text.ov-lab { font-family: var(--sans); font-size: 13px; fill: var(--ink); font-weight: 500; }
.ov-ch-chart svg .orig { fill: var(--orig); }
.ov-ch-chart svg .adap { fill: var(--adap); }
.ov-ch-chart svg .fran { fill: var(--fran); }
.ov-ch-chart svg .rule { stroke: var(--line); }
.ov-ch-chart svg .novel { fill: #ff5fa2; }
.ov-ch-chart svg .comic { fill: #7c5cff; }
.ov-ch-chart svg .play { fill: #ff8a3d; }
.ov-ch-chart svg .nonfiction { fill: #2fa4ff; }
.ov-ch-chart svg .tale { fill: #e0c23a; }
.ov-ch-chart svg .video_game { fill: #37d2c4; }
.ov-ch-chart svg .toy { fill: #9bd44a; }
.ov-ch-chart svg .short_story { fill: #ff4d6d; }
.ov-ch-chart svg .character { fill: #c48cff; }
.ov-ch-chart svg .other { fill: #a1a1aa; }
.ov-ch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.ov-ch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ov-ch-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ov-ch-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ov-ch-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 12px 0 0; border-top: 1px solid var(--line); }
.ov-ch-list li:first-child { border-top: 0; padding-top: 0; }
.ov-ch-list .mono { font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--ink); }
.ov-ch-list .ov-ch-n { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.ov-ch-list .ov-ch-n b { color: var(--ink); font-weight: 600; }
.ov-ch-list .ov-ch-t { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.ov-ch-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ov-ch-table th, .ov-ch-table td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ov-ch-table th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ov-ch-table td.mono, .ov-ch-table th.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; padding-right: 0; }
.ov-ch-table .bar { display: inline-block; height: 10px; border-radius: 2px; vertical-align: middle; }
.ov-ch-table .bar.orig { background: var(--orig); }
.ov-ch-table .bar.adap { background: var(--adap); }
.ov-ch-table .bar.fran { background: var(--fran); }

/* ───────────────────── about the data ───────────────────── */
.ov-about .ov-about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 56px; margin-top: 10px; }
.ov-about h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.ov-about p, .ov-about li { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.ov-about p { margin: 0; }
.ov-about a { color: var(--accent); font-weight: 600; }
.ov-about a:hover { text-decoration: underline; }
.ov-about ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ov-about li strong { color: var(--ink); }
.ov-about .ov-download { margin-top: 22px; }
.ov-about .ov-small { font-size: 13.5px; color: var(--muted); margin-top: 16px; }
.ov-about .ov-small a { color: var(--ink-2); }

@media (max-width: 980px) {
  .ov-head { grid-template-columns: minmax(0, 1fr); }
  .ov-controls { grid-template-columns: 1fr 1fr; }
  .ov-controls .ov-years { grid-column: 1 / -1; }
  .ov-ch { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ov-about .ov-about-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .ov-board { padding: 36px 0 52px; }
  .ov-sign { grid-template-columns: minmax(0, 1fr); border-radius: 14px; }
  .ov-sign > div { padding: 14px 16px 14px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .ov-sign .ov-big { font-size: 40px; grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .ov-sign .ov-what { font-size: 14px; }
  .ov-controls { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ov-select { width: 100%; }
  .ov-marquee { padding: 16px 14px 12px; border-radius: 14px; margin-left: -8px; margin-right: -8px; }
  .ov-ticket { padding: 14px 16px; grid-template-columns: 6px minmax(0, 1fr); gap: 0 14px; }
  .ov-ticket h3 { font-size: 17px; }
  .ov-ticket h3 .mono { display: block; margin: 4px 0 0; }
  .ov-share .ov-btn { flex: 1 1 100%; justify-content: center; }
  .ov-chapters { padding-top: 56px; }
  .ov-chapters .wrap { gap: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .ov-switch .ov-knob, .ov-switch .ov-knob::after { transition: none; }
}
