/* Examples page: an index of real videos (16:9 films, 9:16 Shorts) and a detail view that shows the
   recipe beside the player: the pasted script, the director's scenes (click to jump) and the settings. */
.ex { background: var(--bg-0); }
.ex-index, .ex-detail { padding: 128px 0 56px; }
.ex-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 36px; }
.ex-head h1 { margin: 10px 0 12px; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.025em; color: var(--ink); }
.ex-head p { margin: 0; color: var(--ink-2); max-width: 60ch; line-height: 1.6; }
.ex-filters { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ex-filters button { border: 0; background: transparent; color: var(--ink-2); font: 600 13px/1 var(--font-body); padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.ex-filters button.on { background: var(--sidebar); color: #fff; }

.ex-group { margin-top: 40px; }
.ex-group[hidden] { display: none; }
.ex-group-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-size: 20px; color: var(--ink); }
.ex-group-title span { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.ex-grid { display: grid; gap: 20px; }
.ex-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.ex-grid-tall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }

.ex-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.ex-thumb { position: relative; border-radius: 18px; overflow: hidden; background: var(--sidebar); box-shadow: var(--shadow-soft); }
.ex-grid-wide .ex-thumb { aspect-ratio: 16 / 9; }
.ex-grid-tall .ex-thumb { aspect-ratio: 9 / 16; }
.ex-thumb img, .ex-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-thumb video { opacity: 0; transition: opacity 0.25s ease; }
.ex-card:hover .ex-thumb video.live { opacity: 1; }
.ex-dur { position: absolute; right: 10px; bottom: 10px; font: 600 11.5px/1 var(--font-mono); color: #fff; background: rgba(5, 14, 10, 0.72); padding: 5px 7px; border-radius: 7px; }
.ex-tag { position: absolute; left: 10px; top: 10px; font: 600 10.5px/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sidebar); background: var(--mint); padding: 5px 9px; border-radius: 999px; }
.ex-card h3 { margin: 0; font-size: 16.5px; line-height: 1.3; color: var(--ink); }
.ex-card p { margin: -6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.ex-card .ex-recipe { font: 600 12.5px/1 var(--font-body); color: var(--aqua); }
.ex-card:hover h3 { color: var(--aqua); }
.ex-card:focus-visible { outline: 2px solid var(--aqua); outline-offset: 6px; border-radius: 18px; }
.ex-empty { color: var(--muted); }

/* detail */
.ex-back { display: inline-block; margin-bottom: 18px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.ex-back:hover { color: var(--aqua); }
.ex-detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
.ex-detail-grid.tall { grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); }
.ex-stage { position: sticky; top: 96px; }
.ex-player { position: relative; border-radius: 22px; overflow: hidden; background: #0a1a13; box-shadow: var(--shadow); }
.ex-player.wide { aspect-ratio: 16 / 9; }
.ex-player.tall { aspect-ratio: 9 / 16; max-height: calc(100vh - 200px); margin: 0 auto; }
.ex-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0a1a13; }
.ex-meta { margin-top: 18px; }
.ex-meta .ex-kicker { font: 600 11px/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--aqua); }
.ex-meta h1 { margin: 8px 0 8px; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
.ex-meta p { margin: 0; color: var(--ink-2); line-height: 1.55; }

.ex-yt { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--aqua); text-decoration: none; border-bottom: 1px solid currentColor; }
.ex-yt:hover { color: var(--aqua-2); }

.ex-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.ex-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ex-tabs button { flex: 1; border: 0; background: transparent; padding: 11px 10px; border-radius: 12px; font: 600 13.5px/1 var(--font-body); color: var(--ink-2); cursor: pointer; }
.ex-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14, 36, 27, 0.12); }
.ex-tabs .ct { font: 500 11px/1 var(--font-mono); color: var(--muted); margin-left: 4px; }
.ex-pane { padding: 20px; max-height: calc(100vh - 240px); overflow: auto; }
.ex-pane[hidden] { display: none; }

.ex-script { white-space: pre-wrap; margin: 0; padding: 16px; border-radius: 14px; background: var(--bg-0); border: 1px dashed var(--line-strong); font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.ex-script-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; }
.ex-script-bar small { color: var(--muted); font-size: 12.5px; }
.ex-script-bar .btns { display: flex; gap: 8px; }

.ex-scenes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ex-scene { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; text-align: left; background: transparent; width: 100%; font: inherit; color: inherit; }
.ex-scene:hover { border-color: var(--line-strong); background: var(--bg-0); }
.ex-scene.on { border-color: var(--aqua); background: var(--accent-soft); }
.ex-scene .when { display: flex; flex-direction: column; gap: 4px; font: 600 12px/1 var(--font-mono); color: var(--ink); }
.ex-scene .when small { font: 500 10.5px/1 var(--font-mono); color: var(--muted); }
.ex-scene h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.ex-scene .vo { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.ex-scene .vo::before { content: "Narration  "; font: 600 10.5px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--aqua); }
.ex-scene .draw { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.ex-scene .draw::before { content: "On screen  "; font: 600 10.5px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.ex-props { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ex-props span { font-size: 11.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px; }

.ex-settings { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.ex-settings div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ex-settings div:last-child { border-bottom: 0; }
.ex-settings dt { color: var(--muted); font-size: 13px; }
.ex-settings dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 500; }
.ex-note { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }

.ex-more { margin-top: 56px; }

.ex-cta { padding: 64px 0 96px; text-align: center; }
.ex-cta h2 { margin: 0 0 10px; font-size: clamp(24px, 3.2vw, 36px); color: var(--ink); letter-spacing: -0.02em; }
.ex-cta p { margin: 0 0 22px; color: var(--ink-2); }

@media (max-width: 960px) {
  .ex-head { grid-template-columns: 1fr; }
  .ex-detail-grid, .ex-detail-grid.tall { grid-template-columns: 1fr; }
  .ex-stage { position: static; }
  .ex-player.tall { max-width: 360px; max-height: none; }
  .ex-pane { max-height: none; }
}
@media (max-width: 560px) {
  .ex-index, .ex-detail { padding-top: 104px; }
  .ex-grid-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .ex-settings div { grid-template-columns: 96px minmax(0, 1fr); }
}
