/* The Best Screenplay page (landing/best-screenplay-winners.html), on top of
   formatter-page.css (the base, .wrap, .section, .pitch, .others, .btn).
   Copied to landing/best-screenplay-winners/page.css by build.mjs.

   The data lives on one dark band, the night of the ceremony: navy paper,
   ivory ink, and gold for one meaning only, a win. The site is light-only
   and so is the rest of this page; the band is a fixed design, not a theme.
   The chart colours are repeated in page.js (THEME), because the share
   image is drawn on a canvas that cannot read CSS. Change one, change both.
   See .claude/oscar-screenplays-registry.md. */

.os {
  --night: #0b1020;
  --night-2: #121a30;
  --night-3: #1a2340;
  --night-line: rgba(244, 239, 227, 0.11);
  --night-line-2: rgba(244, 239, 227, 0.2);
  --ivory: #f4efe3;
  --ivory-2: #c8c2b2;
  --ivory-3: #9a9484;
  --gold: #e6b84f;
  --gold-deep: #c99a2e;
  --gold-wash: rgba(230, 184, 79, 0.12);
  --silver: #626a85;
}

/* ───────────────────── the band ───────────────────── */
.os-night {
  background: var(--night);
  color: var(--ivory);
  padding: 56px 0 80px;
}
.os-night ::selection { background: var(--gold); color: var(--night); }
.os-night a { color: var(--gold); }
.os-eyebrow {
  margin: 0;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
}
.os-head {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 22px 48px; align-items: end;
}
.os-night h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 4.6vw, 60px);
  font-weight: 500; letter-spacing: -0.025em; line-height: 1.02;
  margin: 16px 0 0; text-wrap: balance;
}
.os-lede {
  font-size: 18px; line-height: 1.6; color: var(--ivory-2);
  margin: 0 0 6px; max-width: 46ch;
}

/* ───────────────────── the sentence of filters ───────────────────── */
.os-filter {
  margin: 34px 0 0;
  padding: 22px 26px 18px;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 18px;
}
.os-sentence {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 31px);
  line-height: 1.55; color: var(--ivory-2);
}
.os-sentence .os-show { color: var(--ivory); margin-right: 0.28em; }
.os-pick {
  position: relative; display: inline-block; margin: 0 0.18em 0 0;
}
.os-pick select {
  -webkit-appearance: none; appearance: none;
  font: inherit; color: var(--ivory);
  background: transparent; border: 0; border-radius: 0;
  border-bottom: 2px solid var(--night-line-2);
  padding: 0 1.05em 0 0; margin: 0;
  cursor: pointer; max-width: 100%;
  transition: border-color 0.15s, color 0.15s;
}
.os-pick select:hover { border-bottom-color: var(--ivory-3); }
.os-pick select:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 3px; }
.os-pick.on select { color: var(--gold); border-bottom-color: var(--gold); }
.os-pick svg {
  position: absolute; right: 0.1em; top: 50%; margin-top: -0.24em;
  width: 0.62em; height: 0.62em; pointer-events: none; color: var(--ivory-3);
}
.os-pick.on svg { color: var(--gold); }
.os-pick select option { color: #18181b; background: #fff; font-family: var(--sans); font-size: 15px; }
.os-measure {
  position: absolute; visibility: hidden; white-space: pre; pointer-events: none;
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 31px);
}
.os-find {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--night-line);
}
.os-find label { font-size: 14px; color: var(--ivory-3); }
.os-find input {
  flex: 1 1 220px; max-width: 360px;
  font: inherit; font-size: 15px; color: var(--ivory);
  background: var(--night); border: 1px solid var(--night-line-2); border-radius: 10px;
  padding: 9px 12px;
}
.os-find input::placeholder { color: var(--ivory-3); opacity: 0.8; }
.os-find input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.os-reset {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--gold);
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
}
.os-reset:hover { text-decoration: underline; }
.os-reset:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ───────────────────── the count ───────────────────── */
.os-board { margin: 34px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.os-count { margin: 0; font-size: 18px; color: var(--ivory-2); }
.os-count strong {
  font-size: clamp(44px, 5vw, 60px); font-weight: 700; letter-spacing: -0.03em;
  color: var(--ivory); margin-right: 4px;
}
.os-read { margin: 0; font-size: 16px; color: var(--ivory-2); max-width: 64ch; }
.os-read b { color: var(--gold); font-weight: 600; }

/* ───────────────────── the chart ───────────────────── */
.os-wall-fig { margin: 18px 0 0; }
.os-wall { position: relative; width: 100%; outline: none; touch-action: pan-y; }
.os-wall:focus-visible { box-shadow: 0 0 0 2px var(--gold); border-radius: 8px; }
.os-wall svg { display: block; width: 100%; height: auto; overflow: visible; }
.os-wall circle { transition: opacity 0.4s ease; }
.os-legend {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px;
  font-size: 13.5px; color: var(--ivory-3);
}
.os-legend span { display: inline-flex; align-items: center; gap: 8px; }
.os-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.os-legend .dot.gold { background: var(--gold); }
.os-legend .dot.silver { background: var(--silver); }
.os-legend .side { width: 12px; height: 12px; display: inline-block; position: relative; }
.os-legend .side::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ivory-3); top: 5px; }
.os-legend .side::after { content: ""; position: absolute; left: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--ivory-3); }
.os-legend .side.up::after { top: 0; }
.os-legend .side.down::after { top: 8px; }

