/* /bulk: the census hallway again. A paper docket to fill in, then a dark ledger that fills row by row.
   The big number is the signature: it counts the ScriptTags that will stop as each store is read. Builds on style.css and census.css. */
.bulk-page .c-hero { padding-bottom: 6px; }
.bulk-page .c-hero h1 { max-width: 20ch; text-wrap: balance; margin-top: 4px; }
.bulk-page .c-sub { max-width: 52ch; margin: 0 auto 6px; }
.bk-big { margin-top: 6px; }
.bulk-page .c-num { font-size: clamp(120px, 24vw, 220px); transition: color .4s, text-shadow .4s; }
.bk-big.is-idle .c-num { color: transparent; -webkit-text-stroke: 2px #5b5043; text-shadow: none; }
.bk-big:not(.is-idle) .c-num { color: #ff6a5a; }
.bk-numlabel { margin: -4px auto 18px; max-width: 46ch; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }

/* ---------- the docket to fill in ---------- */
.bk-intake { margin: 26px auto 0; max-width: 700px; }
.bk-paper { position: relative; padding: 30px 34px 22px; background: var(--noise), linear-gradient(180deg, #f6efde, #efe5cf); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 26px 54px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.3); transform: rotate(-.3deg); }
.bk-paper::before, .bk-paper::after { content: ""; position: absolute; top: -13px; width: 104px; height: 30px; background: rgba(226,212,168,.62); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.bk-paper::before { left: 34px; transform: rotate(-5deg); }
.bk-paper::after { right: 34px; transform: rotate(4deg); }
.bk-paper .n-meta { margin-bottom: 12px; }
.bk-label { display: block; margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.bk-paper textarea { display: block; width: 100%; min-height: 196px; resize: vertical; border: 0; border-radius: 0; padding: 4px 2px 0; background: repeating-linear-gradient(180deg, transparent 0 31px, #cdbf9f 31px 32px); color: var(--ink); font: 600 17px/32px var(--mono); outline: none; overflow-wrap: anywhere; }
.bk-paper textarea::placeholder { color: #b0a58f; font-weight: 400; }
.bk-paper:focus-within { outline: 2px solid var(--gold); outline-offset: 4px; }
.bk-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 3px double var(--ink); }
.bk-count { font-size: 12.5px; color: var(--ink-muted); line-height: 1.4; }
.bk-count.is-warn { color: var(--red); font-weight: 600; }
.bk-actions button { flex: none; border: 0; border-radius: 4px; background: var(--red); color: #fff7ea; font: 400 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 15px 28px 14px; }
.bk-actions button:hover:not(:disabled) { background: #ad1f16; }
.bk-actions button:disabled { opacity: .6; cursor: progress; }
.bk-msg { min-height: 0; margin: 0; font-size: 13px; line-height: 1.5; color: var(--red); font-weight: 600; }
.bk-msg:not(:empty) { margin-top: 10px; }
.bk-msg.is-note { color: var(--ink-muted); font-weight: 400; }

/* ---------- the ledger ---------- */
.bk-results { max-width: 980px; margin: 54px auto 0; scroll-margin-top: 12px; }
.bk-summary { margin: 0; font: 400 clamp(26px, 4vw, 40px)/1.12 var(--display); letter-spacing: .015em; text-transform: uppercase; text-wrap: balance; }
.bk-notes { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.bk-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 18px; }
.bk-btn { background: none; border: 1.5px dashed var(--muted); border-radius: 4px; color: var(--text); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; }
.bk-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.bk-btn:disabled { opacity: .45; cursor: not-allowed; }
.bk-btn-main { background: var(--paper); color: var(--ink); border: 1.5px solid var(--paper); }
.bk-btn-main:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.bk-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--paper); }
.bk-table th { padding: 10px 10px 8px; text-align: left; font: 400 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk-table td { padding: 13px 10px; vertical-align: top; border-top: 1px dotted #5b5043; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.bk-table th:first-child, .bk-table td:first-child { padding-left: 0; }
.bk-table th:last-child, .bk-table td:last-child { padding-right: 0; }
.bk-num-col, .bk-c-stop { text-align: right !important; white-space: nowrap; }
.bk-c-store { min-width: 150px; }
.bk-c-store b { display: block; font-size: 14.5px; font-weight: 600; }
.bk-c-store small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.bk-c-stop b { display: block; font: 400 30px/1 var(--display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.bk-c-stop b.is-bad { color: #ff7a6b; }
.bk-c-stop b.is-ok { color: #8fd0a2; }
.bk-c-stop small { display: block; color: var(--muted); font-size: 11px; }
.bk-c-apps, .bk-c-embeds { color: var(--text); }
.bk-c-notice a { color: var(--gold); text-underline-offset: 3px; white-space: nowrap; font-weight: 600; }
.bk-c-notice a:hover { color: var(--paper); }

.bk-chip { display: inline-block; padding: 4px 8px 3px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.bk-chip-queued { color: var(--muted); border-style: dotted; }
.bk-chip-scanning { color: var(--gold); }
.bk-chip-scanning::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; border-radius: 50%; background: currentColor; animation: bk-pulse 1s ease-in-out infinite; }
@keyframes bk-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.bk-chip-done { color: #8fd0a2; }
.bk-chip-blocked, .bk-chip-error, .bk-chip-invalid { color: #ff7a6b; }
.bk-chip-not_shopify, .bk-chip-headless, .bk-chip-password, .bk-chip-not_found { color: var(--muted); }
.bk-row.bk-queued td, .bk-row.bk-scanning td { color: var(--muted); }
.bk-row.bk-scanning { background: rgba(255, 210, 122, .05); }
.bk-fine { margin: 20px 0 0; max-width: 78ch; font-size: 12px; line-height: 1.6; color: #81776a; }
.bk-cta { margin-top: 56px; }
@media (prefers-reduced-motion: reduce) { .bk-chip-scanning::before { animation: none; } }

/* phone: each table row becomes a card */
@media (max-width: 680px) {
  .bulk-page .c-num { font-size: clamp(110px, 38vw, 170px); }
  .bk-paper { padding: 26px 18px 18px; transform: none; }
  .bk-paper textarea { min-height: 170px; font-size: 16px; }
  .bk-actions { flex-direction: column; align-items: stretch; }
  .bk-actions button { width: 100%; }
  .bk-table, .bk-table tbody { display: block; }
  .bk-table { border-top: 0; }
  .bk-table thead { display: none; }
  .bk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin: 0 0 12px; padding: 14px 14px 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 4px; }
  .bk-row.bk-done { border-left-color: var(--red); }
  .bk-table td { display: block; padding: 0; border: 0; }
  .bk-table td:first-child, .bk-table td:last-child { padding: 0; }
  .bk-c-store { grid-column: 1; grid-row: 1; min-width: 0; }
  .bk-c-status { grid-column: 2; grid-row: 1; text-align: right; }
  .bk-table td.bk-c-stop { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: baseline; gap: 8px; text-align: left !important; }
  .bk-c-stop b { font-size: 34px; }
  .bk-c-stop[data-label]::after { content: "will stop"; color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; order: 3; }
  .bk-c-apps, .bk-c-embeds { grid-column: 1 / -1; }
  .bk-c-apps::before, .bk-c-embeds::before { content: attr(data-label); display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .bk-table .bk-row:not(.bk-done) td.bk-c-stop, .bk-table .bk-row:not(.bk-done) td.bk-c-apps, .bk-table .bk-row:not(.bk-done) td.bk-c-embeds { display: none; }
  .bk-c-notice { grid-column: 1 / -1; margin-top: 4px; }
}
