/* Your Next Video — page CSS.
   Every rule below is taken from the approved design handoff
   ("Your Next Video v2.html"). It defines NO tokens and NO primitives of its
   own: headings come from styles.css (.title-block / .h-sub), buttons from
   .btn / .btn.primary / .btn.ghost / .btn.danger, and every colour, radius and
   font resolves through the shared custom properties. Desktop-only by product
   decision (AGENTS.md "Creator Dashboard Device Scope"). */

/* The page renders inside the dashboard shell's content column, so it owns no
   page frame of its own — only the vertical rhythm between its own blocks. */
.ynv-view { display: flex; flex-direction: column; gap: 24px; }
.ynv-hero { margin-bottom: 4px; }
.ynv-tabs { margin-top: 18px; }
.ynv-work { margin-top: 20px; }

/* Hero */
.ynv-hero h1 { display: flex; align-items: center; gap: 12px; }
.ynv-hero .ynv-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; }
.ynv-hero .ynv-mark svg { width: 22px; height: 22px; }
.ynv-policy { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 7px 13px; border: 1px dashed var(--border-2); border-radius: var(--r-pill); background: var(--surface); font-size: 12.5px; font-weight: 650; color: var(--ink-3); width: fit-content; }
.ynv-policy svg { width: 14px; height: 14px; color: var(--ink-4); }

