/* ==========================================================================
   OpenVids — content pages (/features, /features/*, /agentic-video-editing, /alternatives, /alternatives/*)
   Loaded after openvids-landing.css and built only from its tokens and parts:
   eyebrow + timecode, serif display headings, hairline rules, .ui panels, .chip, .btn, .faq-list.
   No JS: everything here is the final state.
   ========================================================================== */

.pg { padding: calc(var(--nav-h) + clamp(40px, 8vh, 96px)) 0 clamp(80px, 12vh, 144px); }
/* Site links in the nav: one line, hidden before they would crowd the actions (breadcrumbs + footer cover navigation) */
.nav-links a { white-space: nowrap; }
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

.pg-body { display: grid; gap: clamp(56px, 7vw, 104px); }
.pg :where(h2, h3, p, ul, ol, dl, blockquote, figure) { overflow-wrap: break-word; }

/* ---- Breadcrumbs ---- */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 0; list-style: none; font: 500 var(--fs-mono)/1.5 var(--font-mono); letter-spacing: .02em; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: '/'; color: var(--border-strong); }
.crumbs a { color: var(--fg-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; border-radius: 2px; transition: color .2s, text-decoration-color .2s; }
.crumbs a:hover { color: var(--fg); text-decoration-color: var(--fg); }
.crumbs [aria-current="page"] { color: var(--fg); }

/* ---- Page head: crumbs, eyebrow with timecode, serif h1, lead, date, actions ---- */
.pg-head { display: grid; gap: 24px; justify-items: start; max-width: 1000px; }
.pg-head .crumbs { margin-bottom: clamp(8px, 2vw, 24px); }
.pg-head .lead { max-width: 58ch; }
.pg-head .doc-date { margin-top: -4px; }
.pg-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.pg .eyebrow { flex-wrap: wrap; row-gap: 8px; line-height: 1.4; }
.pg .eyebrow .tc { flex: none; white-space: nowrap; }

/* ---- Numbered sections: heading left, copy right (the FAQ's 5/7 rhythm) ---- */
.pg-secs { counter-reset: pg; display: grid; gap: clamp(48px, 6vw, 80px); }
.pg-sec {
  counter-increment: pg; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px clamp(24px, 4vw, 72px);
  padding-top: clamp(24px, 2.6vw, 36px); border-top: 1px solid var(--border);
}
.pg-sec > h2 { position: relative; align-self: start; margin: 0; padding-left: 40px; font: 400 var(--fs-h3)/1.1 var(--font-display); letter-spacing: -.02em; color: var(--fg); text-wrap: balance; }
.pg-sec > h2::before { content: counter(pg, decimal-leading-zero); position: absolute; left: 0; top: calc(var(--fs-h3) * .56); font: 500 var(--fs-mono)/1 var(--font-mono); letter-spacing: .02em; color: var(--muted); }
.pg-sec > h2 em { font-style: italic; }

/* ---- Prose ---- */
.pg-prose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.pg-prose > p, .pg-prose > :is(ul, ol):not([class]) { max-width: 64ch; margin: 0; font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.pg-prose > :is(ul, ol):not([class]) { padding-left: 1.2em; }
.pg-prose > :is(ul, ol):not([class]) li + li { margin-top: 6px; }
.pg-prose li::marker { color: var(--muted); }
.pg-prose strong, .pg-prose b { font-weight: 600; color: var(--fg); }
.pg-prose a, .pg-faq dd a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; border-radius: 2px; transition: text-decoration-color .2s; }
.pg-prose a:hover, .pg-faq dd a:hover { text-decoration-color: var(--fg); }
.pg-prose q { color: var(--fg); quotes: '“' '”'; }

/* Pull quote: a prompt as typed, in the landing's mono composer voice */
.pg-quote { max-width: 64ch; margin: 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--accent); font: 500 15px/1.55 var(--font-mono); color: var(--fg); }

