/* LRL Lead Ops: design tokens from brand/2026-08-20-brand-kit.pdf.
   Forest primary, Paper ground, Clay accent (sparingly), Archivo UI, Marcellus display. */

:root {
  --forest: #18352f;
  --forest-ink: #142823;
  --cream: #e8e0cf;
  --clay: #a75f3f;
  --clay-deep: #8c4e33;
  --paper: #f2ede1;
  --sage: #4a5a52;
  --field: #8a7f68;
  --mist: #b8c4be;
  --sand: #ddd3bd;

  --bg: var(--paper);
  --surface: #faf7ef;          /* card on paper */
  --surface-2: var(--cream);
  --text: #22312c;             /* forest-leaning ink, AA on paper */
  --text-muted: #6b6353;       /* field, darkened for AA */
  --text-faint: #8a8272;
  --border: var(--sand);
  --border-strong: #c9bda3;
  --accent: var(--clay);
  --accent-ink: #ffffff;
  --primary: var(--forest);
  --primary-ink: var(--paper);
  --ok-bg: #dfe7db; --ok-ink: #2c4a38;
  --warn-bg: #eee4c9; --warn-ink: #6d5a26;
  --bad-bg: #e9dfd6; --bad-ink: #7a4a33;
  --neutral-bg: #e7e0d2; --neutral-ink: #5d564a;

  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --dur-fast: 120ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-ui: "Archivo", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Marcellus", Georgia, serif;
  --shadow-float: 0 1px 2px rgba(20, 30, 25, 0.05), 0 6px 16px rgba(20, 30, 25, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101b17;
    --surface: #16241f;
    --surface-2: #1c2d27;
    --text: #e3e0d5;
    --text-muted: #a9b3ab;      /* mist, brand: secondary text on forest */
    --text-faint: #7f8a81;
    --border: #263832;
    --border-strong: #33473f;
    --accent: #c47a56;          /* clay, lifted for dark */
    --accent-ink: #101b17;
    --primary: #dfe7db;
    --primary-ink: #16241f;
    --ok-bg: #1e3a2c; --ok-ink: #a8c9b0;
    --warn-bg: #3a3420; --warn-ink: #d6c58a;
    --bad-bg: #3a2a20; --bad-ink: #d9a98d;
    --neutral-bg: #24322c; --neutral-ink: #a9b3ab;
    --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 20px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- shell ---------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }
header.top {
  display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap;
  padding: 14px 0 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 26px; height: 26px; }
.brand .word {
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: 0.14em; text-transform: uppercase;
}
.brand .sub {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--text-muted); margin-left: 2px;
}
nav.main { display: flex; gap: 4px; margin-left: 12px; }
nav.main a {
  color: var(--text-muted); padding: 6px 10px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 13px;
}
nav.main a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
nav.main a.active { color: var(--text); background: var(--surface-2); }
nav.main .pip {
  display: inline-block; min-width: 17px; text-align: center;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; font-size: 10.5px; font-weight: 600;
  padding: 1px 5px; margin-left: 5px; vertical-align: 1px;
}
.spacer { flex: 1; }
.userpick { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.userpick select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px;
}

/* ---------- headings ---------- */
h1 { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; }
.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 6px;
}
.pagehead { margin: 6px 0 18px; }
.pagehead .meta { color: var(--text-muted); font-size: 12.5px; }

/* ---------- tabs & chips ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a {
  padding: 8px 12px 9px; color: var(--text-muted); font-weight: 500; font-size: 13px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { color: var(--text-faint); font-variant-numeric: tabular-nums; margin-left: 4px; }
.chips { display: flex; gap: 6px; margin: 0 0 14px; }
.chip {
  font-size: 12px; font-weight: 500; padding: 3px 10px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted);
}
.chip.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }

/* ---------- table ---------- */
table.leads { width: 100%; border-collapse: collapse; }
table.leads th {
  text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 6px 10px; border-bottom: 1px solid var(--border);
}
table.leads td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.leads tr.row { cursor: pointer; }
table.leads tr.row:hover td { background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.principal { max-width: 300px; }
td.principal .pname { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co { font-weight: 500; }
.co .where { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.rank { color: var(--text-faint); font-variant-numeric: tabular-nums; width: 30px; }

/* ---------- badges ---------- */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 500;
  padding: 1.5px 8px; border-radius: 999px; white-space: nowrap;
}
.b-ok { background: var(--ok-bg); color: var(--ok-ink); }
.b-warn { background: var(--warn-bg); color: var(--warn-ink); }
.b-bad { background: var(--bad-bg); color: var(--bad-ink); }
.b-neutral { background: var(--neutral-bg); color: var(--neutral-ink); }
.b-outline { border: 1px dashed var(--border-strong); color: var(--text-muted); }
.b-status { border: 1px solid var(--border); color: var(--text-muted); background: var(--surface); }
.b-status.s-READY { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.b-status.s-IN_CONVERSATION { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.b-status.s-CONTACTED { background: var(--neutral-bg); color: var(--neutral-ink); border-color: transparent; }
.b-status.s-DNC, .b-status.s-DEAD { color: var(--text-faint); }

/* ---------- cards & layout ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.brief {
  border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; margin: 16px 0;
}
.brief .eyebrow { color: var(--accent); }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.cols > * { min-width: 0; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* Fixed-size cards: the card holds its footprint, the content scrolls inside. */
.scroll-y { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.commentbox { max-height: 300px; }
.pbdoc { max-height: 68vh; }
.sidebox { max-height: 340px; }
.runbox { max-height: 64vh; overflow-x: auto; }
.runbox .runhead { position: sticky; top: 0; background: var(--surface); z-index: 1; }

/* Stat lists (by model, by provider): one block per row, stats wrap freely. */
.statlist { list-style: none; margin: 0; padding: 0; }
.statlist li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.statlist li:last-child { border-bottom: none; }
.statlist .name { font-weight: 500; overflow-wrap: anywhere; }
.statlist .name .cmeta { font-weight: 400; margin-left: 4px; }
.statlist .stats {
  display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 3px;
  color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.statlist .stats strong { color: var(--text); font-weight: 500; }

/* Yield table: long source strings truncate instead of widening the page. */
table.yield { table-layout: fixed; }
table.yield td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.yield th.num, table.yield td.num { width: 54px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13px; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; }
pre.evidence {
  font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 10px 12px; white-space: pre-wrap; margin: 8px 0 0;
}

/* ---------- contacts ---------- */
ul.contacts { list-style: none; margin: 0; padding: 0; }
ul.contacts li { padding: 8px 0; border-bottom: 1px solid var(--border); }
ul.contacts li:last-child { border-bottom: 0; }
.cv { font-weight: 500; font-variant-numeric: tabular-nums; }
.cmeta { color: var(--text-muted); font-size: 12px; }

/* ---------- forms ---------- */
label.lbl { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin: 12px 0 4px; }
select, textarea, input[type="text"] {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 7px 9px;
}
textarea { min-height: 64px; resize: vertical; }

/* ---------- voice dictation ---------- */
.field-mic { position: relative; }
.field-mic textarea { width: 100%; padding-right: 40px; }
.mic-btn {
  position: absolute; right: 8px; bottom: 8px;
  display: none; align-items: center; gap: 6px;
  height: 26px; padding: 0 6px;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 500;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.has-speech .mic-btn { display: inline-flex; }
.mic-btn svg { width: 14px; height: 14px; display: block; }
.mic-btn:hover { color: var(--text); border-color: var(--border-strong); }
.mic-btn .mic-label { display: none; }
.mic-btn.listening {
  color: var(--accent-ink); background: var(--accent); border-color: var(--accent);
}
.mic-btn.listening .mic-label { display: inline; }
.mic-btn.listening svg { animation: mic-pulse 1.6s ease-in-out infinite; }
@keyframes mic-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .mic-btn.listening svg { animation: none; }
}
button, .btn {
  font: inherit; font-weight: 500; font-size: 13px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink);
  border: 0; border-radius: var(--radius-sm); padding: 7px 14px;
  transition: opacity var(--dur-fast) var(--ease-out);
}
button:hover, .btn:hover { opacity: 0.88; }
.btn-quiet { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.btn-quiet:hover { color: var(--text); }
.btnrow { display: flex; gap: 8px; margin-top: 12px; align-items: center; }

/* ---------- activity & comments ---------- */
ul.timeline { list-style: none; margin: 0; padding: 0; }
ul.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 7px 0;
  border-bottom: 1px solid var(--border); font-size: 12.5px; }
ul.timeline li:last-child { border-bottom: 0; }
ul.timeline .t { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: 11.5px; padding-top: 1px; }
ul.timeline .who { font-weight: 500; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment.from-claudia { background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 10px 12px; border-bottom: 0; margin: 6px 0; }

/* ---------- chat window ---------- */
.chatlog { max-height: 380px; min-height: 120px; overflow-y: auto;
  padding: 4px 2px; display: flex; flex-direction: column; gap: 8px;
  scroll-behavior: smooth; }
.bubble-row { display: flex; }
.bubble-row.human { justify-content: flex-end; }
.bubble-row.claudia { justify-content: flex-start; }
.bubble { max-width: 86%; padding: 8px 12px; border-radius: var(--radius-lg);
  font-size: 13px; line-height: 1.5; }
.bubble-row.human .bubble { background: var(--primary); color: var(--primary-ink);
  border-bottom-right-radius: var(--radius-sm); }
.bubble-row.claudia .bubble { background: var(--surface-2); color: var(--text);
  border-bottom-left-radius: var(--radius-sm); }
.bubble .bmeta { font-size: 10.5px; opacity: 0.65; margin-bottom: 2px; }
.bubble .btext { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.thinking { opacity: 0.75; font-style: italic; }
.dots i { font-style: normal; animation: dotblink 1.4s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotblink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.chatbar { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.chatbar textarea { flex: 1; min-height: 38px; max-height: 120px; resize: none; }
.chatbar button { height: 38px; }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }
.comment:last-child { border-bottom: 0; }
.comment .head { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.comment .head .who { color: var(--text); font-weight: 500; }
.unreadflag { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; }

/* ---------- playbook ---------- */
.pbwrap { max-width: 780px; }
.pbmeta { display: flex; gap: 16px; color: var(--text-muted); font-size: 12.5px; margin-bottom: 16px; }
.prose h1 { font-size: 22px; margin-top: 0; }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 19px; margin: 28px 0 8px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 12.5px; display: block; overflow-x: auto; }
.prose th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); padding: 6px 8px; border-bottom: 1px solid var(--border-strong); }
.prose td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose code { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.prose blockquote { margin: 0; padding: 2px 14px; border-left: 3px solid var(--sand); color: var(--text-muted); }
.loglist li { margin-bottom: 6px; font-size: 12.5px; }
.loglist .t { color: var(--text-faint); font-variant-numeric: tabular-nums; margin-right: 8px; }
.logkind { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 999px; margin-right: 6px; }
.logkind.change { background: var(--neutral-bg); color: var(--neutral-ink); }
.logkind.learning { background: var(--ok-bg); color: var(--ok-ink); }
.logkind.experiment { background: var(--warn-bg); color: var(--warn-ink); }

/* ---------- run rows ---------- */
.runhead {
  display: grid; grid-template-columns: 156px 128px 52px 1fr 76px 76px 48px;
  gap: 8px; align-items: center;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); padding: 6px 4px 6px 22px; border-bottom: 1px solid var(--border);
}
.runrow { border-bottom: 1px solid var(--border); }
.runrow summary {
  display: grid; grid-template-columns: 14px 156px 128px 52px 1fr 76px 76px 48px;
  gap: 8px; align-items: center;
  padding: 9px 4px 9px 0; cursor: pointer; list-style: none; font-size: 12.5px;
}
.runrow summary::-webkit-details-marker { display: none; }
.runrow summary::before {
  content: "›"; text-align: center;
  color: var(--text-faint); transition: transform var(--dur-fast) var(--ease-out);
}
.runrow[open] summary::before { transform: rotate(90deg); }
.runrow summary .t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.runrow summary .models { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runrow summary:hover { background: var(--surface-2); }
.runbody { padding: 4px 8px 14px 22px; font-size: 13px; }
.runbody :first-child { margin-top: 0; }

/* ---------- empty state ---------- */
.empty {
  text-align: center; padding: 56px 20px; color: var(--text-muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); margin-top: 8px;
}
.empty .big { font-family: var(--font-display); font-size: 19px; color: var(--text); margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- mobile (max-width 700px): additive only, desktop rules above are untouched ---------- */
@media (max-width: 700px) {
  .shell { padding: 0 16px 48px; }
  header.top { gap: 6px 10px; padding: 10px 0 8px; margin-bottom: 14px; }
  .brand .word { display: none; }        /* icon + Ops mark; the wordmark needs room it doesn't have */
  .brand .sub { margin-left: 0; }
  nav.main { margin-left: 0; }
  nav.main a { padding: 8px 10px; }      /* thumb-sized targets */
  h1 { font-size: 22px; }
  .pagehead { margin: 2px 0 14px; }
  .chips { flex-wrap: wrap; }
  .chip { padding: 5px 12px; }
  .tabs a { padding: 9px 10px 10px; }

  /* 16px stops iOS zoom-on-focus; controls grow to touch size */
  select, textarea, input[type="text"], input[type="date"] { font-size: 16px; }
  button, .btn { padding: 10px 16px; }
  .mic-btn { height: 32px; padding: 0 10px; }
  .mic-btn svg { width: 16px; height: 16px; }
  .field-mic textarea { padding-right: 52px; }

  /* Queue: each lead becomes a stacked, tappable card. Vertical, hook, rank,
     and owner stay on the lead page; a phone row is for picking who to call. */
  table.queue, table.queue tbody { display: block; }
  table.queue thead { display: none; }
  table.queue tr.row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px;
    padding: 11px 2px; border-bottom: 1px solid var(--border);
  }
  table.queue td { display: block; padding: 0; border: 0; }
  table.queue td.rank, table.queue td:nth-child(3),
  table.queue td:nth-child(6), table.queue td:nth-child(8) { display: none; }
  table.queue td.co { flex: 1 1 100%; order: 1; font-size: 14.5px; }
  table.queue td.principal { flex: 1 1 100%; order: 2; max-width: none; }
  table.queue td.principal .pname { display: inline; white-space: normal; }
  table.queue td:nth-child(4) { order: 3; }
  table.queue td:nth-child(7) { order: 4; }

  /* Lead page: timeline stacks its timestamp above the entry */
  ul.timeline li { grid-template-columns: 1fr; gap: 1px; }

  /* Runs: time, kind, status, and cost; model and token detail stays a desktop column */
  .runhead { display: none; }
  .runrow summary { grid-template-columns: 14px auto 1fr auto auto; }
  .runrow summary .models,
  .runrow summary span:nth-of-type(5), .runrow summary span:nth-of-type(6) { display: none; }
  .runbox { max-height: 70vh; }
  .runbody { padding-left: 14px; }
}

/* Packets */
.pk-new { display: grid; grid-template-columns: 1.3fr 1.2fr 96px max-content; gap: 12px; align-items: end; }
.pk-new input, .pk-fields input[type="text"], .pk-fields textarea, .pk-rebuild input, .pk-bulk-row input { width: 100%; }
.pk-new input[type="number"], .pk-rebuild input[type="number"], .pk-bulk-row input[type="number"] {
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit;
}
.pk-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pk-bulk-row { display: grid; grid-template-columns: 1fr 130px; gap: 12px; align-items: start; }
.pk-rebuild { display: grid; grid-template-columns: 96px 1fr max-content; gap: 10px; align-items: end; margin-top: 8px; }
.pk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk-cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pk-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.pk-fields label.lbl { margin-top: 10px; }
.pk-list { list-style: none; margin: 0; padding: 0; }
.pk-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--border); }
.pk-list li:first-child { border-top: 0; }
.pk-main { flex: 1; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; color: var(--text); min-width: 0; }
.pk-main:hover { text-decoration: none; }
.pk-row:hover { background: var(--surface-2); }
.pk-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pk-sm { padding: 4px 10px; font-size: 12.5px; }
.pk-brand { font-weight: 500; }
.pk-state { margin-left: auto; text-align: right; }
.pk-market { font-family: var(--font-ui); font-size: 14px; color: var(--text-muted); }
.pk-step { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px;
  border: 1px solid var(--border-strong); border-radius: 50%; font-family: var(--font-ui);
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.pk-pdf { width: 100%; height: 76vh; min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.pk-upload { flex-wrap: wrap; }
.pk-upload input[type="file"] { min-width: 0; max-width: 100%; font-size: 13px; }
.pk-error { background: var(--bad-bg); color: var(--bad-ink); padding: 10px 14px; border-radius: var(--radius-sm); }
.pk-send { margin: 0; padding-left: 20px; font-size: 13px; }
.pk-send li + li { margin-top: 10px; }
.pk-send .btnrow { margin-top: 8px; }
@media (max-width: 700px) {
  .pk-new, .pk-controls, .pk-bulk-row, .pk-rebuild, .pk-two { grid-template-columns: 1fr; }
  .pk-row { flex-wrap: wrap; }
  .pk-pdf { height: 50vh; }
}
.pk-bulk { margin-top: 12px; }
.pk-bulk summary { cursor: pointer; font-size: 13px; color: var(--text-muted); }
.pk-bulk textarea { width: 100%; }
