/* Video analysis: search form, hero with the global score and top actions, criteria cards, thumbnail critique,
   retention chart with drop markers, audience, AI proposals, before/after dialog, history. Colours come from the
   app variables, so dark mode follows. One column under 760px. */
.an-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.an-form .yt-search-box { flex: 2 1 320px; }
.an-form .yt-search-box .input { width: 100%; min-height: 46px; font-size: var(--fs-l); padding-left: 44px; }
.an-form > .input { flex: 1 1 200px; min-height: 46px; }
.an-form-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.an-form-foot select { max-width: 460px; }
.an-form-foot .hint { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.an-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 20px; }
.an-hero-main { display: flex; gap: 16px; min-width: 0; }
.an-hero-thumb { width: 240px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-s); flex: none; background: var(--panel-3); }
.an-hero-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.an-hero-text h2 { font-size: var(--fs-xl); line-height: 1.3; }
.an-hero-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 20px; }
.an-hero-tags .yt-badge { position: static; }
.an-hero-score { display: flex; gap: 16px; align-items: flex-start; padding-left: 20px; border-left: 1px solid var(--line); }
.an-gauge-big { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.an-gauge-big .yt-gauge { width: 100px; height: 100px; }
.an-gauge-big .yt-gauge text { font-size: 17px; }
.an-gauge-big small { color: var(--muted); font-size: 12px; }
.an-actions { flex: 1; min-width: 0; }
.an-actions h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.an-actions ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.an-actions li { font-size: 13.5px; line-height: 1.4; }
.an-actions li b { display: flex; gap: 8px; align-items: baseline; }
.an-actions li small { color: var(--faint); font-weight: 500; }
.an-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.7); }
.an-pill.ok { background: var(--ok); }
.an-pill.bad { background: var(--danger); }
.an-pill.own { background: var(--brand); }
.an-criteria { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.an-crit { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); overflow: hidden; }
.an-crit.st-bad { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.an-crit.st-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.an-crit summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.an-crit summary::-webkit-details-marker { display: none; }
.an-crit summary .yt-gauge { width: 44px; height: 44px; }
.an-crit summary .yt-gauge text { font-size: 13px; }
.an-crit-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.an-crit-text b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.an-status { font-size: 12px; font-weight: 600; }
.an-status.st-ok { color: var(--ok); }
.an-status.st-warn { color: var(--warn); }
.an-status.st-bad { color: var(--danger); }
.an-status.st-none { color: var(--faint); }
.an-chevron { color: var(--faint); transition: transform 0.2s; flex: none; }
.an-crit[open] .an-chevron { transform: rotate(180deg); }
.an-gauge-none { width: 44px; height: 44px; border-radius: 50%; border: 3px dashed var(--line-strong); display: grid; place-items: center; color: var(--faint); font-weight: 700; flex: none; }
.an-crit-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.45; border-top: 1px solid var(--line); }
.an-crit-body h4, .an-audience h4, .an-props h4, .an-compare h4, .an-concepts h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-crit-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.an-fixes ul { list-style: none; padding-left: 0; }
.an-fixes li { display: flex; gap: 8px; align-items: flex-start; }
.an-fixes li .ico { color: var(--ok); flex: none; margin-top: 2px; }
.an-thumb-wrap { position: relative; }
.an-thumb-wrap img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-s); display: block; background: var(--panel-3); }
.an-thumb-wrap .an-pill { position: absolute; left: 10px; top: 10px; }
.an-vision-scores { display: flex; flex-direction: column; gap: 6px; }
.an-vscore { display: grid; grid-template-columns: 150px minmax(0, 1fr) 42px; gap: 10px; align-items: center; font-size: 13px; }
.an-vscore .track, .an-sent .track { height: 8px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.an-vscore .fill, .an-sent .fill { height: 100%; border-radius: 999px; background: var(--brand); min-width: 2px; }
.an-vscore .fill.ok { background: var(--ok); }
.an-vscore .fill.warn { background: var(--warn); }
.an-vscore .fill.bad { background: var(--danger); }
.an-vscore b, .an-sent b { text-align: right; font-variant-numeric: tabular-nums; }
.an-marker { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 4 3; }
.an-marker-text { fill: var(--danger); font-size: 11px; font-weight: 700; }
.an-audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.an-sent { display: grid; grid-template-columns: 90px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.an-sent.ok .fill { background: var(--ok); }
.an-sent.bad .fill { background: var(--danger); }
.an-sent.info .fill { background: var(--info); }
.an-sent.muted .fill { background: var(--faint); }
.an-quotes, .an-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; }
.an-quotes li small, .an-list li small { color: var(--muted); }
.an-list li b { display: block; }
.an-audience > div > div { margin-top: 12px; }
.an-props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.an-prop { min-width: 0; }
.an-prop.wide { grid-column: 1 / -1; }
.an-prop .yt-titles { list-style: none; margin: 0; padding: 0; }
.an-prop .yt-titles li > div { min-width: 0; }
.an-textarea { width: 100%; font: inherit; font-size: 13px; line-height: 1.45; resize: vertical; min-height: 120px; }
.an-delta { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--panel-3); font-variant-numeric: tabular-nums; }
.an-delta.up { color: var(--ok); background: var(--ok-soft); }
.an-delta.down { color: var(--danger); background: var(--danger-soft); }
.an-table { display: flex; flex-direction: column; }
.an-trow { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.4; }
.an-trow.head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; border-top: 0; padding-top: 0; }
.an-compare-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.an-compare-cols > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.an-pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13px; line-height: 1.45; margin: 0; padding: 10px 12px; background: var(--panel-2); border-radius: var(--r-s); max-height: 240px; overflow: auto; }
.an-history { display: flex; flex-direction: column; }
.an-hist { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.an-hist:first-child { border-top: 0; }
.an-hist:hover b { color: var(--brand); }
.an-hist img, .an-hist-ph { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--panel-3); display: block; }
.an-hist-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.an-hist-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-hist-text small { color: var(--muted); }
.an-hist-score { display: flex; align-items: center; gap: 8px; }
.an-hist-score .yt-gauge { width: 44px; height: 44px; }
.an-hist-score .yt-gauge text { font-size: 13px; }
@media (max-width: 900px) {
  .an-hero { grid-template-columns: 1fr; }
  .an-hero-score { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--line); }
  .an-props, .an-compare-cols { grid-template-columns: 1fr; }
  .an-trow { grid-template-columns: 1fr; gap: 4px; }
  .an-trow.head { display: none; }
}
@media (max-width: 760px) {
  .an-hero-main { flex-direction: column; }
  .an-hero-thumb { width: 100%; }
  .an-hero-score { flex-direction: column; align-items: center; }
  .an-criteria { grid-template-columns: 1fr; }
  .an-vscore { grid-template-columns: 110px minmax(0, 1fr) 42px; }
  .an-hist { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; }
  .an-hist img, .an-hist-ph { width: 72px; }
}