/* Tabs */
.ynv-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.ynv-tab { padding: 12px 18px 13px; margin-bottom: -1px; background: transparent; border: 0; border-bottom: 2.5px solid transparent; font-family: var(--font); font-size: 15px; font-weight: 750; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ynv-tab:hover { color: var(--ink); }
.ynv-tab.active { color: var(--violet-deep); border-bottom-color: var(--violet); font-weight: 800; }
.ynv-tab .ct { font-size: 11px; font-family: var(--mono); padding: 1px 6px; background: var(--surface-alt); border-radius: var(--r-pill); color: var(--ink-3); }
.ynv-tab.active .ct { background: var(--violet-tint); color: var(--violet-deep); }

/* Work grid */
.ynv-work { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.ynv-railcol { display: flex; flex-direction: column; gap: 12px; }
/* Decided suggestions sit under the queue, separated by the same hairline the
   rest of the page uses. No new card, chip or spacing language. */
.ynv-donesec { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Idea cards */
.ynv-idea { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 15px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; font-family: var(--font); }
.ynv-idea:hover { border-color: var(--border-2); }
.ynv-idea.sel { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-tint); }
.ynv-idea-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ynv-idea-angle { font-size: 11px; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.ynv-idea.sel .ynv-idea-angle { color: var(--violet-deep); }
.ynv-idea-title { font-size: 15.5px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); line-height: 1.3; }
.ynv-idea-why { font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.45; }
.ynv-ev { font-size: 10px; font-weight: 850; letter-spacing: 0.02em; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.ynv-ev.ok { background: var(--success-tint); color: #157C3F; }
.ynv-ev.std { background: var(--blue-tint); color: #2B7FAA; }
.ynv-ev.warn { background: var(--warning-tint); color: #B0700C; }
.ynv-ev.mut { background: var(--surface-2); color: var(--ink-3); }

/* Creator form */
.ynv-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.ynv-field { display: flex; flex-direction: column; gap: 6px; }
.ynv-field > span { font-size: 12px; font-weight: 800; color: var(--ink-2); display: flex; justify-content: space-between; }
.ynv-field .cnt { font-family: var(--mono); font-weight: 600; color: var(--ink-4); font-size: 11px; }
.ynv-field .cnt.over { color: var(--danger); font-weight: 800; }
.ynv-input, .ynv-textarea { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface-alt); border: 1px solid var(--border-2); border-radius: var(--r-md); padding: 11px 13px; width: 100%; box-sizing: border-box; resize: vertical; }
.ynv-input:focus, .ynv-textarea:focus { outline: none; border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 3px var(--violet-tint); }
.ynv-input[aria-invalid="true"] { border-color: var(--danger); }
.ynv-err { font-size: 12px; font-weight: 700; color: var(--danger); }
.ynv-form .btn.primary { justify-content: center; padding: 11px; }
.ynv-form .btn.primary:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* Summary panel */
.ynv-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px 26px; display: flex; flex-direction: column; gap: 20px; }
.ynv-summary.empty { align-items: flex-start; gap: 12px; min-height: 320px; justify-content: center; text-align: left; }
.ynv-empty-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--violet-tint); color: var(--violet); display: grid; place-items: center; }
.ynv-empty-ic svg { width: 24px; height: 24px; }
.ynv-empty-h { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.ynv-summary.empty p { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-3); max-width: 46ch; line-height: 1.55; }
.ynv-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ynv-origin { font-size: 11px; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.ynv-sum-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.ynv-verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 850; padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.ynv-verdict.lg { font-size: 14px; padding: 8px 15px; }
.ynv-verdict.ok { background: var(--success-tint); color: #157C3F; }
.ynv-verdict.warn { background: var(--warning-tint); color: #B0700C; }
.ynv-verdict.bad { background: var(--danger-tint); color: var(--danger); }
.ynv-verdict.mut { background: var(--surface-2); color: var(--ink-3); }
.ynv-block { display: flex; flex-direction: column; gap: 10px; }
.ynv-k { font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.ynv-lead { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.6; }
.ynv-note { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.5; }

/* Score bars */
.ynv-score { display: flex; flex-direction: column; gap: 6px; }
.ynv-score-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ynv-score-top .sl { font-size: 13.5px; font-weight: 750; color: var(--ink); }
.ynv-score-top .sv { font-size: 12px; font-weight: 800; }
.ynv-score-top .sv.ok { color: #157C3F; } .ynv-score-top .sv.warn { color: #B0700C; } .ynv-score-top .sv.bad { color: var(--danger); }
.ynv-score-top .sv.mut { color: var(--ink-3); }
.ynv-bar { height: 7px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.ynv-bar .fill { display: block; height: 100%; border-radius: var(--r-pill); }
.ynv-bar .fill.ok { background: linear-gradient(90deg, #34C56A, #22A25A); }
.ynv-bar .fill.warn { background: linear-gradient(90deg, #F5B342, #E8890B); }
.ynv-bar .fill.bad { background: linear-gradient(90deg, #F26D6D, #E23B3B); }
.ynv-bar .fill.mut { background: linear-gradient(90deg, var(--border-2), var(--ink-4)); }
.ynv-scores2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.ynv-score-basis { font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 1.45; }

/* Section status list (summary) */
.ynv-sslist { display: flex; flex-direction: column; gap: 2px; }
.ynv-ss { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--border); }
.ynv-ss:last-child { border-bottom: 0; }
.ynv-ss .n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); font-size: 11px; font-weight: 850; display: grid; place-items: center; flex: none; }
.ynv-ss .l { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.ynv-evfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--ink-3); font-family: var(--mono); }
.ynv-evfoot span { padding: 3px 9px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--r-pill); }
.ynv-openbrief { justify-content: center; padding: 12px; font-size: 14px; }

/* Chips (generation / decision) */
.ynv-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.ynv-chip.ok { background: var(--success-tint); color: #157C3F; }
.ynv-chip.warn { background: var(--warning-tint); color: #B0700C; }
.ynv-chip.bad { background: var(--danger-tint); color: var(--danger); }
.ynv-chip.mut { background: var(--surface-2); color: var(--ink-3); }
.ynv-chip.accent { background: var(--violet-tint); color: var(--violet-deep); }
.ynv-chip.outline { background: transparent; border: 1px solid var(--border); color: var(--ink-4); }

/* Generating skeleton */
.ynv-summary.gen { gap: 16px; }
.ynv-genrow { display: flex; align-items: center; gap: 13px; }
.ynv-genh { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.ynv-gensub { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; font-family: var(--mono); }
.ynv-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--violet-tint); border-top-color: var(--violet); animation: ynvspin .7s linear infinite; flex: none; }
@keyframes ynvspin { to { transform: rotate(360deg); } }
.ynv-skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-alt), var(--surface-2), var(--surface-alt)); background-size: 200% 100%; animation: ynvsh 1.3s ease infinite; }
.ynv-skel.s2 { width: 88%; } .ynv-skel.s3 { width: 62%; }
@keyframes ynvsh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ynv-spin, .ynv-skel { animation: none; } }

/* ---------------- Brief ---------------- */
.ynv-bhead { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.ynv-bhead-top { display: flex; align-items: center; justify-content: space-between; }
.ynv-bhead-acts { display: flex; gap: 8px; }
.ynv-bhead-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ynv-bhead-origin { font-size: 12px; font-weight: 750; color: var(--ink-3); font-family: var(--mono); }
.ynv-bhead-main h1 { margin: 6px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.18; }
.ynv-briefgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.ynv-briefmain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ynv-bnav { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 8px; position: sticky; top: 12px; z-index: 5; }
.ynv-bnav-item { font-size: 12.5px; font-weight: 750; color: var(--ink-3); padding: 6px 11px; border-radius: var(--r-sm); background: transparent; border: 0; font-family: var(--font); cursor: pointer; text-decoration: none; }
.ynv-bnav-item:hover { background: var(--surface-alt); color: var(--ink); }

.ynv-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 72px; }
.ynv-sect-head { display: flex; align-items: flex-start; gap: 14px; }
.ynv-snum { width: 30px; height: 30px; border-radius: 50%; background: var(--violet-tint); color: var(--violet-deep); font-size: 14px; font-weight: 850; display: grid; place-items: center; flex: none; }
.ynv-sect-h { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ynv-sect-h h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); }
.ynv-sect-chips { display: flex; gap: 6px; }
.ynv-basis { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; background: var(--surface-alt); border-radius: var(--r-md); }
.ynv-basis svg { width: 15px; height: 15px; color: var(--ink-4); flex: none; margin-top: 1px; }
.ynv-basis span { font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.5; }
.ynv-sect-acts { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* Overview */
.ynv-overview { gap: 20px; }

/* Title alternatives */
.ynv-alts { display: flex; flex-direction: column; gap: 8px; }
.ynv-alt { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; position: relative; }
.ynv-alt input { position: absolute; opacity: 0; pointer-events: none; }
.ynv-alt.sel { border-color: var(--violet); background: var(--violet-tint); }
.ynv-alt:focus-within { box-shadow: 0 0 0 3px var(--violet-tint); }
.ynv-alt-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ynv-alt-title { font-size: 15px; font-weight: 750; color: var(--ink); letter-spacing: -0.01em; }
.ynv-alt-meta { font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.45; }
.ynv-alt-angle { display: inline-block; font-size: 10.5px; font-weight: 850; letter-spacing: 0.03em; text-transform: uppercase; color: var(--violet-deep); margin-right: 8px; }
.ynv-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; margin-top: 1px; position: relative; }
.ynv-alt.sel .ynv-radio { border-color: var(--violet); }
.ynv-alt.sel .ynv-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--violet); }

/* Thumbnail text */
.ynv-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.ynv-thumbtext { padding: 10px 16px; border-radius: var(--r-md); background: linear-gradient(135deg, #1a1a1f, #2c1810); color: #FFD68A; font-size: 15px; font-weight: 900; letter-spacing: 0.02em; text-shadow: 0 1px 3px rgba(0,0,0,.5); border: 2px solid transparent; cursor: pointer; position: relative; }
.ynv-thumbtext input { position: absolute; opacity: 0; pointer-events: none; }
.ynv-thumbtext.sel { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-tint); }
.ynv-thumbtext:focus-within { box-shadow: 0 0 0 3px var(--violet-tint); }

/* Hook + beats */
.ynv-beats { display: flex; flex-direction: column; gap: 0; }
.ynv-beat { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.ynv-beat:last-child { border-bottom: 0; }
.ynv-beat .bt { font-family: var(--mono); font-size: 13px; font-weight: 750; color: var(--violet-deep); padding-top: 1px; }
.ynv-beat .bb p { margin: 0; font-size: 14px; font-weight: 650; color: var(--ink-2); line-height: 1.5; }

/* Unavailable state */
.ynv-unavail { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px dashed var(--border-2); border-radius: var(--r-md); background: var(--surface-alt); }
.ynv-unavail svg { width: 18px; height: 18px; color: var(--ink-4); flex: none; margin-top: 1px; }
.ynv-unavail b { font-size: 13.5px; font-weight: 800; color: var(--ink-2); }
.ynv-unavail p { margin: 3px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.5; }

/* Decision record + side panel */
.ynv-current { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 11px 13px; background: var(--surface-alt); border-left: 3px solid var(--violet); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.ynv-current .when { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-4); }
.ynv-current .why { font-style: italic; color: var(--ink-3); }
.ynv-checklist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; }
.ynv-ck { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-alt); }
.ynv-ck .ci { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 850; }
.ynv-ck.ok .ci { background: var(--success-tint); color: #157C3F; }
.ynv-ck.warn .ci { background: var(--warning-tint); color: #B0700C; }
.ynv-ck.mut .ci { background: var(--surface-2); color: var(--ink-3); }
.ynv-ck .cl { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ynv-ck .cl b { font-size: 13px; font-weight: 750; color: var(--ink); }
.ynv-ck .cl span { font-size: 11px; font-weight: 600; color: var(--ink-3); font-family: var(--mono); }
.ynv-ck .cs { font-size: 10.5px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-3); flex: none; }
.ynv-ck.ok .cs { color: #157C3F; } .ynv-ck.warn .cs { color: #B0700C; }

/* Page-level states */
.ynv-loading { padding: 60px; text-align: center; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.ynv-pageerr { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border: 1px solid var(--border-2); border-left: 3px solid var(--danger); border-radius: var(--r-md); background: var(--surface); font-size: 13.5px; font-weight: 700; color: var(--ink-2); }

/* Decline dialog */
.ynv-scrim { position: fixed; inset: 0; background: rgba(9,13,36,.32); z-index: 110; }
.ynv-dialog { position: fixed; z-index: 120; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 48px)); background: var(--surface); border-radius: var(--r-card); padding: 26px; box-shadow: -24px 0 60px rgba(9,13,36,.16); display: flex; flex-direction: column; gap: 16px; }
.ynv-dialog h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); }
.ynv-dialog-sub { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-3); line-height: 1.55; }
.ynv-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }
