/* "תיק לקוח" in the client card and the characterization form (app/files-ui.js). Phone first. */
.fl-block { display: grid; gap: 12px; min-width: 0; }
.fl-block h3 { margin: 0 0 4px; font-size: 16px; }
.fl-block h4 { margin: 0 0 8px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.fl-block .muted { margin: 0; }
.fl-group { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); min-width: 0; }
.fl-compact .fl-group { border-top: 0; padding-top: 0; }
.fl-counts { margin: 0; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.fl-counts span { white-space: nowrap; }
.fl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.fl-add { min-height: 44px; }
.fl-form { flex-basis: auto; }
.fl-form[open] { flex-basis: 100%; }
.fl-form > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.fl-form > summary::-webkit-details-marker { display: none; }
.fl-form-body { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); max-width: 460px; }
.fl-form-body .btn { min-height: 44px; justify-self: start; }
.fl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fl-chosen { overflow-wrap: anywhere; }
.fl-errs:empty { display: none; }
.fl-errs .err { margin: 0 0 4px; }
.fl-progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fl-progress:empty { display: none; }
.fl-progress li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.fl-progress .fl-pname { grid-column: 1 / -1; overflow-wrap: anywhere; }
.fl-progress progress { width: 100%; height: 10px; accent-color: var(--brand-pink); }
.fl-progress .btn-text { min-height: 44px; }
.fl-pct { font-variant-numeric: tabular-nums; min-width: 3.5ch; text-align: end; }

.fl-kind { min-width: 0; }
.fl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fl-item { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; min-width: 0; background: var(--panel-2); border: 1px solid transparent; border-radius: var(--radius-md); padding: 8px; }
.fl-media { aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); display: grid; place-items: center; }
.fl-media img, .fl-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fl-media video { object-fit: contain; background: #000; }
.fl-doc { font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.fl-play { min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 600; background: var(--brand-pink); color: var(--on-pink); }
.fl-meta { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.fl-name { font-size: 14px; overflow-wrap: anywhere; }
.fl-sub { color: var(--muted); overflow-wrap: anywhere; }
.fl-link { color: var(--accent); }
.fl-posted { color: var(--ok); }
.fl-post summary { cursor: pointer; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.fl-post .field { margin-top: 4px; }
.fl-post .input { width: 100%; min-height: 44px; }
/* In the two-column grid of a phone the date and the link stay inside their card. */
.fl-item > *, .fl-meta > *, .fl-post, .fl-post .field { min-width: 0; }
.fl-item, .fl-meta { grid-template-columns: minmax(0, 1fr); }
.fl-post .input { box-sizing: border-box; min-width: 0; max-width: 100%; }
@media (max-width: 480px) { .fl-post .input { padding-inline: 8px; font-size: 14px; } }
.fl-acts { display: flex; flex-wrap: wrap; gap: 0 12px; }
.fl-acts .btn-text { min-height: 44px; }
.fl-del { color: var(--danger); }
.fl-gallery { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.fl-gallery:empty { display: none; }
.fl-gallery .st-state { margin: 0; overflow-wrap: anywhere; }
.fl-gallery .st-acts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.fl-gallery .st-acts .btn, .fl-gallery .st-acts .btn-text, #fl-gal-create { min-height: 44px; }
.fl-gallery .st-danger { color: var(--danger); }
/* One batch of work on its own page (mountWorkFiles): the editor's card, Ilai's cards, Ofir's dialog. */
.fl-work { gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.fl-work-h { margin: 0; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.fl-work-h strong { color: var(--text); }
.fl-work .fl-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.fl-work [hidden] { display: none; }
/* Navy here: the page's one pink action is its next step ("מוכן לבדיקה", "אישור"). */
.fl-work .fl-play { background: var(--ds-navy); color: #fff; }
.fl-lock { margin: 0; }
.fl-compact { display: grid; gap: 10px; margin-top: 6px; }
.fl-compact .side-head h3 { font-size: 15px; }
@media (max-width: 400px) {
  .fl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ── The look of the kit in the client card (app/kit.js; docs/ops.md, section 53) ──
   Each kind is a tile (its icon square, a plus, its name, how many files); the group's
   title and its hint share a line; an empty group is one quiet line. The compact form of
   the characterization page and the work batches (mountWorkFiles) keep the plain buttons. */
.fl-block .fl-head > p { margin: 2px 0 0; }
.fl-block:not(.fl-compact) .fl-group { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding-top: 14px; }
.fl-block:not(.fl-compact) .fl-group > * { grid-column: 1 / -1; }
.fl-block:not(.fl-compact) .fl-group > h3 { grid-column: 1; grid-row: 1; margin: 0; font-size: 17px; }
.fl-block:not(.fl-compact) .fl-group > .fl-hint { grid-column: 2; grid-row: 1; font-size: 13.5px; }
@media (max-width: 720px) { .fl-block:not(.fl-compact) .fl-group > .fl-hint { grid-column: 1 / -1; grid-row: 2; } }
/* The counts are on the tiles; the line of counts stays for whoever sees no tile (and for a screen reader). */
.fl-group:has(.fl-tile):has([data-kind-btn]:not([hidden])) > .fl-counts { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fl-bar.k-tiles { display: grid; align-items: stretch; }
.fl-bar.k-tiles:not(:has([data-kind-btn]:not([hidden]))) { display: none; }
.fl-bar.k-tiles > [data-kind-btn] { display: grid; min-width: 0; }
.fl-bar.k-tiles > [data-kind-btn][hidden] { display: none; }
.fl-bar.k-tiles > .fl-form[open] { grid-column: 1 / -1; }
.fl-bar.k-tiles > .fl-form[open] > summary { max-inline-size: 220px; border-color: var(--ds-navy); }
.fl-bar.k-tiles > .fl-form > summary { display: grid; }
.fl-bar.k-tiles .fl-form-body { background: var(--ds-surface); border-radius: var(--ds-r-item); }
.fl-block .k-emptyrow > p { margin: 0; }
.fl-kind > h4 { display: flex; align-items: center; gap: 8px; }
.fl-gallery { gap: 10px; padding-top: 14px; }
.fl-gallery > h3 { margin: 0; font-size: 17px; }

/* ── Every other place the staff upload (docs/ops.md, section 54): the batch of work on
   the editor's page, in Ofir's dialog and in Ilai's cards, and the short form of the
   characterization page. The "add" is the kit's tile, lying down: the square of the kind,
   the name and how many are up, the plus at the end. An empty batch is the soft box. ── */
.fl-work { gap: 10px; padding: 12px; border-color: transparent; border-radius: var(--ds-r-item); background: var(--ds-ground); }
.fl-work-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fl-work-bar[hidden] { display: none; }
.k-tile.fl-work-add {
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 0; align-content: center; align-items: center;
  min-height: 64px; padding: 10px 12px; max-inline-size: 440px;
}
.k-tile.fl-work-add > .k-ico { grid-column: 1; grid-row: 1 / 3; margin: 0; }
.k-tile.fl-work-add > .k-tile-plus { position: static; grid-column: 3; grid-row: 1 / 3; }
.k-tile.fl-work-add > .k-tile-name { grid-column: 2; grid-row: 1; align-self: end; }
.k-tile.fl-work-add > .k-tile-n { grid-column: 2; grid-row: 2; align-self: start; }
.fl-work-empty { max-inline-size: 440px; justify-content: flex-start; text-align: start; background: var(--ds-surface); }
.fl-work .fl-item { background: var(--ds-surface); }
/* The short form: the same tiles, lower. */
.fl-tiles-sm { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.fl-tiles-sm .k-tile { min-height: 88px; }
.fl-compact .fl-head { margin-bottom: 2px; }
/* The gallery link: a card of its own, the state as a line, one filled action. */
.fl-gallery:not(:empty) { padding: 14px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-item); background: var(--ds-surface); margin-top: 4px; }
.fl-gallery .st-state { padding: 8px 12px; border-radius: var(--ds-r-ctl); background: var(--ds-ground); }
#fl-gal-create { justify-self: start; }
