/* ta-create-from-print-v1.1.0.css
   v1.1.0 (8 Oct) — the picture-pass bar (palette JS v1.1.0, P2).
   v1.0.2 (8 Oct) — Link existing articles panel (palette JS v1.0.3).
   v1.0.1 (8 Oct) — the "already exists" box (palette JS v1.0.2).
   Appended at the end; nothing above changed.
   ════════════════════════════════════════════════════════════════
   INBXIFY TA Studio · Create from print palette
   Pairs with ta-create-from-print-v1.0.0.js.
   Builds on ix-tokens, ix-modals (.ix-overlay, .ix-modal--wide),
   ix-buttons and ix-form-controls (.ix-revert). No new colours: gold
   #C4A35A is the pending-change border, as everywhere.
   Fixed tile sizes (standing rule): every tile is 176 x 176 + caption.
   Print and files columns are equal width.
   ════════════════════════════════════════════════════════════════ */

body.cfp-lock { overflow: hidden !important; }

.cfp-overlay { padding: 2vh 2vw !important; }

.ix-modal.cfp-modal {
  max-width: min(1440px, 96vw) !important;
  width: 96vw !important;
  height: 96vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--ix-surface, #fff) !important;
  font-family: var(--ix-font-body, 'DM Sans', system-ui, sans-serif);
  color: var(--ix-text-dark, #1A3A3A);
}

/* ── head: title first, flush left ─────────────────────────── */
.cfp-head { padding: 18px 24px 14px; border-bottom: 1px solid var(--ix-border-soft, #E8E4DA); flex: 0 0 auto; }
.cfp-eyebrow {
  font-family: var(--ix-font-mono, 'DM Mono', monospace);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ix-text-light, #7A8A8A); margin: 0 0 8px;
}
.cfp-title { font-family: var(--ix-font-display, 'Fraunces', Georgia, serif); font-size: 24px; line-height: 1.2; font-weight: 600; }
.cfp-sub { margin-top: 4px; font-size: 13px; color: var(--ix-text-mid, #4A5A5A); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── body: two equal columns ───────────────────────────────── */
.cfp-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }
.cfp-print, .cfp-files { min-height: 0; overflow: auto; padding: 18px 24px 24px; }
.cfp-print { background: var(--ix-cream, #FAF9F5); border-right: 1px solid var(--ix-border-soft, #E8E4DA); display: flex; flex-direction: column; }

.cfp-pnav { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cfp-pnum { font-size: 13px; color: var(--ix-text-mid, #4A5A5A); min-width: 220px; text-align: center; white-space: nowrap; }
.cfp-full { margin-left: auto; }
.cfp-page { flex: 1 1 auto; display: flex; align-items: flex-start; justify-content: center; }
.cfp-page img {
  display: block; width: 100%; height: auto; max-width: 100%;
  box-shadow: var(--ix-shadow-md, 0 4px 14px rgba(0,0,0,.12));
  background: #fff; cursor: zoom-in;
}

/* ── proposal ──────────────────────────────────────────────── */
.cfp-guess { font-size: 14px; margin: 0 0 6px; }
.cfp-short {
  font-size: 13px; margin: 0 0 12px; padding: 8px 12px;
  border-left: 3px solid var(--ix-gold, #C4A35A); background: var(--ix-cream-warm, #FDFCF8);
}
.cfp-none { font-size: 14px; color: var(--ix-text-mid, #4A5A5A); padding: 12px 0; }
.cfp-err { font-size: 14px; color: var(--ix-danger, #A5361F); padding: 12px 0; }

.cfp-grid { display: grid; grid-template-columns: repeat(auto-fill, 176px); gap: 14px; margin: 10px 0 6px; }

.cfp-tile {
  width: 176px; box-sizing: border-box;
  border: 2px solid var(--ix-border, #DDD8CC); border-radius: var(--ix-radius-sm, 6px);
  background: #fff; cursor: pointer; user-select: none; overflow: hidden;
  transition: border-color .12s var(--ix-ease, ease), box-shadow .12s var(--ix-ease, ease);
}
.cfp-tile:hover { border-color: var(--ix-teal-mid, #3E6E6E); }
.cfp-tile:focus-visible { outline: 2px solid var(--ix-blue, #2F6FB0); outline-offset: 2px; }
.cfp-tile.is-on { border-color: var(--ix-ok, #1F7A5C); }
.cfp-tile.cfp-tile--changed {
  border-color: var(--ix-changed-border, #C4A35A) !important;
  box-shadow: 0 0 0 3px var(--ix-changed-shadow, rgba(196,163,90,.25));
}
.cfp-face { position: relative; width: 172px; height: 172px; background: var(--ix-cream, #FAF9F5); }
.cfp-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cfp-txt { padding: 10px; height: 100%; box-sizing: border-box; overflow: hidden; font-size: 12px; line-height: 1.4; color: var(--ix-text-mid, #4A5A5A); }
.cfp-txt b { display: block; font-size: 13px; color: var(--ix-text-dark, #1A3A3A); margin-bottom: 4px; }
.cfp-tick {
  position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 2px solid var(--ix-border, #DDD8CC);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.cfp-tile.is-on .cfp-tick { background: var(--ix-ok, #1F7A5C); border-color: var(--ix-ok, #1F7A5C); }
.cfp-zoom {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: rgba(26,58,58,.7); color: #fff; font-size: 14px; cursor: zoom-in; opacity: 0; transition: opacity .12s;
}
.cfp-tile:hover .cfp-zoom, .cfp-zoom:focus-visible { opacity: 1; }
.cfp-cap { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-top: 1px solid var(--ix-border-soft, #E8E4DA); }
.cfp-kind { flex: 0 0 34px; font-family: var(--ix-font-mono, 'DM Mono', monospace); font-size: 10px; letter-spacing: .06em; color: var(--ix-text-light, #7A8A8A); }
.cfp-why { flex: 1 1 auto; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cfp-more-btn { margin: 14px 0 0; }
.cfp-more { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ix-border-soft, #E8E4DA); }
.cfp-more-h { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.cfp-more-h .cfp-eyebrow { margin: 0; }
.cfp-q {
  flex: 0 0 280px; height: 32px; padding: 0 10px; font: inherit; font-size: 13px;
  border: 1px solid var(--ix-border-input, #CFC9BC); border-radius: var(--ix-radius-sm, 6px);
}
.cfp-group { margin: 14px 0 4px; }
.cfp-group-h { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.cfp-group-n { font-weight: 400; color: var(--ix-text-light, #7A8A8A); }
.cfp-also {
  flex: 0 0 auto; font-family: var(--ix-font-mono, 'DM Mono', monospace); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; padding: 2px 8px; border-radius: var(--ix-radius-pill, 999px);
  background: var(--ix-teal-ghost, #EAF2F2); color: var(--ix-teal-deep, #1A3A3A);
}

/* ── busy: visible, animated (standing rule) ───────────────── */
.cfp-busy { display: flex; align-items: center; gap: 12px; padding: 24px 0; font-size: 14px; color: var(--ix-text-mid, #4A5A5A); }
.cfp-stars { display: inline-flex; gap: 5px; }
.cfp-stars i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ix-ok, #1F7A5C);
  animation: cfp-pulse 1.1s ease-in-out infinite;
}
.cfp-stars i:nth-child(2) { animation-delay: .18s; }
.cfp-stars i:nth-child(3) { animation-delay: .36s; }
@keyframes cfp-pulse { 0%, 100% { transform: scale(.6); opacity: .35; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cfp-stars i { animation-duration: 2.4s; } }

/* ── foot ──────────────────────────────────────────────────── */
.cfp-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; border-top: 1px solid var(--ix-border-soft, #E8E4DA); background: var(--ix-surface, #fff);
}
.cfp-count { font-size: 14px; white-space: nowrap; }
.cfp-wfail { font-size: 13px; color: var(--ix-danger, #A5361F); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfp-sp { flex: 1 1 auto; }
.cfp-go { min-width: 280px; }

/* ── v1.0.1 · an article that may already exist ───────────── */
.cfp-exist {
  margin: 0 0 18px; padding: 14px 16px;
  border: 2px solid var(--ix-ok, #1F7A5C); border-radius: var(--ix-radius-sm, 6px);
  background: var(--ix-cream-warm, #FDFCF8);
}
.cfp-exist--quiet { border: 1px solid var(--ix-border-soft, #E8E4DA); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ix-text-mid, #4A5A5A); }
.cfp-exist-h { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.cfp-exist-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ix-border-soft, #E8E4DA); }
.cfp-exist-name { flex: 1 1 auto; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfp-exist-meta { flex: 0 0 auto; font-family: var(--ix-font-mono, 'DM Mono', monospace); font-size: 11px; color: var(--ix-text-light, #7A8A8A); }
.cfp-exist-row .ix-btn { flex: 0 0 auto; height: 32px !important; padding: 0 14px !important; font-size: 13px !important; }
.cfp-exist > .ix-revert { margin-top: 10px; }

/* ── v1.0.2 · Link existing articles (a whole issue) ───────── */
.ix-modal.cfp-modal.cfp-lm { width: min(1100px, 94vw) !important; height: auto !important; max-height: 92vh !important; }
.cfp-lm-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 24px 16px; }
.cfp-lm-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.cfp-lm-tbl th {
  text-align: left; padding: 10px 8px; position: sticky; top: 0; background: var(--ix-surface, #fff); z-index: 1;
  font-family: var(--ix-font-mono, 'DM Mono', monospace); font-size: 11px; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ix-text-light, #7A8A8A);
  border-bottom: 1px solid var(--ix-border-soft, #E8E4DA);
}
.cfp-lm-tbl td { padding: 10px 8px; border-bottom: 1px solid var(--ix-border-soft, #E8E4DA); vertical-align: middle; }
.cfp-lm-tbl td:first-child { width: 32px; }
.cfp-lm-pg { width: 44px; font-family: var(--ix-font-mono, 'DM Mono', monospace); color: var(--ix-text-mid, #4A5A5A); }
.cfp-lm-pt { width: 34%; }
.cfp-lm-sc { width: 96px; font-size: 12px; color: var(--ix-text-mid, #4A5A5A); white-space: nowrap; }
.cfp-lm-sel {
  width: 100%; height: 36px; padding: 0 8px; font: inherit; font-size: 13px;
  border: 1px solid var(--ix-border-input, #CFC9BC); border-radius: var(--ix-radius-sm, 6px); background: #fff;
}
.cfp-lm-sel.ix-picker-input--changed { border: 2px solid var(--ix-changed-border, #C4A35A) !important; box-shadow: 0 0 0 3px var(--ix-changed-shadow, rgba(196,163,90,.25)); }
.cfp-lm--changed td { background: var(--ix-cream-warm, #FDFCF8); }
.cfp-lm-warn { margin-top: 4px; font-size: 12px; color: var(--ix-danger, #A5361F); }
.cfp-lm--fail td { background: rgba(165,54,31,.05); }

/* ── v1.1.0 · P2 picture pass bar ──────────────────────────── */
.cfp-picbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 7px 12px; border-radius: var(--ix-radius-sm, 6px);
  font-size: 13px; background: var(--ix-cream, #FAF9F5); color: var(--ix-text-mid, #4A5A5A);
}
.cfp-picbar--ok { background: var(--ix-ok-light, #E7F3EE); color: var(--ix-ok, #1F7A5C); }
.cfp-picbar--note { background: var(--ix-cream-warm, #FDFCF8); border-left: 3px solid var(--ix-gold, #C4A35A); }
.cfp-picbar .ix-revert { margin-left: auto; }
