:root {
  --brand: #1f3b2d; --brand-2: #2c5240; --on-brand: #f4f0e8;
  --bg: #f4f0e8; --surface: #fffdf9; --line: #e2dbcf; --line-2: #d3cabb;
  --ink: #1c1a17; --muted: #6b645a; --faint: #958c7f;
  --accent: #8a6a42; --accent-bg: #f3ead9;
  --danger: #a3372b; --ok: #2f6b45;
  --s-new: #2a5d8f; --s-contacted: #7a5a17; --s-visit_booked: #6b3f8f; --s-negotiation: #a0551b; --s-won: #2f6b45; --s-lost: #7d756a;
  --r: 10px; --shadow: 0 1px 2px rgba(28,26,23,.06), 0 4px 16px rgba(28,26,23,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.boot { padding: 40px; color: var(--muted); }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 500; }
.btn:hover { border-color: var(--muted); }
.btn:focus-visible, .inp:focus-visible, .tab:focus-visible, tr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--danger { color: var(--danger); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn--wa { background: #e7f4ea; border-color: #c4e2cc; color: #1d5a32; }
.inp { min-height: 38px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); min-width: 0; }
textarea.inp { min-height: 80px; resize: vertical; width: 100%; }
label.fld { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
label.fld .inp { color: var(--ink); font-size: 15px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--brand); }
.login form { width: min(380px, 100%); background: var(--surface); border-radius: 14px; padding: 32px 28px; display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login .err { color: var(--danger); font-size: 14px; margin: 0; min-height: 1.4em; }
.wm { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: .9; color: var(--brand); letter-spacing: .01em; }
.wm small { display: block; font-size: .5em; margin-top: 4px; font-weight: 700; }
.wm em { font-family: var(--font); font-style: normal; font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--brand); color: var(--on-brand); }
.top__in { max-width: 1400px; margin: 0 auto; padding: 0 16px; height: 58px; display: flex; align-items: center; gap: 18px; }
.top .wm { color: var(--on-brand); font-size: 24px; }
.top .wm em { color: #c9a979; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--on-brand); opacity: .75; text-decoration: none; padding: 6px 12px; border-radius: 7px; font-weight: 500; }
.nav a[aria-current="page"], .nav a:hover { opacity: 1; background: rgba(255,255,255,.1); }
.top__me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.top__me .btn { min-height: 32px; background: transparent; color: var(--on-brand); border-color: rgba(255,255,255,.3); }

main { max-width: 1400px; margin: 0 auto; padding: 20px 16px 60px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.head h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1; margin: 0; color: var(--brand); }
.head .sub { color: var(--muted); font-size: 14px; }
.head .acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }

/* filters */
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(140px, 1fr)) auto; gap: 8px; margin-bottom: 12px; }
.filters .dates { display: flex; gap: 6px; align-items: center; }
.filters .dates .inp { width: 140px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: thin; }
.tab { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 14px; }
.tab b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tab[aria-pressed="true"] b { color: inherit; opacity: .8; }

