/* The creator's main loop (docs/specs/build-all-2026-10-04.md, H): Videos selection and bulk actions, the title as an
   input, live processing times, whole-video notes, keyboard hints, field errors, focus rings and 44px targets in both
   looks. Built only from the shared tokens (styles.css, css/looks.css). Loaded after looks.css. */

/* ---------- Focus you can see, in both looks (3:1 against every page ground) ---------- */
:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 2px; }
.input:focus-visible, .select select:focus-visible, .ws-title-input:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 1px; }
html[data-look="volare"] :focus-visible,
html[data-look="volare"] .btn:focus-visible { outline: 2px solid var(--v-charcoal); outline-offset: 3px; box-shadow: 0 0 0 5px var(--v-peri-24); }
.ba button:focus-visible, html[data-look="volare"] .ba button:focus-visible { outline: 2px solid var(--pearl); outline-offset: 1px; box-shadow: none; }

/* ---------- 44px targets ---------- */
.more-btn { width: 2.75rem; height: 2.75rem; }
.fpill { min-height: 2.75rem; }
.tline-act, .rv-comp-whole { min-height: 2.75rem; }
/* the compare control sits on the picture: full 44px only where fingers tap, compact under a mouse */
@media (pointer: coarse) { .ba button { min-height: 2.75rem; min-width: 2.75rem; } }
.rv-decide .btn, .bulk-bar .btn, .form-actions .btn { min-height: 2.75rem; }
.tline-main, .gitem, .rv-chap { min-height: 2.75rem; }

/* ---------- Videos: open by keyboard, select several ---------- */
.vcard { position: relative; }
.vcard-link { color: inherit; text-decoration: none; }
.vcard-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }   /* the whole card is the link */
.vcard-link:focus-visible { outline: none; }
.vcard:has(.vcard-link:focus-visible) { outline: 2px solid var(--ink-strong); outline-offset: 3px; }
/* Above the whole-card link. The selection box is not in this rule: it floats over the picture (.vsel below), and
   `.vcard .vsel { position: relative }` would put it back in the card's flow as a blank band above the thumbnail. */
.vcard .more-btn { position: relative; z-index: 2; }
.vsel {
  position: absolute; top: var(--s2); left: var(--s2); z-index: 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-xs);
  background: var(--tile); box-shadow: 0 0 0 1px var(--line-2);
  opacity: 0; transition: opacity .15s;
}
.vsel input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--ink-900); cursor: pointer; }
.vcard:hover .vsel, .vsel:focus-within, .is-selecting .vsel, .vcard.is-picked .vsel { opacity: 1; }
@media (hover: none) { .vsel { opacity: 1; } }
.vcard.is-picked { box-shadow: 0 0 0 2px var(--ink-strong), var(--shadow); }
html[data-look="volare"] .vcard.is-picked { box-shadow: 0 0 0 2px var(--v-charcoal), var(--v-shadow); }

.bulk-bar {
  position: sticky; top: var(--s2); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
  margin: 0 0 var(--s4); padding: var(--s2) var(--s3);
  border-radius: var(--r-sm); background: var(--card); box-shadow: 0 0 0 1px var(--line-2), var(--shadow);
}
.bulk-bar[hidden] { display: none; }
/* The page's entrance rise would replay (half-transparent) every time the bar appears. */
html[data-look] .outlet.is-enter > .bulk-bar { animation: none; }
html[data-look] .bulk-bar { border-radius: 12px; }
html[data-look="volare"] .bulk-bar { background: var(--v-salt); box-shadow: var(--v-line-2), var(--v-pop-shadow); }
.bulk-count { margin-right: auto; font: var(--type-body-strong); color: var(--ink-strong); font-variant-numeric: var(--nums-tabular); }
.bulk-danger { color: var(--dk-tx-st-fail, var(--st-fail)); }

/* ---------- The title is an input that reads as the page heading ---------- */
.ws-h1 { flex: 1 1 18rem; min-width: 0; margin: 0; }
/* a heading focused on arrival (router) is a reading position, not a control: no ring */
h1[tabindex="-1"]:focus, html[data-look="volare"] h1[tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }
.ws-title-input {
  display: block; width: 100%; min-width: 0; margin: 0 0 0 calc(-1 * var(--s1)); padding: 0 var(--s1);
  border: 0; border-radius: var(--r-xs); background: transparent;
  font: inherit; letter-spacing: inherit; color: inherit;
  resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere;
}
.ws-title-input:hover { background: var(--hover-bg); }

/* ---------- Processing: time per step, time so far, time left when known ---------- */
.vstep-time { margin-left: auto; font: var(--type-meta); color: var(--muted); font-variant-numeric: var(--nums-tabular); }
/* the time line itself is the long-wait block's detail, on the player (css/review.css .ws-work) */

/* ---------- Review: whole-video notes, keys ---------- */
.rv-comp-whole { justify-self: start; margin: var(--s1) 0; }
.rv-comp-whole[hidden] { display: none; }
.rv-comp-hint { margin: var(--s2) 0 0; }
#rvVideoNotes .tnotes { padding: var(--s2) 0 0; }
.rv-keys { margin: 0; padding-left: var(--s1); font: var(--type-meta); color: var(--muted); }
@media (hover: none), (max-width: 640px) { .rv-keys { display: none; } }
.ba button[hidden] { display: none; }

/* ---------- Field errors, in place ---------- */
.field-error { display: block; margin-top: var(--s1); font: var(--type-meta); font-weight: var(--fw-strong); color: var(--dk-tx-st-fail, var(--st-fail)); }
.input[aria-invalid="true"] { border-color: var(--dk-tx-st-fail, var(--st-fail)); }
html[data-look="volare"] .input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--st-fail); }

/* ---------- Phones: a transcript that fits (the player is first at every width: review.css) ---------- */
@media (max-width: 680px) {
  .ws-grid.rv-grid { gap: var(--s4); }
  .tlist { max-height: 60vh; padding: var(--s1); }
  .tline-main { grid-template-columns: 2.75rem minmax(0, 1fr); padding: var(--s2) var(--s1); }
  /* actions and notes start under the line's text, not under its time */
  .tline-acts, .tnotes { padding-left: calc(var(--s1) + 2.75rem + var(--s2)); }
  .rv-comp-row { flex-wrap: wrap; }
  .rv-comp-row .input { flex: 1 1 100%; }
  .rv-comp-row .btn { flex: 1 1 100%; }
  /* Phone: the bar rides the bottom edge, in thumb reach, above the cards; the
     list keeps room under its last card so nothing hides behind it. */
  .bulk-bar {
    position: fixed; top: auto; left: var(--s3); right: var(--s3); bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px));
    z-index: 25; margin: 0; gap: var(--s2);
  }
  .is-selecting .vgrid { padding-bottom: 9rem; }
  .bulk-bar .btn { flex: 1 1 calc(50% - var(--s2)); padding-inline: var(--s2); }
  .bulk-count { flex-basis: 100%; }
}