/* ---- Hairline term list (agents, modes, controls) ---- */
.pg-terms { display: grid; max-width: 72ch; margin: 0; border-top: 1px solid var(--border); }
.pg-terms > div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 6px 24px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.pg-terms dt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; font: 600 15px/1.4 var(--font-body); color: var(--fg); }
.pg-terms dd { margin: 0; font-size: 16px; line-height: 1.55; color: var(--fg-2); }
.pg-terms dd a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.pg-terms dd a:hover { text-decoration-color: var(--fg); }
.pg-terms dt .chip { font-weight: 500; }

/* ---- Agent prompt panels: the landing chat, frozen on its result ---- */
.pg-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin: 8px 0 0; padding: 0; list-style: none; }
.pg-prompt { display: grid; grid-template-rows: auto 1fr; box-shadow: none; }
.pg-prompt .ui-bar { gap: 8px; min-width: 0; }
.pg-prompt .ui-bar .chip { height: 20px; padding: 0 7px; font-size: 10.5px; }
.pg-who { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.pg-av {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border-strong); font: 600 9px/1 var(--font-mono); letter-spacing: .02em; color: var(--fg);
}
.pg-prompt-b { display: grid; gap: 10px; align-content: start; padding: 16px 16px 18px; }
.pg-prompt h3 { margin: 0; font: 600 14px/1.3 var(--font-body); color: var(--fg); }
.pg-prompt blockquote { margin: 0; font: 500 12.5px/1.55 var(--font-mono); color: var(--fg); }
.pg-prompt p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.pg-prompt .pg-res { align-self: end; padding-top: 10px; border-top: 1px solid var(--border); font: 500 11.5px/1.4 var(--font-mono); color: var(--muted); }

/* ---- Feature cards (hub) ---- */
.pg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.pg-card {
  position: relative; display: grid; gap: 16px; align-content: start; padding: clamp(22px, 2.4vw, 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: border-color .25s, background-color .25s;
}
.pg-card:hover { border-color: var(--border-strong); background: color-mix(in oklab, var(--surface) 80%, var(--surface-2)); }
.pg-card:focus-within { border-color: var(--fg); }
.pg-card h2 { margin: 0; font: 400 clamp(28px, 2.8vw, 40px)/1.04 var(--font-display); letter-spacing: -.025em; color: var(--fg); text-wrap: balance; }
.pg-card h2 em { font-style: italic; }
.pg-card h2 a { color: inherit; text-decoration: none; }
.pg-card h2 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.pg-card h2 a:focus-visible { outline: none; }
.pg-card p { margin: 0; max-width: 52ch; font-size: 16px; line-height: 1.55; color: var(--fg-2); }
.pg-card .pg-quote { font-size: 13px; }
.pg-more { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--font-mono); color: var(--fg); }
.pg-more .arr { transition: transform .5s var(--ease-out); }
.pg-card:hover .pg-more .arr { transform: translateX(4px); }