/* table */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #faf7f1; position: sticky; top: 58px; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #faf6ee; }
.tbl tbody tr.is-open { background: var(--accent-bg); }
.who b { display: block; font-weight: 600; }
.who span, .meta { color: var(--muted); font-size: 13px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.more { display: flex; justify-content: center; padding: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); }
.src { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: #ece6da; color: var(--muted); margin-left: 6px; vertical-align: 1px; }
.warn { color: var(--danger); font-size: 12px; }

/* mobile cards instead of table */
@media (max-width: 860px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
  .filters .dates { grid-column: 1 / -1; flex-wrap: wrap; }
  .filters .dates .inp { flex: 1; width: auto; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr { padding: 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
  .tbl td { padding: 0; border: 0; }
  .tbl td.c-int, .tbl td.c-camp { grid-column: 1 / -1; }
  .tbl td.c-time, .tbl td.c-status, .tbl td.c-as { font-size: 13px; }
  .head h1 { font-size: 28px; }
  .nav { margin-left: 0; }
  .me__name { display: none; }
}

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(28,26,23,.35); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 31; overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.drawer__head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; z-index: 2; }
.drawer__head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.drawer__head .meta { margin-top: 2px; }
.drawer__head .x { margin-left: auto; }
.drawer__body { padding: 16px 18px 40px; display: grid; gap: 16px; }
.contact { display: flex; flex-wrap: wrap; gap: 8px; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.sec h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pipe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pipe button { padding: 8px 6px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; text-align: center; }
.pipe button[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dl.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.note-form { display: grid; gap: 8px; }
.note-form .btn { justify-self: end; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li { font-size: 14px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.feed li.k-note { border-color: var(--accent); }
.feed li.k-note .body { white-space: pre-wrap; }
.feed .meta { font-size: 12px; }

/* settings */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.check li { display: flex; gap: 8px; align-items: baseline; }
.check .y { color: var(--ok); font-weight: 700; }
.check .n { color: var(--danger); font-weight: 700; }
.copy { display: flex; gap: 6px; }
.copy .inp { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.log { font-size: 13px; max-height: 360px; overflow-y: auto; }
.log div { padding: 6px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.log .bad { color: var(--danger); }
.team li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.team li .btn { min-height: 30px; padding: 0 10px; font-size: 13px; }
.team li span { margin-right: auto; }
.team { list-style: none; padding: 0; margin: 0 0 12px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* modal */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 40; background: rgba(28,26,23,.4); padding: 16px; }
.modal form { width: min(460px, 100%); background: var(--surface); border-radius: 14px; padding: 22px; display: grid; gap: 12px; max-height: 100%; overflow-y: auto; }
.modal h2 { margin: 0 0 4px; font-family: var(--serif); color: var(--brand); font-size: 26px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 50; font-size: 14px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
#toast.is-bad { background: var(--danger); }

/* ---------- view switch ---------- */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg__b { border: 0; background: transparent; padding: 0 14px; min-height: 36px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg__b + .seg__b { border-left: 1px solid var(--line-2); }
.seg__b[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.seg__b:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- people ---------- */
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-deep, #6f5433); font-size: 12px; font-weight: 700; letter-spacing: .02em; flex: none; }
.top .avatar { background: rgba(255,255,255,.14); color: var(--on-brand); }
.avatar--s { width: 20px; height: 20px; font-size: 10px; }
.me { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- kanban board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity; }
.board > .empty { grid-column: 1 / -1; }
.col { background: #ebe5da; border-radius: var(--r); min-height: 200px; display: flex; flex-direction: column; scroll-snap-align: start; transition: background .15s; }
.col.is-over { background: var(--accent-bg); outline: 2px dashed var(--accent); outline-offset: -4px; }
.col__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.col__head b { font-size: 13px; color: var(--muted); }
.col__cards { display: grid; gap: 8px; padding: 6px 8px 10px; }
.col__empty { margin: 0; padding: 18px 8px; text-align: center; color: var(--faint); font-size: 13px; border: 1px dashed var(--line-2); border-radius: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px 8px; box-shadow: 0 1px 2px rgba(28,26,23,.05); cursor: grab; display: grid; gap: 4px; font-size: 13px; }
.kcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.kcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kcard.is-dragging { opacity: .45; cursor: grabbing; }
.kcard.is-open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.kcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.kcard__name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.kcard__top .src { margin-left: 0; flex: none; }
.kcard__phone { color: var(--ink); }
.kcard__meta { color: var(--muted); overflow-wrap: anywhere; }
.kcard__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.who-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.who-tag.is-none { color: var(--faint); font-weight: 400; }
.due { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #ece6da; color: var(--muted); white-space: nowrap; }
.due.is-today { background: #f6e7c8; color: #7a5a17; font-weight: 600; }
.due.is-late { background: #f5dcd8; color: var(--danger); font-weight: 600; }
.kcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.kcard__touched { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard__move { font-size: 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); padding: 2px 4px; max-width: 46%; cursor: pointer; opacity: 0; transition: opacity .12s; }
.kcard:hover .kcard__move, .kcard:focus-within .kcard__move { opacity: 1; }
@media (hover: none), (max-width: 860px) {
  .kcard__move { opacity: 1; min-height: 30px; font-size: 13px; }
  .kcard { cursor: pointer; }
}
@media (max-width: 860px) {
  .board { grid-auto-columns: 84%; margin: 0 -16px; padding: 0 16px 12px; scroll-padding: 0 16px; }
  .tbl td.c-touch { grid-column: 1 / -1; font-size: 12px; }
}

/* ---------- history lines ---------- */
.feed .line { line-height: 1.45; }
.feed .actor { font-weight: 600; }
.feed .actor--sys { color: var(--muted); font-weight: 500; }
.feed li.k-status { border-color: var(--s-visit_booked); }
.feed li.k-assign { border-color: var(--s-new); }
.feed li.k-delete { border-color: var(--danger); }
.feed li.k-team { border-color: var(--brand); }
.feed li .body { white-space: pre-wrap; margin: 2px 0; padding: 6px 10px; background: var(--accent-bg); border-radius: 6px; }
.feed a { font-weight: 500; }

/* ---------- activity page ---------- */
.act { padding: 6px 18px 12px; }
.act__day h3 { margin: 16px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.act .feed { gap: 12px; }

/* ---------- lead drawer: contact editing ---------- */
.sec__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sec__head h3 { margin: 0; }
.btn--s { min-height: 30px; padding: 0 10px; font-size: 13px; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-grid .acts { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 520px) { .edit-grid { grid-template-columns: 1fr; } }

/* ---------- team ---------- */
.steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.steps .copy { margin-top: 6px; }
.team li { flex-wrap: wrap; }
.team__who { margin-right: auto; }
.team li .avatar, .team li .team__who .meta { margin-right: 0; }
.nav a { white-space: nowrap; }
.col, .col__cards, .kcard { min-width: 0; }
.kcard__move { min-width: 0; width: 46%; }

/* =====================================================================
   Today, "What happened?", and plain-language help (no training needed)
   ===================================================================== */
:root { --warm: #8a5a12; --warm-bg: #f6e7c8; --late-bg: #f5dcd8; --ok-bg: #e3ede5; }
::selection { background: color-mix(in oklab, var(--accent) 25%, transparent); }
body { caret-color: var(--accent); }
.ico { width: 16px; height: 16px; fill: currentColor; flex: none; }
.drawer__head .x .ico { width: 18px; height: 18px; }
.btn--s .ico { width: 14px; height: 14px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; }
.btn--primary:disabled { opacity: .45; }

/* setup banner: what is missing, in words */
.setup { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #e5cf9f; background: #fbf3e2; border-radius: var(--r); }
.setup > div { flex: 1 1 420px; }
.setup b { display: block; font-size: 15px; }
.setup p { margin: 2px 0 0; color: #5d4a25; font-size: 14px; }

/* the three-step guide */
.guide { display: flex; align-items: flex-start; gap: 16px; padding: 14px 18px; margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.guide ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; flex: 1; }
.guide b { font-weight: 600; }

/* queues */
.today { display: grid; gap: 22px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: clip; }
.q__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.q__head h2 { margin: 0; font-size: 18px; font-weight: 650; display: inline-flex; align-items: center; gap: 8px; }
.q__head p { margin: 0; color: var(--muted); font-size: 14px; }
.q__n { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 600; }
.q__empty { margin: 0; padding: 22px 18px; color: var(--muted); font-size: 14px; }
.q__list { list-style: none; margin: 0; padding: 0; }
.qr { display: grid; grid-template-columns: 112px minmax(180px, 1.1fr) minmax(200px, 1.4fr) auto; gap: 8px 20px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.qr:first-child { border-top: 0; }
.qr.is-logging { background: #fbf8f2; }
.qr__when { display: grid; gap: 1px; }
.qr__when b { font-size: 20px; font-weight: 650; line-height: 1.1; letter-spacing: -.01em; }
.qr__when span { font-size: 12px; color: var(--muted); }
.qr__when.is-ok b { color: var(--ok); }
.qr__when.is-warm b { color: var(--warm); }
.qr__when.is-late b { color: var(--danger); }
.qr__name { font-weight: 650; font-size: 16px; color: var(--ink); text-decoration: none; }
.qr__name:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.qr__line { color: var(--ink); font-size: 14px; margin-top: 2px; }
.qr__ctx { font-size: 14px; display: grid; gap: 2px; min-width: 0; }
.qr__ctx > div:first-child { overflow-wrap: anywhere; }
.qr__last { color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr__acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.qr > .wh { grid-column: 1 / -1; }

/* "What happened?" */
.wh { display: grid; gap: 12px; padding: 16px; margin-top: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); }
.sec--call .wh { padding: 0; margin: 0; border: 0; box-shadow: none; }
.wh__q { margin: 0; font-weight: 650; font-size: 16px; }
.wh__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.wh__opt { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; transition: background-color .15s, border-color .15s, color .15s; }
.wh__opt:hover { border-color: var(--ink); }
.wh__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wh__opt[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.wh__opt.is-good[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.wh__opt.is-bad[aria-pressed="true"] { background: var(--s-lost); border-color: var(--s-lost); }
.wh__date { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.wh__date .fld { min-width: 200px; }
.wh__quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #f7f3ec; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--muted); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wh__note textarea { min-height: 56px; }
.wh__preview { margin: 0; font-size: 14px; color: var(--brand); }
.wh__acts { display: flex; justify-content: flex-end; gap: 8px; }

/* board: what each stage means */
.col__head { flex-wrap: wrap; }
.col__hint { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.35; }

/* drawer */
.drawer__stage { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0 2px; }
.sec--call { border-color: var(--line-2); box-shadow: var(--shadow); }
.stage-hand summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.stage-hand[open] summary { margin-bottom: 10px; }
.feed li.k-call { border-color: var(--brand); }

/* setup checklist */
.conn { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.conn.is-on { background: var(--ok-bg); color: var(--ok); }
.conn.is-off { background: #fbf3e2; color: #6d531f; }
.check--steps { counter-reset: none; gap: 12px; }
.check--steps li { align-items: flex-start; }
.tickbox { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--line-2); position: relative; }
.tickbox.is-done { background: var(--ok); border-color: var(--ok); }
.tickbox.is-done::after { content: ""; position: absolute; left: 5.5px; top: 2.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.env { margin-top: 2px; font-size: 12px; color: var(--accent); font-family: ui-monospace, Consolas, monospace; }

@media (max-width: 1100px) {
  .qr { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr); }
  .qr__acts { grid-column: 2 / -1; justify-content: flex-start; }
}
@media (max-width: 700px) {
  .qr { grid-template-columns: 84px minmax(0, 1fr); }
  .qr__ctx, .qr__acts { grid-column: 1 / -1; }
  .guide { flex-direction: column; }
}

/* ---------- import a spreadsheet ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.imp { width: min(760px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.imp__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 18px 22px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.imp__head h2 { margin: 0; font-family: var(--serif); color: var(--brand); font-size: 26px; }
.imp__head .x { margin-left: auto; }
.imp__body { padding: 16px 22px 22px; display: grid; gap: 14px; }
.imp__lead { margin: 0; font-size: 15px; }
.imp__drop { display: grid; place-items: center; gap: 4px; padding: 36px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: #faf7f1; cursor: pointer; text-align: center; transition: background-color .15s, border-color .15s; }
.imp__drop b { font-size: 16px; color: var(--brand); }
.imp__drop span { color: var(--muted); font-size: 14px; }
.imp__drop:hover, .imp__drop.is-over { background: var(--accent-bg); border-color: var(--accent); }
#imp-file:focus-visible + .imp__drop, .imp__drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.imp__map { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; padding: 2px; }
.imp__col { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #faf7f1; min-width: 0; }
.imp__colhead { display: grid; gap: 2px; min-width: 0; }
.imp__colhead b { font-size: 14px; overflow-wrap: anywhere; }
.imp__colhead .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.imp__opts { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 20px; }
.imp__opts .fld { min-width: 260px; }
.imp__check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 38px; }
.imp__check input { width: 18px; height: 18px; accent-color: var(--brand); }
.imp__sum { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--ok-bg); color: var(--brand); font-size: 14px; }
.imp .acts { display: flex; justify-content: flex-end; gap: 8px; }
.imp__done { margin: 0; font-size: 20px; font-weight: 650; color: var(--ok); }
.imp__list { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.qr__mail { display: block; font-size: 13px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.qr__mail:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.kcard__mail { font-size: 12px; }
