/* Klero — side panels (drawers), start page, dialogs, juror details, juror list, seating, View, change log */

/* ---------- drawer ---------- */
.drawer { width: 380px; flex: none; align-self: stretch; background: var(--surface); border-left: 1px solid var(--line);
  min-height: calc(100vh - 57px); position: sticky; top: 57px; max-height: calc(100vh - 57px); overflow-y: auto; }
/* panel parts: padding, heading row, back button, close button */
.d-pad { padding: 18px 20px 24px; }
.d-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.d-head h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.015em; display: flex; align-items: center; gap: 4px; flex: 1; }
.d-head h2 input { width: 70px; font-weight: 650; font-size: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; background: var(--surface-2); }
.d-back { display: inline-flex; align-items: center; gap: 2px; margin: 12px 0 -6px 14px; padding: 4px 8px 4px 2px; border: 0; border-radius: 6px;
  background: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.d-back:hover { background: var(--accent-soft); }
.d-back .ico { width: 16px; height: 16px; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); padding: 2px 6px; border-radius: 6px; }
.x:hover { background: var(--surface-2); color: var(--ink); }
/* ---------- form fields ---------- */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; font-weight: 550; color: var(--ink-2); margin-bottom: 4px; }
.field input, .field select, textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* ---------- juror panel: score, notes ---------- */
.score-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.score-chip { min-width: 56px; text-align: center; font-weight: 750; font-size: 20px; padding: 4px 10px; border-radius: 8px; border: 2px solid; font-variant-numeric: tabular-nums; }
.score-row .btn.sq { width: 34px; height: 34px; font-size: 18px; padding: 0; }
.d-sub { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 8px 0 8px; }
.notes { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.note-meta { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--ink-3); }
.note-meta b { color: var(--ink-2); }
.note-meta .x { margin-left: auto; font-size: 16px; padding: 0 4px; }
.note-text { white-space: pre-wrap; word-wrap: break-word; margin-top: 3px; }
.empty { color: var(--ink-3); font-size: 13px; font-style: italic; }
.note-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink-3); }

/* ---------- tables (rankings, juror list) ---------- */
.rank { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.rank td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
.rank tr.row { cursor: pointer; }
.rank tr.row:hover td { background: var(--surface-2); }
.rank .sw { display: inline-block; min-width: 34px; text-align: center; font-weight: 700; border-radius: 5px; padding: 1px 6px; border: 1px solid; font-variant-numeric: tabular-nums; }
.rank .num { font-weight: 700; }
/* ---------- segmented choice buttons ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-3); margin-bottom: 10px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; font-size: 12.5px; font-weight: 550; border-radius: 7px; color: var(--ink-2); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 0 0 1px var(--line); }

/* ---------- home ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.home { max-width: 1120px; margin: 0 auto; padding: 36px 24px 48px; }
.home-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.home-head p { margin: 6px 0 24px; color: var(--ink-3); font-size: 14.5px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } .home-grid .panels-card { order: 2; } }
.new-form { display: grid; gap: 14px; }
.new-form .field { margin: 0; }
.form-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.new-form input[type=number] { width: 100%; }
.new-form .btn.primary { height: 40px; font-size: 14px; }
.file-field input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-field { position: relative; cursor: pointer; }
.file-pick { display: flex !important; align-items: center; gap: 10px; color: var(--ink-3) !important; font-size: 13px !important; margin: 0 !important; }
.file-pick .btn { pointer-events: none; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline !important; margin: 0 !important; }
.plist { list-style: none; margin: 0 -10px; padding: 0; }
.plist li + li { border-top: 1px solid var(--line); }
.plist li.empty { padding: 14px 10px; }
.p-row { display: flex; align-items: center; gap: 14px; padding: 13px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.p-row:hover { background: var(--surface-2); }
.p-row .ico { color: var(--ink-3); width: 16px; height: 16px; }
.p-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.p-icon svg { width: 18px; height: 18px; }
.p-name { display: block; font-weight: 600; font-size: 15px; }
.plist .meta { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.plist .grow { flex: 1; min-width: 0; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15, 18, 24, .42); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); max-width: 420px; width: 100%; padding: 20px 22px; }
.modal p { margin: 0 0 16px; white-space: pre-wrap; }
.modal-list { margin: -4px 0 16px; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.modal-list li + li { margin-top: 6px; }
.modal .row { display: flex; justify-content: flex-end; gap: 8px; }
/* ---------- pop-up message at the bottom ---------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #f3f4f6; padding: 10px 14px 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 110; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px; }

/* ---------- smaller screens and printing ---------- */
@media (max-width: 1180px) and (min-width: 1001px) { .drawer { width: 340px; } }
@media (max-width: 1000px) {
  .drawer { position: fixed; right: 0; top: 0; bottom: 0; max-height: none; min-height: 0; width: min(400px, 100vw); z-index: 50; box-shadow: -8px 0 30px rgba(0,0,0,.2); }
  .bar .title { width: 14ch; }
  .stage-col { padding: 10px 16px 20px; }
}
@media print {
  .bar, .drawer, .hint { display: none !important; }
  .stage-wrap { box-shadow: none; }
}

/* ---------- strikes + juror details ---------- */
/* shared: disabled buttons, then the strike button and the struck banner in the juror panel */
.btn:disabled { opacity: .45; cursor: not-allowed; }
.strike-btn { width: 100%; margin: -4px 0 18px; padding: 9px 10px; font-weight: 650; color: var(--danger); border-color: var(--line-2); }
.strike-btn:not(.on):hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.strike-btn.on { color: var(--ink); }
.struck-banner { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(180,35,24,.25); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 550; margin-bottom: 12px; }
.rank tr.struck-row td { color: var(--ink-3); }
.rank tr.struck-row td.num { text-decoration: line-through; }
.j-detail { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75; margin-top: 1px; }
.grid2 { display: grid; grid-template-columns: 80px 1fr; gap: 10px; }
/* details from the list (Age, Employer ...), and the "may be misread" marker from a scan */
.extra-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.field.unclear input { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 22%, var(--surface)); }
.unclear-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 8px 10px;
  border: 1px solid var(--warn); border-radius: 8px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); font-size: 12.5px; }