/* ───────────────────── the tooltip ───────────────────── */
.os-tip {
  position: fixed; z-index: 60; left: 0; top: 0;
  width: max-content; max-width: min(320px, calc(100vw - 24px));
  background: #f4efe3; color: #14161f;
  border-radius: 12px; padding: 12px 14px 13px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  font-size: 13.5px; line-height: 1.45; pointer-events: none;
}
.os-tip .t { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.2; margin: 0; }
.os-tip .y { color: #5c574b; font-weight: 400; }
.os-tip .r { margin: 4px 0 0; font-size: 12.5px; color: #5c574b; }
.os-tip .r b { color: #8a6412; }
.os-tip .w { margin: 7px 0 0; }
.os-tip .m { margin: 6px 0 0; color: #5c574b; font-size: 12.5px; }

/* ───────────────────── the tiles ───────────────────── */
.os-tiles {
  margin: 34px 0 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
}
.os-tile {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 14px;
  padding: 15px 16px 16px; min-width: 0;
}
.os-tile .k { margin: 0; font-size: 13px; color: var(--ivory-3); line-height: 1.35; min-height: 2.7em; }
.os-tile .v {
  margin: 6px 0 0; font-size: 28px; font-weight: 650; letter-spacing: -0.02em; color: var(--ivory);
  line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.os-tile .v.name { font-size: 17px; font-weight: 600; letter-spacing: 0; line-height: 1.3; white-space: normal; }
.os-tile .s { margin: 5px 0 0; font-size: 12.5px; color: var(--ivory-3); line-height: 1.35; }

/* ───────────────────── share ───────────────────── */
.os-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 28px 0 0; }
.os-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--ivory); background: transparent;
  border: 1px solid var(--night-line-2); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.os-btn:hover { border-color: var(--ivory-2); }
.os-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.os-btn-gold { background: var(--gold); border-color: var(--gold); color: var(--night); }
.os-btn-gold:hover { background: #f0c867; border-color: #f0c867; }
.os-btn:disabled { opacity: 0.6; cursor: default; }
.os-share-note { font-size: 14px; color: var(--ivory-2); display: inline-flex; align-items: center; gap: 7px; }
.os-share-note svg { color: #6ee7b7; }

/* ───────────────────── the list ───────────────────── */
.os-list { margin: 30px 0 0; border-top: 1px solid var(--night-line); }
.os-list summary {
  list-style: none; cursor: pointer; padding: 16px 0 0;
  font-size: 15px; font-weight: 600; color: var(--ivory);
  display: inline-flex; align-items: center; gap: 8px;
}
.os-list summary::-webkit-details-marker { display: none; }
.os-list summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ivory-3); border-bottom: 2px solid var(--ivory-3);
  transform: rotate(-45deg); transition: transform 0.15s; margin-right: 2px;
}
.os-list[open] summary::before { transform: rotate(45deg); }
.os-list summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.os-table-wrap { margin-top: 14px; max-height: 560px; overflow: auto; border: 1px solid var(--night-line); border-radius: 12px; }
.os-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.os-table th {
  position: sticky; top: 0; background: var(--night-2); text-align: left;
  font-size: 12.5px; font-weight: 600; color: var(--ivory-3); padding: 10px 12px; border-bottom: 1px solid var(--night-line);
}
.os-table td { padding: 9px 12px; border-bottom: 1px solid var(--night-line); color: var(--ivory-2); vertical-align: top; }
.os-table td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ivory-3); }
.os-table td.f { color: var(--ivory); font-weight: 500; }
.os-table td.won { color: var(--gold); font-weight: 600; }
.os-table .more td { text-align: center; padding: 14px; }

/* ───────────────────── the chapters ───────────────────── */
.os-chapters { padding-top: 8px; border-top: 1px solid var(--night-line); }
.os-ch { padding: 64px 0 8px; border-bottom: 1px solid var(--night-line); }
.os-ch:last-child { border-bottom: 0; }
.os-ch-n { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ivory-3); }
.os-ch-head {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 500; letter-spacing: -0.015em; line-height: 1.15;
  margin: 14px 0 0; max-width: 36ch; text-wrap: balance; color: var(--ivory);
}
.os-ch-head b { color: var(--gold); font-weight: 600; }
.os-ch-body { margin: 16px 0 0; font-size: 16.5px; line-height: 1.65; color: var(--ivory-2); max-width: 64ch; }
.os-ch-chart { margin: 30px 0 0; }
.os-ch-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.os-ch-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 22px 0 0; }
.os-ch-foot .os-btn { font-size: 13.5px; padding: 8px 15px; }
.os-ch-foot .os-show-in { font-size: 14px; font-weight: 600; background: none; border: 0; color: var(--gold); cursor: pointer; padding: 6px 2px; font-family: inherit; }
.os-ch-foot .os-show-in:hover { text-decoration: underline; }
.os-ch-foot .os-show-in:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.os-ch-list { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.os-ch-list li {
  font-size: 13.5px; color: var(--ivory-2); background: var(--night-2);
  border: 1px solid var(--night-line); border-radius: 999px; padding: 5px 12px;
}
.os-ch-list li b { color: var(--ivory); font-weight: 600; }
.os-numbers { margin: 18px 0 0; max-width: 100%; overflow-x: auto; }
.os-numbers summary { cursor: pointer; font-size: 13.5px; color: var(--ivory-3); list-style: none; display: inline-block; }
.os-numbers summary::-webkit-details-marker { display: none; }
.os-numbers summary:hover { color: var(--ivory-2); }
.os-numbers summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.os-numbers table { margin-top: 10px; border-collapse: collapse; font-size: 13.5px; }
.os-numbers th, .os-numbers td { text-align: left; padding: 5px 18px 5px 0; border-bottom: 1px solid var(--night-line); color: var(--ivory-2); }
.os-numbers th { color: var(--ivory-3); font-weight: 600; font-size: 12.5px; }
.os-numbers td + td { font-variant-numeric: tabular-nums; }

/* ───────────────────── about the data (light) ───────────────────── */
.os-about { padding-top: 76px; }
.os-about h2 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 42px); font-weight: 600; letter-spacing: -0.018em; margin: 0; }
.os-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; margin-top: 10px; }
.os-about h3 { font-size: 17px; font-weight: 650; margin: 26px 0 0; }
.os-about p, .os-about li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.os-about p { margin: 10px 0 0; max-width: 62ch; }
.os-about ul { margin: 12px 0 0; padding: 0 0 0 18px; }
.os-about li { margin: 6px 0 0; }
.os-about li strong { color: var(--ink); font-weight: 600; }
.os-about a:not(.btn) { color: var(--accent); font-weight: 600; }
.os-about a:not(.btn):hover { text-decoration: underline; }
.os-about p.os-download { margin-top: 24px; }
.os-about p.os-small { font-size: 14px; color: var(--muted); }
.os-about details.os-licence { margin-top: 30px; }
.os-about details.os-licence summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.os-about details.os-licence pre {
  margin: 12px 0 0; padding: 16px 18px; max-width: 82ch; overflow-x: auto; white-space: pre-wrap;
  font: 12px/1.55 var(--mono); color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px;
}
.os-about p.os-tm { margin-top: 18px; max-width: none; }

/* ───────────────────── narrow screens ───────────────────── */
@media (max-width: 980px) {
  .os-head { grid-template-columns: minmax(0, 1fr); }
  .os-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .os-about-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .os-night { padding: 44px 0 56px; }
  .os-night h1 { font-size: 38px; }
  .os-lede { font-size: 16.5px; }
  .os-filter { padding: 18px 16px 16px; border-radius: 14px; }
  .os-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .os-tile .v { font-size: 24px; }
  .os-ch { padding-top: 48px; }
  .os-table th:nth-child(3), .os-table td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .os-wall circle { transition: none; }
}