/* ---- Comparison (explainer): three ways AI touches video ---- */
.pg-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.pg-compare > li { display: grid; gap: 12px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pg-compare > li.is-us { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
.pg-compare h3 { margin: 0; font: 400 22px/1.15 var(--font-display); letter-spacing: -.015em; color: var(--fg); }
.pg-compare dl { display: grid; gap: 10px; margin: 0; }
.pg-compare dt { font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pg-compare dd { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); }

/* ---- Flow of steps as chips (Build, render QA) ---- */
.pg-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.pg-flow li { counter-increment: flow; display: inline-flex; align-items: center; gap: 8px; }
.pg-flow li .chip::before { content: counter(flow, decimal-leading-zero); color: var(--muted); }
.pg-flow li + li::before { content: '→'; color: var(--border-strong); font: 500 12px/1 var(--font-mono); }

/* ---- Story Graph chapter panel ---- */
.pg-panel { box-shadow: none; }
.pg-panel .ui-bar { min-width: 0; }
.pg-panel .ui-bar > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-chapters { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.pg-chapters li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 14px 16px; }
.pg-chapters li + li { border-top: 1px solid var(--border); }
.pg-chapters .tc { font-size: 12px; color: var(--muted); }
.pg-chapters b { font: 600 15px/1.3 var(--font-body); color: var(--fg); }
.pg-chapters li > span:last-child { grid-column: 2 / -1; font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.pg-chapters li > .tc:nth-child(3) { color: var(--fg-2); }
.pg-panel-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.pg-panel-foot .chip { height: auto; min-height: 24px; padding-block: 5px; line-height: 1.3; white-space: normal; }

/* ---- Sources (research): file, credit, license status ---- */
.pg-sources { display: grid; margin: 0; padding: 0; list-style: none; }
.pg-sources li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 16px; }
.pg-sources li + li { border-top: 1px solid var(--border); }
.pg-sources .pg-file { font: 500 12.5px/1.4 var(--font-mono); color: var(--fg); overflow-wrap: anywhere; }
.pg-sources .pg-by { grid-column: 1; font-size: 13.5px; line-height: 1.4; color: var(--fg-2); }
.pg-sources .chip { grid-column: 2; grid-row: 1 / span 2; }
.pg-ask { display: grid; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); }
.pg-ask blockquote { margin: 0; font: 500 12.5px/1.55 var(--font-mono); color: var(--fg); }
.pg-ask p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
.pg-ask .w { color: var(--warn); }
.pg-creds { display: grid; gap: 8px; margin: 0; padding: 16px; list-style: none; font: 500 12.5px/1.5 var(--font-mono); color: var(--fg-2); overflow-wrap: anywhere; user-select: all; }

/* ---- Motion templates ---- */
.pg-motion { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.pg-motion > li { display: grid; gap: 10px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pg-motion .pg-kind { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pg-motion h3 { margin: 0; font: 400 24px/1.1 var(--font-display); letter-spacing: -.015em; color: var(--fg); }
.pg-motion blockquote { margin: 0; font: 500 12.5px/1.55 var(--font-mono); color: var(--fg); }
.pg-motion p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.pg-captions { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font: 400 clamp(20px, 2vw, 26px)/1.3 var(--font-display); letter-spacing: -.01em; color: var(--fg); }

/* ---- Render QA findings ---- */
.pg-findings { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pg-findings li { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pg-findings li.is-edit { border-color: color-mix(in oklab, var(--warn) 34%, var(--border)); }
.pg-findings .pg-cat { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 11px/1 var(--font-mono); color: var(--muted); }
.pg-findings .pg-cat .chip { margin-left: auto; height: 20px; padding: 0 7px; font-size: 10.5px; }
.pg-findings h3 { margin: 0; font: 600 14.5px/1.3 var(--font-body); color: var(--fg); }
.pg-findings p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--fg-2); }

/* ---- Related pages ---- */
.pg-links { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.pg-links li { border-bottom: 1px solid var(--border); }
.pg-links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 16px 4px; text-decoration: none; color: var(--fg); border-radius: var(--r-xs); transition: background-color .2s; }
.pg-links a:hover { background: color-mix(in oklab, var(--fg) 5%, transparent); }
.pg-links b { font: 400 22px/1.2 var(--font-display); letter-spacing: -.015em; }
.pg-links span:not(.arr) { grid-column: 1; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); }
.pg-links .arr { grid-column: 2; grid-row: 1 / span 2; font: 500 14px/1 var(--font-mono); color: var(--muted); transition: transform .5s var(--ease-out), color .2s; }
.pg-links a:hover .arr { transform: translateX(4px); color: var(--fg); }

/* ---- Alternatives: comparison tables, citations, "choose" panels, sources ---- */
.pg-sec.is-full { grid-template-columns: minmax(0, 1fr); }
.pg-cards.is-alt { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.pg-cards.is-alt .pg-card h2 { font-size: clamp(26px, 2.2vw, 32px); }

/* The table scrolls inside its own frame on narrow screens; row labels stay in view */
.pg-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); scrollbar-color: var(--border-strong) transparent; }
.pg-table-wrap:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.pg-table { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.45; color: var(--fg-2); }
.pg-table.is-wide { min-width: 880px; }
.pg-table :is(th, td) { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.pg-table tbody tr:last-child > * { border-bottom: 0; }
.pg-table thead th { padding-block: 12px; font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.pg-table tbody th { font: 600 14px/1.4 var(--font-body); color: var(--fg); }
.pg-table :is(th, td):first-child { position: sticky; left: 0; z-index: 1; width: 10em; background: var(--surface); border-right: 1px solid var(--border); }
.pg-table thead th:first-child { background: var(--surface-2); }
.pg-table td.is-us, .pg-table tr.is-us > * { background-color: color-mix(in oklab, var(--accent) 7%, var(--surface)); color: var(--fg); }
.pg-table thead th.is-us { background: color-mix(in oklab, var(--accent) 12%, var(--surface-2)); color: var(--accent); }
.pg-table tr.is-us > th { color: var(--accent); }
.pg-prose > .pg-note { max-width: 64ch; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* Citations: small mono numbers that jump to the Sources list */
.pg-ref { margin-left: 1px; font: 500 .7em/0 var(--font-mono); vertical-align: super; color: var(--muted); }
.pg .pg-ref a { padding: 0 1px; color: var(--muted); text-decoration: none; }
.pg .pg-ref a:hover { color: var(--accent); }

/* "Choose X if…" next to "Choose OpenVids if…" */
.pg-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.pg-pick > section { display: grid; gap: 14px; align-content: start; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pg-pick > .is-us { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
.pg-pick h3 { margin: 0; font: 400 24px/1.15 var(--font-display); letter-spacing: -.015em; color: var(--fg); }
.pg-pick ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pg-pick li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; color: var(--fg-2); }
.pg-pick li::before { content: '→'; position: absolute; left: 0; font: 500 12px/1.9 var(--font-mono); color: var(--muted); }
.pg-pick .is-us li::before { color: var(--accent); }

/* Sources: numbered vendor pages */
.pg-srcs { display: grid; gap: 8px; max-width: 72ch; margin: 0; padding-left: 2.4em; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.pg-srcs li { padding-left: 4px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.pg-srcs li::marker { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.pg-srcs a { overflow-wrap: anywhere; }
.pg-srcs li:target { color: var(--fg); }
.pg-srcs li:target::marker { color: var(--accent); }

/* ---- FAQ: the landing list, one column inside the reading width ---- */
.pg-faq { display: grid; gap: 24px; }
.pg-faq .faq-list { margin-top: 8px; }

/* ---- Closing call to action ---- */
.pg-end { display: grid; gap: 24px; justify-items: start; padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--border); }

/* footer: the current page in the Explore list */
.foot-nav .credits [aria-current="page"] { color: var(--fg); text-decoration-color: var(--fg); }

@media (max-width: 920px) {
  .pg-sec { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pg-terms > div { grid-template-columns: minmax(0, 1fr); }
  .pg-sources li { grid-template-columns: minmax(0, 1fr); }
  .pg-sources .chip { grid-column: 1; grid-row: auto; justify-self: start; }
  .pg-chapters li { grid-template-columns: 2.2em minmax(0, 1fr); }
  .pg-chapters li > .tc:nth-child(3) { grid-column: 2; }
  .pg-prompt .ui-bar { flex-wrap: wrap; height: auto; min-height: 36px; padding-block: 7px; }
  /* Phones: each table row becomes a card of labelled values, read top to bottom without sideways scrolling */
  .pg-table-wrap { overflow: visible; border: 0; border-radius: 0; background: none; }
  .pg-table, .pg-table.is-wide { min-width: 0; font-size: 14.5px; }
  .pg-table :is(tbody, tr, th, td) { display: block; }
  .pg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pg-table tbody { display: grid; gap: 10px; }
  .pg-table tbody tr { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .pg-table tbody tr.is-us { border-color: color-mix(in oklab, var(--accent) 45%, var(--border)); }
  .pg-table :is(th, td):first-child { position: static; width: auto; border-right: 0; }
  .pg-table tbody th:first-child { padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
  .pg-table td, .pg-table tbody tr:last-child > td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .pg-table tbody tr > td:last-child { border-bottom: 0; }
  .pg-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .pg-table td.is-us::before { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .pg-more .arr, .pg-links .arr { transition: none; }
}