.unclear-note .btn { flex: none; min-height: 36px; }
.struck-list { display: grid; gap: 8px; }
.struck-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--surface); }
.si-main { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; display: grid; gap: 3px; }
.si-top { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-meta { font-size: 12px; color: var(--ink-3); }
.si-meta .sw, .struck-item .sw { display: inline-block; min-width: 30px; text-align: center; font-weight: 700; border-radius: 5px; padding: 0 5px; border: 1px solid; font-variant-numeric: tabular-nums; }
.toast-btn { border: 1px solid rgba(255,255,255,.4); background: transparent; color: inherit; border-radius: 6px; padding: 3px 10px; font-weight: 650; }
.toast-btn:hover { background: rgba(255,255,255,.12); }

/* ---------- juror list ---------- */
/* shared small text, button rows and search box used by the list and seating panels */
.fine { font-size: 12px; color: var(--ink-3); margin: 6px 0 12px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
textarea.nums { min-height: 64px; font-variant-numeric: tabular-nums; }
.search { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; background: var(--surface-2); margin-bottom: 6px; }
.rank.roster td { vertical-align: middle; }
.btn.mini { padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.tag { font-size: 11.5px; color: var(--ok); font-weight: 650; white-space: nowrap; }

/* ---------- seating editor ---------- */
.seat-lead { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; }
.seat-info { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 14px; display: grid; gap: 4px; }
.seat-info .warn { color: var(--danger); }
.row-ed { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.row-ed .lbl { width: 52px; font-size: 13px; color: var(--ink-2); }
.row-ed input { width: 56px; text-align: center; border: 1px solid var(--line); border-radius: 6px; padding: 5px 4px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.row-ed .btn.sq { width: 30px; height: 30px; padding: 0; font-size: 16px; }
.row-ed .x { margin-left: 2px; font-size: 18px; }
.row-ed .x:disabled { opacity: .3; cursor: not-allowed; }
.add-row { margin: 2px 0 14px; }
.seat-line { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.seat-line .lbl { font-size: 13px; color: var(--ink-2); }
.seat-line .seg { margin: 0; }
.seat-foot { display: grid; gap: 6px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); justify-items: start; }

/* ---------- empty seats ---------- */
.seat { position: absolute; width: 128px; height: 96px; border: 2px dashed var(--zone); border-radius: 9px; opacity: .55; pointer-events: none; }
.seat.blank { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--floor-grid) 8px 10px); }
.blank-btn { margin-left: 2px; }
.blank-btn.on { background: var(--ink-2); border-color: var(--ink-2); color: var(--surface); }
.row-btns .add-row { margin: 2px 0 14px; }

/* ---------- internet / social media notes ---------- */
.web-sec { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.web-head { display: flex; align-items: center; gap: 6px; }
.web-head svg { width: 14px; height: 14px; }
textarea.web { min-height: 64px; font-size: 13px; background: var(--surface); }
.j-notes svg + span + svg { margin-left: 1px; }

/* ---------- cause ---------- */
.j-cause { display: inline-block; flex: none; font-size: 10px; font-weight: 750; line-height: 16px;
  padding: 0 3px; border-radius: 4px; background: #5b2a86; color: #fff; }
.cause-sec { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
textarea.cause { min-height: 64px; font-size: 13.5px; }
.juror.flash { animation: flash 0.8s ease-in-out 3; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(43,108,176,0); } 50% { box-shadow: 0 0 0 6px rgba(43,108,176,.55); } }
@media (prefers-reduced-motion: reduce) { .juror.flash, .juror.pulse { animation: none; outline: 3px solid var(--select); } }

/* ---------- change log ---------- */
.log-sec { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.log-toggle { border: 0; background: none; padding: 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.log-toggle:hover { color: var(--ink); }
.log { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; font-size: 12.5px; max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.log li { padding: 6px 10px; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log li.empty { color: var(--ink-3); font-style: italic; }
.log-meta { display: flex; gap: 8px; align-items: baseline; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log-meta b { color: var(--ink-2); font-weight: 650; }
.log-act { margin-top: 1px; color: var(--ink); word-wrap: break-word; }

/* ---------- board sizing ---------- */
.stage-sizer { pointer-events: none; }
.stage-wrap.scroll-x { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }

/* ---------- View panel ---------- */
.seg.wrap { flex-wrap: wrap; display: flex; }
.seg.wrap button { flex: 1 1 auto; }
.size-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.size-row input[type=range] { flex: 1; accent-color: var(--accent); }
.size-now { min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.checks { display: grid; gap: 2px; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; padding: 5px 2px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.seat-line .small { width: 72px; padding: 5px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }

/* ---------- settings ---------- */
.set-group { margin-bottom: 18px; }
.set-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.set-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line);
  background: none; padding: 11px 12px 11px 14px; min-height: 52px; }
.set-card > :first-child { border-top: 0; }
.set-row:hover { background: var(--surface-2); }
.set-row .ico { color: var(--ink-3); width: 16px; height: 16px; }
.set-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.set-label { font-weight: 600; font-size: 14px; }
.set-sub { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-sub:empty { display: none; }
.set-row.danger .set-label { color: var(--danger); }
.set-field { display: grid; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); }
.set-field .seg { margin: 0; justify-self: start; }
.set-field .set-sub { white-space: normal; }
.set-field input.name { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--surface); }

/* ---------- strikes ---------- */
/* the strike counter cards for each side, and the strike list rows */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.side-card { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--surface-2); }
.side-card.turn.side-p { border-color: var(--side-p); background: var(--side-p-soft); }
.side-card.turn.side-d { border-color: var(--side-d); background: var(--side-d-soft); }
.sc-name { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.sc-big { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.sc-big b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.side-card.turn.side-p .sc-big b { color: var(--side-p); }
.side-card.turn.side-d .sc-big b { color: var(--side-d); }
.sc-meta { font-size: 12px; color: var(--ink-3); }
.c-turn { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 7px; border-radius: 10px; background: var(--ink); color: var(--surface); }
.tally-line { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.rules-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); margin-bottom: 16px; }
.si-no { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--ink-2); }
.si-no.side-p { background: var(--side-p-soft); color: var(--side-p); box-shadow: inset 0 0 0 1px var(--side-p); }
.si-no.side-d { background: var(--side-d-soft); color: var(--side-d); box-shadow: inset 0 0 0 1px var(--side-d); }
.si-reason { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-tag { margin-left: 6px; font-size: 11px; font-weight: 650; padding: 1px 6px; border-radius: 5px; background: var(--warn-soft); color: var(--warn); }
.jury-list { margin: 0 0 14px; font-size: 13.5px; font-variant-numeric: tabular-nums; line-height: 1.6; }
.strike-sec { margin: -4px 0 14px; }
.strike-sec textarea.reason { min-height: 52px; font-size: 13.5px; }

/* the strike dialog */
.strike-modal { max-width: 460px; }
.offline-note { display: none; margin: 10px 0 0; padding: 8px 11px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 600; }
body.is-offline .offline-note { display: block; }
.quick-strike .offline-note { margin: 0; }
.m-head h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.m-sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.m-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 16px 0 6px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; display: grid; gap: 2px; text-align: left; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); min-height: 60px; }
.choice:hover { border-color: var(--ink-3); }
.choice .c-name { font-weight: 650; font-size: 14.5px; }
.choice .c-meta { font-size: 12px; color: var(--ink-3); }
.choice .c-turn { position: absolute; right: 9px; top: 9px; }
.choice.small { min-height: 40px; padding: 8px 12px; }
.choice.small .c-name { font-size: 13.5px; font-weight: 600; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.choice.on.side-p { border-color: var(--side-p); background: var(--side-p-soft); box-shadow: 0 0 0 1px var(--side-p); }
.choice.on.side-d { border-color: var(--side-d); background: var(--side-d-soft); box-shadow: 0 0 0 1px var(--side-d); }
.strike-warn { margin: 10px 0 0; padding: 8px 11px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 550; }
.strike-modal textarea.reason { min-height: 60px; }
.strike-modal .fine { margin: 6px 0 16px; }

/* alternates */
.alt-check { margin: -8px 0 14px; }
.alt-note { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--warn); }
.j-alt { display: inline-block; flex: none; font-size: 10px; font-weight: 750; line-height: 16px; padding: 0 4px; border-radius: 4px; background: #b54708; color: #fff; }
.alt-how { margin-top: -8px; }

/* our strike list */
.plan-sec { margin-bottom: 18px; }

/* "Strike a juror" by number, at the top of the Strikes panel */
/* quick strike box */
.quick-strike { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; margin-bottom: 16px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface-2); }
.qs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.qs-head b { font-size: 14px; }
.qs-turn { font-size: 12px; color: var(--ink-2); }
.qs-num { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.qs-num input { flex: 1; min-width: 0; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px 12px;
  border: 2px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.qs-num input:focus { border-color: var(--accent); outline: none; }
.qs-who { min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px;
  background: var(--surface); border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--ink-3); }
.qs-who.found { border: 1.5px solid var(--ok); background: var(--surface); color: var(--ink); }
.qs-who.bad { border-style: solid; border-color: var(--warn); background: var(--warn-soft); color: var(--warn); font-weight: 550; }
.qs-who .qs-name { font-weight: 650; }
.quick-strike .choices { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.quick-strike .choice { min-height: 44px; padding: 8px 6px; text-align: center; justify-items: center; align-content: center; }
.quick-strike .choice .c-name { font-size: 13.5px; }
.quick-strike .strike-warn { margin: 0; }
.quick-strike .qs-go { min-height: 48px; font-size: 15px; font-weight: 700; }
.qs-reason-link { justify-self: start; }
.quick-strike textarea.reason { min-height: 44px; font-size: 13.5px; }
/* our strike list: ranked rows that can be dragged */
.plan-head { display: flex; align-items: center; justify-content: space-between; }
.plan-head .link { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.plan-list { display: grid; gap: 6px; }
.pl-row { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 2px; background: var(--surface); }
.pl-row.dragging { box-shadow: var(--shadow-lg); border-color: var(--accent); position: relative; z-index: 2; }
.pl-row .si-main { min-width: 0; }
.pl-handle { flex: none; width: 22px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); cursor: grab; touch-action: none; }
.pl-handle svg { width: 10px; height: 14px; }
.pl-row.dragging .pl-handle { cursor: grabbing; }
.pl-rank { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--danger-soft); color: var(--danger); font-variant-numeric: tabular-nums; }
.pl-btns { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.pl-btns .btn.sq { width: 28px; height: 28px; padding: 0; font-size: 10px; }
.pl-strike { color: var(--danger); padding: 4px 8px; }
.pl-strike:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.pl-btns .x { font-size: 18px; padding: 2px 3px; }
.pl-cut { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; color: var(--danger); margin: 2px 0; white-space: nowrap; }
.pl-cut::before, .pl-cut::after { content: ""; flex: 1; border-top: 2px dashed var(--danger); opacity: .5; }
.plan-btn { width: 100%; margin: -8px 0 14px; font-weight: 600; }
.plan-btn.on { background: var(--danger-soft); border-color: rgba(180,35,24,.3); color: var(--danger); }
.j-plan { display: inline-block; flex: none; font-size: 10px; font-weight: 750; line-height: 16px; padding: 0 4px; border-radius: 4px; background: #b42318; color: #fff; }
@media (pointer: coarse) { .pl-btns .btn.sq { width: 36px; height: 36px; } .pl-handle { width: 28px; height: 44px; } }
.plan-acts { display: inline-flex; gap: 14px; }
.link.danger { color: var(--danger); }

/* colorblind mode: unfavorable scores are striped as well as orange, so they stand out without color */
.colorblind .juror.neg, .colorblind .score-chip.neg {
  background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.13) 0 2px, transparent 2px 8px); }
.cb-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.cb-check input { margin-top: 2px; }

/* internet research in the juror panel: confidence, clear, research again, and the sources as links */
.web-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.web-conf { margin-right: auto; font-size: 12.5px; font-weight: 650; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-2); }
.web-conf.c-high { background: var(--ok); border-color: var(--ok); color: #fff; }
.web-conf.c-medium { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.web-tools .btn { min-height: 36px; }
.web-links { list-style: none; margin: 0 0 6px; padding: 0; font-size: 12.5px; display: grid; gap: 2px; }
.web-links:empty { display: none; }
.web-links li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.web-links a { color: var(--accent); font-weight: 600; display: inline-block; padding: 4px 0; }

/* Settings: color themes and fonts, as buttons to try (each device keeps its own) */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.choice-grid .choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 64px; padding: 10px 12px; text-align: left;
  border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.choice-grid .choice.on { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice .swatches { display: flex; gap: 3px; }
.choice .swatches.sw-dark { display: none; }    /* the theme's dark colors, shown in dark appearance */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .choice .swatches.sw-light { display: none; } :root:not([data-theme="light"]) .choice .swatches.sw-dark { display: flex; } }
:root[data-theme="dark"] .choice .swatches.sw-light { display: none; }
:root[data-theme="dark"] .choice .swatches.sw-dark { display: flex; }
.choice .swatches i { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); }
.choice-label { font-size: 13px; font-weight: 600; line-height: 1.2; }
.choice-sub { font-size: 11.5px; color: var(--ink-3); line-height: 1.25; margin-top: -3px; }
.font-sample { font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }

/* the juror panel: research still coming in */
.res-state { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.res-state .res-dot { width: 18px; height: 18px; }

/* Settings: research has already run for this panel (it runs once) */
.set-row.done-once { cursor: default; }
.set-row.done-once .set-label { color: var(--ink-3); }
.set-row.done-once .ico { opacity: .35; }
.set-row.done-once:hover { background: none; }

/* Admin (test copy only): pick one juror to research */
.admin-note { color: var(--warn); }
.admin-research { width: 100%; min-height: 44px; margin: 4px 0 8px; }
.admin-pick .search { width: 100%; margin-bottom: 6px; }
.admin-jurors { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.admin-juror { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); background: var(--surface); text-align: left; }
.admin-jurors li:first-child .admin-juror { border-top: 0; }
.admin-juror .aj-num { font-weight: 700; min-width: 54px; }
.admin-juror .aj-name { flex: 1; }
.admin-juror .aj-state { font-size: 12px; color: var(--ink-3); }
.admin-status { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.admin-status p { margin: 0 0 6px; }
/* start page: the issues in the case and the questionnaire, grouped as details for research */
.case-info { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, transparent); }
.case-info .fine { margin: 0; }
/* Issues in this case (drawers/issues.js): the questionnaire's issues, each with a remove button */
.issue-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.issue-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.issue-list .issue-drop { width: 40px; height: 40px; flex: none; }
.issues-text { margin-bottom: 8px; }
/* juror panel: a profile link pasted by hand, and the links kept (drawers/juror.js) */
.link-box { margin: 10px 0; }
.link-add { display: flex; gap: 8px; align-items: center; }
.link-add .link-in { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.profile-links { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.profile-links li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; font-size: 13px; overflow-wrap: anywhere; }
.profile-links .x { width: 40px; height: 40px; flex: none; }
/* Admin menu: the server log (drawers/admin.js) */
.admin-log { max-height: 320px; overflow: auto; margin: 8px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.offscreen { position: fixed; left: -9999px; top: 0; }
/* Display: the order of the parts of a name, dragged into place (drawers/view.js) */
.name-order { display: flex; gap: 8px; margin: 6px 0; touch-action: none; }
.name-tile { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.name-tile b { font-size: 15px; }
.name-tile span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.name-tile.dragging { cursor: grabbing; box-shadow: 0 6px 18px rgba(0,0,0,.18); border-color: var(--brass, #c9a45a); background: var(--surface-2); }
.name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.name-now { margin: 4px 0; font-weight: 550; }
.name-tile.off { opacity: .5; border-style: dashed; }
.name-tile.off b { text-decoration: line-through; }

/* Signing in (core/signin.js) */
.signin { max-width: 420px; margin: 8vh auto 40px; padding: 28px 24px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; }
.signin-modal .signin { margin: 0 auto; border: 0; }
.signin-modal { max-height: 92vh; overflow: auto; }
.signin-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
.signin-logo svg { width: 40px; height: 44px; display: block; }
.signin-name { font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif; font-size: 26px; font-weight: 600; letter-spacing: .12em; color: var(--ink); }
.signin-body, .signin-form { display: grid; gap: 14px; }
.signin-body h2 { font-size: 17px; margin: 4px 0 0; }
.signin-body input { width: 100%; font-size: 17px; min-height: 44px; }
.signin .btn.big { min-height: 48px; font-size: 16px; width: 100%; }
.signin-msg { color: var(--danger); margin: 0; min-height: 1em; }
.si-step { display: grid; gap: 10px; }
.setup-key code { font-size: 16px; letter-spacing: .06em; user-select: all; -webkit-user-select: all; }
.account-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -12px 0 20px; color: var(--ink-3); }
.account-bar .btn { min-height: 44px; }

/* Co-counsel: a panel shared by another firm (home list and board bar) */
.shared-tag { display: inline-block; align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 600; color: #4a3608; background: #f1e3c0; border: 1px solid #c9a45a; border-radius: 6px; padding: 2px 8px; }
.access-pill { font-size: 12px; font-weight: 600; background: var(--brass); color: #0e1f3a; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }

/* The Firm page (home/firm.js) */
.firm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 900px) { .firm-grid { grid-template-columns: 1fr; } }
.firm-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 8px; }
.firm-page .btn, .firm-page select, .firm-page input { min-height: 44px; }
.m-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.m-row .grow { display: flex; flex-direction: column; min-width: 200px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.add-member h3 { margin: 12px 0 0; font-size: 15px; }
.s-panel { padding: 12px 0; border-bottom: 1px solid var(--line); list-style: none; }
.shares { margin: 8px 0; padding: 0; list-style: none; }
.s-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0; }
.share-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.share-form .s-email { flex: 1; min-width: 200px; }
.admin-log { margin: 0; padding: 0; list-style: none; }
.admin-log li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Klero support openings (D-155): on the Firm page and its button */
.support-notice { border: 2px solid var(--danger, #b42318); margin-bottom: 20px; }
.btn.support-alert { border-color: var(--danger, #b42318); color: var(--danger, #b42318); font-weight: 650; }
