/* AI ONE Sales. Same look as aioneconsulting.com: white, one grey band, graphite text, one blue.
   Spacing steps: 4 8 12 16 24 32. Every card has the same 24px inset, so text edges line up down the page.
   Every control (button, input, select, switch) is 40px tall, so rows of controls sit on one line. */
:root {
  --bg: #fff;
  --band: #f5f5f7;
  --band-2: #e8e8ed;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e5e5ea;
  --blue: #0071e3;
  --blue-dark: #0066cc;
  --blue-soft: #e8f1fd;
  --green: #1a7f37;
  --green-soft: #e6f4ea;
  --amber: #9a5b00;
  --amber-soft: #fff4dd;
  --red: #c9302c;
  --red-soft: #fdecea;
  --violet: #5b4bb7;
  --violet-soft: #efecfb;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  --lift: 0 12px 40px -12px rgba(0, 0, 0, 0.25);
  --r: 14px;
  --pad: 24px;
  --side: 248px;
  --ctl: 40px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, ol, ul { margin: 0; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 15px; line-height: 1.3; font-weight: 650; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--band); border-right: 1px solid var(--line-soft); padding: 20px 12px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; margin-bottom: 16px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none !important; }
.brand img { width: 28px; height: 28px; display: block; }
.brand span span { color: var(--ink-2); font-weight: 500; }
.side .find { position: relative; margin-bottom: 12px; }
.side .find svg { position: absolute; left: 12px; top: 11px; color: var(--ink-2); pointer-events: none; }
.side .find input { padding-left: 36px; background: #fff; }
.nav { display: grid; gap: 2px; }
.nav a, .side .linkbtn { display: flex; align-items: center; gap: 12px; height: var(--ctl); padding: 0 12px; border-radius: 10px; color: var(--ink); font-weight: 500; border: 0; background: none; width: 100%; text-align: left; text-decoration: none !important; }
.nav a:hover, .side .linkbtn:hover { background: var(--band-2); }
.nav a.on { background: #fff; box-shadow: var(--shadow); color: var(--blue-dark); }
.side .grow { flex: 1; min-height: 16px; }
.side .foot { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.side .seg { margin: 0 12px; justify-self: start; }
.side .who { padding: 0 12px; font-size: 13px; line-height: 1.35; }
.side .who b { display: block; font-size: 14px; }
.main { padding: 32px 40px 80px; min-width: 0; }
.page { max-width: 1160px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 56px; margin-bottom: 24px; }
.page-head p { margin-top: 6px; max-width: 64ch; }
.page-head .row { min-height: var(--ctl); }
.topbar, .tabbar { display: none; }

/* ---------- pieces ---------- */
.card { min-width: 0; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--pad); }
.card.flush { padding: 8px 0 0; overflow: hidden; }
.card-head { margin-bottom: 16px; }
.card-head p { margin-top: 4px; color: var(--ink-2); font-size: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 0 16px; font-weight: 550; height: var(--ctl); text-decoration: none !important; color: var(--ink); white-space: nowrap; }
.btn:hover { background: var(--band); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.big { font-size: 17px; padding: 0 28px; height: 52px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--blue-dark); padding-inline: 12px; }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }

.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-size: 13px; font-weight: 550; color: var(--ink-2); }
input[type='text'], input[type='password'], input[type='date'], input[type='search'], input[type='email'], input[type='tel'], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; height: var(--ctl);
}
textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; display: block; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; }
.check input { width: 16px; height: 16px; margin: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; border-radius: 99px; padding: 0 10px; font-size: 12.5px; font-weight: 600; background: var(--band); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.plain::before { display: none; }
.st-new { background: var(--band); color: var(--ink-2); }
.st-trying { background: var(--amber-soft); color: var(--amber); }
.st-talking { background: var(--blue-soft); color: var(--blue-dark); }
.st-later { background: var(--violet-soft); color: var(--violet); }
.st-interested, .st-meeting { background: var(--green-soft); color: var(--green); }
.st-won { background: var(--green); color: #fff; }
.st-lost, .st-dead { background: var(--band); color: #8a8a8f; }
.tag-pl { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1px #f1c6c3; }
.tag-pl::before { background: linear-gradient(#fff 50%, #dc143c 50%); box-shadow: 0 0 0 1px #e3b5b5; width: 11px; height: 8px; border-radius: 2px; }
.tag-pl.mini { height: 20px; padding: 0 7px; font-size: 11px; gap: 5px; flex: none; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 0 14px; font-weight: 550; font-size: 14px; height: 34px; white-space: nowrap; }
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.sm { height: 28px; padding: 0 11px; font-size: 13px; }

.seg { display: inline-flex; background: var(--band-2); border-radius: 10px; padding: 3px; height: var(--ctl); }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.seg.sm { height: 32px; }

.empty { text-align: center; padding: 48px 24px; color: var(--ink-2); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; width: max-content; max-width: calc(100vw - 32px); min-height: 44px; padding: 8px 8px 8px 18px; display: flex; align-items: center; gap: 12px; border-radius: 22px; line-height: 1.35; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 50; white-space: normal; }
#toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast span { padding-right: 10px; }
#toast button { flex: none; border: 0; background: rgba(255, 255, 255, 0.16); color: #fff; border-radius: 99px; height: 30px; padding: 0 14px; font-weight: 600; }
#toast button:hover { background: rgba(255, 255, 255, 0.28); }

/* ---------- login ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; background: var(--band); padding: 20px; }
.gate .card { width: min(420px, 100%); padding: 32px; display: grid; gap: 16px; }
.gate .brand { padding: 0; margin: 0; font-size: 18px; }

/* ---------- today ---------- */
.start { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { display: grid; align-content: center; gap: 2px; min-height: 76px; background: var(--band); border-radius: 12px; padding: 12px 16px; color: inherit; text-decoration: none !important; min-width: 0; }
a.tile:hover { background: var(--band-2); }
.tile b { font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.tile.hot { background: var(--green-soft); }
.tile.hot b { color: var(--green); }
a.tile.hot:hover { background: #d7eedd; }
.steps { counter-reset: s; display: grid; gap: 12px; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: -1px; }

/* a list of companies: name, status and date each keep their own column */
.list { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 150px 108px; align-items: center; gap: 16px; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none !important; }
.item:first-child { border-top: 0; }
.item:hover { background: var(--band); box-shadow: -12px 0 0 var(--band), 12px 0 0 var(--band); border-radius: 4px; }
.item .who2 { display: grid; gap: 2px; min-width: 0; }
.item .t { display: flex; align-items: center; gap: 8px; min-height: 22px; font-weight: 600; min-width: 0; }
.item .s { font-size: 13.5px; color: var(--ink-2); }
.item .pill { justify-self: start; }
.item .d { justify-self: end; font-size: 13px; white-space: nowrap; }
.late { color: var(--red); font-weight: 600; }

/* ---------- one company ---------- */
.modebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: var(--ctl); margin-bottom: 16px; }
.lead-head { display: grid; gap: 12px; }
.lead-head h1 { font-size: 30px; }
.lead-head .sub { margin-top: -6px; color: var(--ink-2); }
.callbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.callbar .btn { height: 48px; }
.phone { display: inline-flex; align-items: center; gap: 10px; height: 48px; background: var(--blue); color: #fff !important; border-radius: 99px; padding: 0 24px; margin-right: 4px; font-size: 20px; font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; text-decoration: none !important; }
.phone:hover { background: var(--blue-dark); }
.phone svg.ic { width: 20px; height: 20px; vertical-align: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; color: var(--ink-2); }
.meta b { color: var(--ink); font-weight: 600; }
.meta .off { color: var(--amber); font-weight: 600; }
.note { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; border-radius: 12px; padding: 12px 16px; background: var(--band); }
.note svg.ic { margin-top: 2px; vertical-align: 0; }
.note b { display: block; }
.note.amber { background: var(--amber-soft); }
.note.green { background: var(--green-soft); }
.why { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 12px 12px 0; padding: 14px 16px; display: grid; gap: 6px; }
.why .label { font-size: 12.5px; font-weight: 650; color: var(--blue-dark); letter-spacing: 0.02em; }
.why .big { font-size: 17px; font-weight: 600; line-height: 1.35; }
.why .links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; margin-top: 4px; }
.why .wy h4 { margin: 0 0 4px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); letter-spacing: 0.01em; }
.why .wy ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.why .wy p { margin: 0; }
.why .wy + .wy { border-top: 1px solid rgba(0, 113, 227, 0.16); padding-top: 10px; margin-top: 2px; }
.why .wy.good li { font-size: 16px; font-weight: 600; line-height: 1.4; }
.why .wy.bad li { font-size: 15.5px; line-height: 1.4; }
.why .wy.help p { font-size: 14.5px; }
.why .wy-none { margin: 0; font-size: 14px; color: var(--ink-2); }
.why .wy-check { font-size: 13.5px; color: var(--ink-2); }
.why .wy-check summary { cursor: pointer; width: max-content; max-width: 100%; }
.why .wy-check p, .why .wy-check ul { margin: 6px 0 0; }
.why .wy-check ul { padding-left: 18px; }
.why.danger .wy + .wy { border-top-color: rgba(201, 48, 44, 0.18); }
.why.danger { border-color: var(--red); background: var(--red-soft); }
.why.danger .label { color: var(--red); }
.facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.tabs button { border: 0; background: none; height: 38px; padding: 0 12px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--blue-dark); border-color: var(--blue); }
.script { font-size: 16px; line-height: 1.55; display: grid; gap: 8px; }
.script .say { background: var(--band); border-radius: 12px; padding: 12px 16px; }
.script .say p { max-width: 66ch; }
.script mark { background: #fff3b8; border-radius: 4px; padding: 0 3px; color: inherit; }
.script .cue { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 2px; }
.script .tip-line { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.script .detail, .prose .detail { background: var(--blue-soft); border-radius: 4px; padding: 0 4px; font-style: italic; }
details.obj { border-top: 1px solid var(--line-soft); padding: 12px 0; }
details.obj:first-child { border-top: 0; padding-top: 0; }
details.obj summary { cursor: pointer; font-weight: 600; }
details.obj p { margin-top: 8px; max-width: 66ch; }

.ogroup + .ogroup { margin-top: 16px; }
.ogroup h3 { font-size: 12.5px; font-weight: 650; color: var(--ink-2); letter-spacing: 0.02em; margin-bottom: 8px; }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.callgrid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.callgrid aside .out { height: auto; min-height: 54px; padding: 8px 10px; font-size: 13.5px; gap: 8px; }
.out { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 12px; height: 48px; text-align: left; font-weight: 600; font-size: 14px; line-height: 1.2; display: flex; align-items: center; gap: 10px; min-width: 0; }
.out:hover { border-color: var(--ink-2); }
.out .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--line); }
.out[data-tone='try'] .dot { background: #e0a030; }
.out[data-tone='talk'] .dot { background: var(--blue); }
.out[data-tone='good'] .dot { background: var(--green); }
.out[data-tone='later'] .dot { background: var(--violet); }
.out[data-tone='bad'] .dot { background: #a1a1a6; }
.out.on { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--blue); }
.after { display: grid; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.after .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.hint { font-size: 13.5px; color: var(--ink-2); }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.timeline { display: grid; gap: 16px; }
.ev { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 12px; }
.ev::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-top: 6px; }
.ev.human::before { background: var(--blue); }
.ev.good::before { background: var(--green); }
.ev .h { font-size: 13px; color: var(--ink-2); }
.ev .h b { color: var(--ink); font-weight: 600; font-size: 14px; }
.noteform { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.noteform textarea { min-height: 56px; }
.noteform .btn { justify-self: start; }
.tmpl { background: var(--band); border-radius: 12px; padding: 12px 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.5; max-height: 260px; overflow: auto; }

/* ---------- tables ---------- */
.toolbar { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr)); gap: 12px; }
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl.fixed { table-layout: fixed; min-width: 860px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: var(--pad); }
.tbl th:last-child, .tbl td:last-child { padding-right: var(--pad); }
.tbl tr.go { cursor: pointer; }
.tbl tr.go:hover td { background: var(--band); }
.tbl .t { font-weight: 600; }
.tbl .name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.tbl .two { display: grid; gap: 2px; min-width: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl-foot { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 var(--pad); border-top: 1px solid var(--line-soft); }
.bar { height: 8px; border-radius: 99px; background: var(--band-2); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.bar.green i { background: var(--green); }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--band); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; min-width: 0; }
.col > h3 { display: flex; justify-content: space-between; align-items: center; height: 28px; padding: 0 4px; }
.col > h3 span { color: var(--ink-2); font-weight: 500; }
.kc { background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07); display: grid; gap: 4px; color: inherit; text-decoration: none !important; font-size: 13.5px; min-width: 0; }
.kc:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12); }
.kc b { font-size: 14px; }
.kc .step { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc .f { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-top: 2px; font-size: 12.5px; }
.kc .f .sp { flex: 1; }

/* ---------- results ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--band); border-radius: var(--r); padding: 16px; height: 104px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.kpi b { font-size: 30px; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi small { font-size: 12.5px; color: var(--ink-2); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 11px; fill: var(--ink-2); font-family: inherit; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.funnel { display: grid; grid-template-columns: max-content minmax(0, 1fr) 44px; gap: 10px 16px; align-items: center; }
.funnel .n { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- playbook ---------- */
.book { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 32px; align-items: start; }
.book nav { position: sticky; top: 24px; display: grid; gap: 2px; }
.book nav a { display: flex; align-items: center; min-height: var(--ctl); padding: 6px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; text-decoration: none !important; }
.book nav a:hover { background: var(--band); }
.book nav a.on { background: var(--blue-soft); color: var(--blue-dark); }
.prose { max-width: 72ch; display: grid; gap: 16px; font-size: 16px; line-height: 1.6; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 17px; margin-top: 8px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 6px; }
.prose .say { background: var(--band); border-radius: 12px; padding: 12px 16px; }
.prose .say + .say { margin-top: -8px; }
.prose .tip { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 12px 12px 0; padding: 12px 16px; font-size: 15px; }
.prose .warn { border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 0 12px 12px 0; padding: 12px 16px; font-size: 15px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose th { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

/* ---------- modal ---------- */
.veil { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal { background: #fff; border-radius: 18px; box-shadow: var(--lift); width: min(560px, 100%); max-height: 90dvh; overflow: auto; padding: 24px; display: grid; gap: 16px; }
.modal .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }


/* ---------- added: badges, tasks, groups ---------- */
.nav a .count, .tabbar a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 650; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.seg button:disabled { opacity: 0.4; cursor: default; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
h3.big { font-size: 17px; }
.card-head.pad { padding: 16px var(--pad) 0; margin-bottom: 12px; }
.section-head { margin-top: 8px; }
.section-head p { margin-top: 4px; font-size: 14px; }
.inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.filters .dd { width: 240px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.barrow .num { text-align: right; }
.ts-todo { background: var(--band); color: var(--ink-2); }
.ts-doing { background: var(--blue-soft); color: var(--blue-dark); }
.ts-review { background: var(--amber-soft); color: var(--amber); }
.ts-done { background: var(--green-soft); color: var(--green); }
.board.four { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.statusbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.statusbar button { padding: 0 6px; }
.group { display: grid; gap: 16px; }
.members { display: flex; flex-wrap: wrap; gap: 8px; }
.member { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 4px 0 14px; border-radius: 99px; background: var(--band); font-weight: 550; font-size: 14px; }
.member .muted { font-weight: 400; font-size: 12.5px; }
.member.fixed { padding-right: 14px; color: var(--ink-2); }
.member button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.member button:hover { background: var(--band-2); color: var(--red); }
.member button svg.ic { width: 14px; height: 14px; vertical-align: 0; }
.addrow .dd { width: 300px; max-width: 100%; }
.matrix td { vertical-align: top; }
.tbl.people td { height: 64px; }
.mv { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12.5px; line-height: 1.35; font-weight: 600; }
.mv-yes, .mv-all { background: var(--green-soft); color: var(--green); }
.mv-view, .mv-groups, .mv-own { background: var(--blue-soft); color: var(--blue-dark); }
.mv-no { background: var(--band); color: #8a8a8f; }
.item.plain { grid-template-columns: 1fr; }
.item.plain .t { display: flex; align-items: center; gap: 12px; font-weight: 600; }


/* ---------- drop-downs, calendar, questions: the CRM's own pop-ups ---------- */
.dd { position: relative; width: 100%; min-width: 0; }
.dd > select { display: none; }
.dd-btn { width: 100%; height: var(--ctl); display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.dd-btn:hover { border-color: var(--ink-2); }
.dd-btn[aria-expanded='true'] { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.dd-btn:disabled { background: var(--band); color: var(--ink-2); cursor: default; }
.dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .dd-chev { color: var(--ink-2); }
.dd-menu { position: fixed; z-index: 70; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; box-shadow: var(--lift); padding: 6px; overflow: auto; display: grid; gap: 2px; max-width: min(420px, calc(100vw - 16px)); }
.dd-opt { display: flex; align-items: center; gap: 10px; justify-content: space-between; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; color: var(--ink); }
.dd-opt:hover, .dd-opt:focus-visible { background: var(--band); outline: none; }
.dd-opt.on { color: var(--blue-dark); font-weight: 600; }
.dd-opt:disabled { color: #a1a1a6; }
.dd-opt svg.ic { width: 16px; height: 16px; flex: none; }
.cal { width: 288px; padding: 12px; gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; text-transform: capitalize; }
.cal-nav { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 20px; line-height: 1; color: var(--ink-2); }
.cal-nav:hover { background: var(--band); color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-n { font-size: 11.5px; color: var(--ink-2); height: 24px; line-height: 24px; text-transform: uppercase; }
.cal-d { height: 34px; border: 0; border-radius: 8px; background: none; font-variant-numeric: tabular-nums; font-size: 14px; }
.cal-d:hover { background: var(--band); }
.cal-d.we { color: var(--ink-2); }
.cal-d.now { box-shadow: inset 0 0 0 1px var(--blue); }
.cal-d.on { background: var(--blue); color: #fff; font-weight: 600; }
.cal-d:disabled { color: #c7c7cc; background: none; cursor: default; }
.cal-foot { display: flex; justify-content: flex-end; }
.date-btn svg.ic { color: var(--ink-2); }
.dd-btn.placeholder .dd-label { color: var(--ink-2); }
.cal-foot { gap: 4px; }
.modal.ask { width: min(420px, 100%); }
.modal.ask p { font-size: 15px; line-height: 1.5; }
.btn.danger-fill { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-fill:hover { background: #b0282a; }

/* ---------- documents ---------- */
.ds-draft { background: var(--amber-soft); color: var(--amber); }
.ds-signed { background: var(--green-soft); color: var(--green); }
.docgrid { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.docform { display: grid; gap: 20px; }
.docsec { display: grid; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.docsec:first-of-type { padding-top: 0; border-top: 0; }
.docform .two { grid-template-columns: minmax(0, 1fr); }
.checks { display: grid; gap: 8px; }
.checks .btn { justify-self: start; }
em.from { font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--green); background: var(--green-soft); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.paperwrap { min-width: 0; overflow-x: auto; }
.paper { background: #fff; color: #1d1d1f; max-width: 816px; margin: 0 auto; padding: 56px 60px; border: 1px solid var(--line-soft); border-radius: 6px; box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.55; display: grid; gap: 10px; }
.paper h1 { font-size: 24px; margin: 6px 0 2px; }
.paper h2 { font-size: 15px; margin-top: 12px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.paper .sample { border: 2px solid var(--red); background: var(--red-soft); color: var(--red); border-radius: 8px; padding: 8px 12px; font-weight: 650; font-size: 12.5px; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.doc-brand { display: flex; gap: 10px; align-items: center; }
.doc-brand img { width: 32px; height: 32px; }
.doc-brand span { display: block; color: var(--ink-2); font-size: 12px; }
.doc-no { text-align: right; font-size: 12.5px; color: var(--ink-2); }
.paper .kv { border-collapse: collapse; width: 100%; }
.paper .kv th { text-align: left; font-weight: 500; color: var(--ink-2); width: 140px; padding: 6px 10px 6px 0; vertical-align: bottom; white-space: nowrap; }
.paper .kv td { padding: 6px 16px 6px 0; vertical-align: bottom; }
.paper .fill { font-weight: 600; }
.paper .fill-block { white-space: pre-wrap; font-weight: 500; }
.paper .blank { display: inline-block; border-bottom: 1px solid #1d1d1f; height: 1.2em; vertical-align: bottom; }
.paper .blank.line { display: block; width: 100%; height: 26px; }
.paper .boxes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.paper .boxes li { display: flex; align-items: center; gap: 10px; }
.paper .box { width: 15px; height: 15px; border: 1.5px solid #1d1d1f; border-radius: 2px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.paper .by-hand { font-size: 12px; color: var(--ink-2); font-style: italic; }
.paper .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.paper .sub-h { font-weight: 600; margin-top: 4px; }
.paper .sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 8px; }
.paper .sig-title { font-weight: 600; }
.paper .sig-line { height: 70px; border-bottom: 1px solid #1d1d1f; display: flex; align-items: flex-end; }
.paper .sig-line img { max-height: 66px; max-width: 100%; }
.paper .sig-meta { display: grid; gap: 4px; margin-top: 6px; font-size: 12.5px; }
.sigpad { width: 100%; height: 150px; border: 1px solid var(--line); border-radius: 12px; background: var(--band); touch-action: none; display: block; cursor: crosshair; }
.checklist { display: grid; gap: 10px; }
.checklist.works { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.check.step { align-items: flex-start; }
.check.step input { margin-top: 3px; }
.check.step.done span { color: var(--ink-2); text-decoration: line-through; }
.soldbox { background: var(--band); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.soldbox ul { margin: 0; padding-left: 18px; }
.soldbox + .soldbox { margin-top: 8px; }
.big-find { position: relative; }
.big-find svg { position: absolute; left: 12px; top: 11px; color: var(--ink-2); }
.big-find input { padding-left: 36px; }
.picklist { max-height: 360px; overflow: auto; }
button.item { width: 100%; border: 0; border-top: 1px solid var(--line-soft); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.item:first-child { border-top: 0; }

@media print {
  @page { size: letter; margin: 14mm; }
  body { background: #fff; }
  .side, .topbar, .tabbar, .modebar, .docform, #toast, .veil, .dd-menu { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .page { max-width: none; }
  .docgrid { display: block; }
  .paper { box-shadow: none; border: 0; padding: 0; max-width: none; }
}


/* ---------- client clocks, goal, keys, quiet cards, best time ---------- */
.clocks { gap: 8px 12px; }
.clock { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; font-size: 13px; background: var(--band); color: var(--ink-2); white-space: nowrap; }
.clock svg.ic { width: 15px; height: 15px; vertical-align: 0; }
.clock b { color: var(--ink); font-variant-numeric: tabular-nums; }
.clock.open { background: var(--green-soft); color: var(--green); }
.clock.closed { background: var(--band); color: #8a8a8f; }
.meta .clock { height: 24px; font-size: 12.5px; }
.bar.goal { height: 10px; }
.out .grow { flex: 1; min-width: 0; }
.out kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); background: var(--band); border-radius: 5px; padding: 3px 6px; }
.keys-hint { margin-top: 12px; }
@media (pointer: coarse) { .out kbd, .keys-hint { display: none; } }
.kc.stale { box-shadow: inset 3px 0 0 var(--red), 0 1px 3px rgba(0, 0, 0, 0.07); }
.up { color: var(--green); font-weight: 600; }
.heat { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.heat th { color: var(--ink-2); font-weight: 600; padding: 2px 4px; text-align: center; }
.heat tbody th { text-align: left; padding-right: 8px; }
.heat td { width: 46px; height: 32px; border-radius: 6px; background: var(--band); text-align: center; }
.heat td[style] { background: hsl(var(--h) 55% 45% / var(--a)); color: #fff; font-weight: 600; }


/* task board: each status has its colour */
.col.ts-col-todo { box-shadow: inset 0 3px 0 #a1a1a6; }
.col.ts-col-doing { box-shadow: inset 0 3px 0 var(--blue); background: #eef4fc; }
.col.ts-col-review { box-shadow: inset 0 3px 0 #e0a030; background: #fdf6ea; }
.col.ts-col-done { box-shadow: inset 0 3px 0 var(--green); background: #eef7f0; }
.col.ts-col-doing .kc { box-shadow: inset 3px 0 0 var(--blue), 0 1px 3px rgba(0, 0, 0, 0.07); }
.col.ts-col-review .kc { box-shadow: inset 3px 0 0 #e0a030, 0 1px 3px rgba(0, 0, 0, 0.07); }
.col.ts-col-done .kc { box-shadow: inset 3px 0 0 var(--green), 0 1px 3px rgba(0, 0, 0, 0.07); }
.col.ts-col-doing > h3 { color: var(--blue-dark); }
.col.ts-col-review > h3 { color: var(--amber); }
.col.ts-col-done > h3 { color: var(--green); }
.chip.add { border-style: solid; border-color: var(--blue); color: var(--blue-dark); }
.quickadd { display: grid; gap: 12px; margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--band); }

@media (max-width: 1240px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar > :first-child { grid-column: 1 / -1; }
  /* one column on the call screen: company, then what happened, then the script, then the rest */
  .callgrid > .stack { display: contents; }
  .callgrid > .stack > * { order: 4; }
  .callgrid .o1 { order: 1; }
  .callgrid .o2 { order: 2; }
  .callgrid .o3 { order: 3; }
  .docgrid { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 860px) {
  :root { --pad: 16px; }
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); z-index: 20; }
  .topbar .brand { padding: 0; margin: 0; }
  .main { padding: 20px 16px 110px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line-soft); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-2); padding: 4px 0; text-decoration: none; }
  .tabbar a.on { color: var(--blue-dark); }
  .tabbar svg.ic { width: 22px; height: 22px; }
  h1 { font-size: 24px; }
  .lead-head h1 { font-size: 24px; }
  .page-head { min-height: 0; margin-bottom: 16px; }
  .book, .start { grid-template-columns: minmax(0, 1fr); }
  .start .btn.big { width: 100%; }
  .book nav { position: static; grid-auto-flow: column; overflow-x: auto; grid-auto-columns: max-content; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar > :first-child { grid-column: 1 / -1; }
  .after .two, .modal .two { grid-template-columns: minmax(0, 1fr); }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone { flex: 1 1 100%; justify-content: center; margin-right: 0; }
  .callbar .btn { flex: 1; padding: 0 8px; }
  .item { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .item .who2 { grid-row: 1 / span 2; }
  .item .pill { justify-self: end; }
  .item .d { grid-column: 2; }
  .tile { padding: 0 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel { grid-template-columns: max-content minmax(0, 1fr) 36px; gap: 8px 10px; }
  .board.four { grid-template-columns: repeat(4, 240px); }
  .filters .dd, .addrow .dd { width: 100%; }
  .docgrid { grid-template-columns: minmax(0, 1fr); }
  .paper { padding: 28px 20px; }
  .paper .sigs, .paper .cols { grid-template-columns: 1fr; }
  .statusbar { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statusbar button { height: 34px; }
  .tabbar a { position: relative; }
  .tabbar a .count { position: absolute; top: 0; left: 55%; margin: 0; height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }
  .board { grid-template-columns: repeat(5, 240px); }
  #toast { bottom: 84px; }
}

/* ---------- calmer screens and straight edges (2026-11-13 review) ---------- */
/* text buttons, used for rare actions (add a note, change a date, delete a draft) */
.linkbtn { border: 0; background: none; padding: 0; color: var(--blue-dark); font-weight: 600; font-size: inherit; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.late { color: var(--red); }
.linkbtn svg.ic { width: 16px; height: 16px; }
/* two lines, then "…": next steps and long names never vanish after a dozen letters */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* one "selected" look: soft blue, the same family as the selected menu row */
.chip.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
/* numbers in tiles sit on one line even when a label wraps */
.tile { align-content: start; padding-top: 14px; }
/* kinds of work: quiet text, not pills that look clickable */
.kinds { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.row .kinds { margin-right: 4px; }
/* forms: a footer with the main button left and a quiet red action far right */
.formfoot { align-items: center; }
.formfoot .sp, .row .sp { flex: 1; }
.modal form > .formfoot, .modal > .formfoot { position: sticky; bottom: -24px; background: #fff; padding: 12px 0; margin-bottom: -12px; border-top: 1px solid var(--line-soft); }
/* folds: a card whose title opens it */
.foldcard > summary, .foldsec > summary, .syslog > summary, details.col > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.foldcard > summary::-webkit-details-marker, .foldsec > summary::-webkit-details-marker, .syslog > summary::-webkit-details-marker, details.col > summary::-webkit-details-marker { display: none; }
.foldcard > summary::after, .foldsec > summary::after, .syslog > summary::after, details.col > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); margin: -4px 4px 0; transition: transform 0.15s; }
.foldcard[open] > summary::after, .foldsec[open] > summary::after, .syslog[open] > summary::after, details.col[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.foldcard[open] > summary { margin-bottom: 16px; }
.foldcard.flush[open] > summary { margin-bottom: 4px; }
.foldsec > summary { padding: 4px 0; }
.foldsec[open] > summary { margin-bottom: 16px; }
.syslog { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.syslog[open] > summary { margin-bottom: 8px; }
.pad-x { padding: 0 var(--pad) 12px; }
/* call screen */
.talkin { gap: 8px; }
.whenline { margin: 0; font-size: 14.5px; }
.whenline .linkbtn { margin-left: 6px; }
.item.doc { grid-template-columns: minmax(0, 1fr) auto; }
.aside-first, .stack.client > .first { order: -1; }
.script mark { padding: 0 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.facts dd { overflow-wrap: break-word; }
/* companies: search, status and one Filters button */
.toolbar.top { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto; }
.toolbar .btn.on { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-soft); }
.tbl.fixed.leads, .tbl.fixed.stats, .tbl.fixed.people { min-width: 0; }
.tbl.leads col.c-next { width: 34%; }
.tbl.leads td { vertical-align: top; }
.tbl.leads td.c-st, .tbl.leads td.c-ph { padding-top: 14px; }
.tbl.people col.c-groups { width: 30%; }
.tbl.people td.c-act { text-align: right; }
.tbl.people tr.off td { color: var(--ink-2); }
/* pipeline: the date keeps one line and drops below the tag when it must */
.kc .f { flex-wrap: wrap; row-gap: 4px; }
.kc .f > :not(.sp) { white-space: nowrap; }
.board { scroll-snap-type: x proximity; }
.board > .col { scroll-snap-align: start; }
.boardtabs { display: none; }
/* tasks: an executor's list reads top to bottom */
.tasklist { display: grid; gap: 12px; }
.tasklist .col { grid-template-columns: minmax(0, 1fr); }
details.col > summary h3 { display: flex; align-items: center; height: 28px; padding: 0 4px; }
/* documents */
.docform .two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.paper .kv th, .paper .kv td { vertical-align: top; }
.paperwrap.solo .paper { max-width: 860px; }
/* results */
.tbl.stats td.t { overflow-wrap: anywhere; }

@media (max-width: 1240px) {
  /* one column: company, documents and work (on a client's page), what happened, the script, the rest */
  .callgrid > .stack > * { order: 5; }
  .callgrid .o1 { order: 1; }
  .callgrid .first { order: 2; }
  .callgrid .o2 { order: 3; }
  .callgrid .o3 { order: 4; }
  .taskgrid > .stack { display: contents; }
  .taskgrid > .stack > * { order: 5; }
  .taskgrid .t1 { order: 1; }
  .taskgrid .t2 { order: 2; }
  .taskgrid .t3 { order: 3; }
  .taskgrid .t4 { order: 4; }
  .tbl.leads .c-seller { display: none; }
  /* the task board stacks: one status under another, empty ones hidden */
  .board.four { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .board.four > .col.none { display: none; }
  .board.four > .col { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .board.four > .col > h3 { grid-column: 1 / -1; }
  .paper { padding: 32px 28px; }
  .paper .kv th { width: 112px; white-space: normal; }
}
@media (max-width: 1100px) {
  .tbl.people .c-login { display: none; }
  .docgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  /* list rows: the name gets the full width, status and date sit under it */
  .item { grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
  .item .who2 { grid-row: auto; grid-column: 1 / -1; }
  .item .pill { justify-self: start; }
  .item .d { grid-column: auto; justify-self: end; }
  .item .nm { white-space: normal; }
  .item.doc { grid-template-columns: minmax(0, 1fr) auto; }
  .item.doc .who2 { grid-column: 1; }
  /* a lone outcome button fills its row */
  .outcomes > .out:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* script tabs wrap as chips */
  .tabs { gap: 6px; border-bottom: 0; }
  .tabs button { height: 32px; border: 1px solid var(--line); border-radius: 99px; margin: 0; padding: 0 12px; }
  .tabs button.on { background: var(--blue-soft); border-color: var(--blue); }
  /* companies: rows become blocks, nothing scrolls sideways */
  .toolbar.top { grid-template-columns: minmax(0, 1fr) auto; }
  .toolbar.top > :first-child { grid-column: 1 / -1; }
  .tbl.leads, .tbl.leads tbody { display: block; }
  .tbl.leads thead, .tbl.leads colgroup { display: none; }
  .tbl.leads tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px var(--pad); border-bottom: 1px solid var(--line-soft); }
  .tbl.leads td { display: block; padding: 0 !important; border: 0; }
  .tbl.leads td.c-co, .tbl.leads td.c-next { grid-column: 1 / -1; }
  .tbl.leads td.c-ph { justify-self: end; }
  .tbl.leads .nm { white-space: normal; }
  /* results: the numbers stay, the bar track goes */
  .tbl.stats .bar { display: none; }
  .heat { width: 100%; table-layout: fixed; border-spacing: 2px; }
  .heat td { width: auto; height: 24px; }
  .heat td span { display: none; }
  .heat th { padding: 2px 0; font-size: 10.5px; }
  /* team: name and role, groups under */
  .tbl.people .c-groups { display: none; }
  /* pipeline: one column at a time, picked from a switch */
  .boardtabs { display: flex; overflow-x: auto; height: auto; flex-wrap: nowrap; }
  .boardtabs button { height: 32px; white-space: nowrap; }
  .boardtabs button span { color: var(--ink-2); font-weight: 500; margin-left: 4px; }
  .board:not(.four) { display: block; overflow: visible; }
  .board:not(.four) > .col:not(.cur) { display: none; }
  .board.four > .col { grid-template-columns: minmax(0, 1fr); }
}
/* long Polish and Russian words ("Niezainteresowany") break inside an outcome button instead of spilling out */
.out .grow { min-width: 0; overflow-wrap: break-word; }
.modebar .row { gap: 8px; }
.tile span { overflow-wrap: break-word; }
/* headers of number tables may take two lines (Russian and Polish headers are long) */
.tbl.stats th { white-space: normal; height: auto; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; vertical-align: bottom; }
.tbl .t { overflow-wrap: anywhere; }
/* company names in the list wrap to two lines instead of ending in "…" */
.tbl.leads .nm { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* a switch in a card title drops under the title when there is no room, and scrolls if it must */
.card-head.spread { flex-wrap: wrap; gap: 8px 12px; }
.seg { max-width: 100%; overflow-x: auto; }
.seg button { white-space: nowrap; flex: none; }
.kpi span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.kpi { height: auto; min-height: 104px; }

/* ---------- one page template for every screen (2026-11-14) ----------
   The scrollbar no longer appears and disappears between short and long pages, so the content never shifts sideways
   when you switch a section, a filter or a period. Every page is the same width, from the same left edge. */
html { scrollbar-gutter: stable; overflow-y: scroll; }
.page { width: 100%; max-width: 1160px; margin-inline: auto; }
.page-head { min-height: 64px; align-items: flex-end; }
.page-head > div:first-child { min-width: 0; flex: 1 1 360px; }
.book { grid-template-columns: 232px minmax(0, 1fr); }
.book .prose { max-width: 72ch; width: 100%; }

/* pipeline cards: nothing pokes out of a card, long dates and names wrap inside */
.col { grid-template-columns: minmax(0, 1fr); }
.kc, .kc > * { min-width: 0; }
.kc b { overflow-wrap: anywhere; }
.kc .f { flex-wrap: wrap; }
.kc .f > :not(.sp) { white-space: normal; min-width: 0; }
.kc .f .late, .kc .f .muted { overflow-wrap: anywhere; }

/* "If they say…": each answer is a calm card that opens */
.objs { display: grid; gap: 8px; }
details.obj { border: 1px solid var(--line-soft); border-radius: 12px; padding: 0; background: #fff; }
details.obj:first-child { padding-top: 0; }
details.obj summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; font-weight: 600; line-height: 1.35; }
details.obj summary::-webkit-details-marker { display: none; }
details.obj summary::after { content: ''; margin-left: auto; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); margin-top: -4px; transition: transform 0.15s; }
details.obj[open] { background: var(--band); border-color: var(--band-2); }
details.obj[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.obj summary:hover { color: var(--blue-dark); }
details.obj .ans { padding: 0 16px 14px; display: grid; gap: 8px; }
details.obj .ans p { margin: 0; max-width: 66ch; }

/* call screen: the header */
.lead-head .titlerow { gap: 10px; align-items: center; }
.lead-head .titlerow h1 { margin-right: 4px; }
.lead-head .sub { margin-top: 4px; }
.recent { display: grid; gap: 4px; font-size: 14px; padding: 10px 14px; border-radius: 10px; background: var(--band); }
.recent p { margin: 0; }
.recent .k { color: var(--ink-2); font-size: 12.5px; font-weight: 650; margin-right: 6px; }
/* "Why we call" in three short rows */
.whyrows { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 14px; margin: 2px 0 0; }
.whyrows dt { font-size: 12.5px; font-weight: 650; color: var(--ink-2); padding-top: 2px; }
.whyrows dd { margin: 0; display: grid; gap: 4px; }
.whyrows dd p { margin: 0; line-height: 1.4; }
.whyrows dd.good p:not(.muted) { font-weight: 600; }
.why .links { margin-top: 2px; }
.why .wy-check { margin-top: -2px; }
.check.small { font-size: 13px; min-height: 0; gap: 6px; }
/* the right column: the outcome panel (two steps) on top, then documents, work, history and details (owner,
   2026-11-14: "this part was more convenient on the right"); the whole column stays in view while the script scrolls */
.outpanel { display: grid; gap: 14px; }
.outpanel h2 { font-size: 18px; }
.outpanel .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
.outpanel .out { height: auto; min-height: 48px; padding: 8px 12px; }
.outpanel .out.talked { border-color: var(--blue); color: var(--blue-dark); }
.outpanel .out .arr { font-size: 20px; line-height: 1; color: var(--blue-dark); }
.outpanel .ogroup + .ogroup { margin-top: 2px; }
.outpanel .linkbtn.back { justify-self: start; }
.outpanel .chosen { display: flex; align-items: center; gap: 12px; }
.outpanel .chosen .out { flex: 1; pointer-events: none; }
.outpanel .after { border-top: 0; padding-top: 0; margin-top: 0; }
@media (min-width: 1241px) {
  /* taller than the window (a long history, details open): the column scrolls by itself, the answers stay on top */
  .callgrid > aside:not(.client) { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; margin: -2px; }
}
@media (max-width: 860px) {
  .whyrows { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .whyrows dd { margin-bottom: 8px; }
  .lead-head .titlerow h1 { flex-basis: 100%; }
  .page-head { min-height: 0; }
  .book { grid-template-columns: minmax(0, 1fr); }
}
/* inside the narrow outcome panel the date, its quick chips and the next step take the full width */
.outpanel .after .two { grid-template-columns: minmax(0, 1fr); }

/* ===== 2026-11-14 · the language on a phone: one button in the top bar, the list opens under it ===== */
.langbtn { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); }
.langbtn .ic { width: 16px; height: 16px; color: var(--ink-2); }
.langbtn[aria-expanded='true'] { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 0; }

/* ===== 2026-11-14 · first-timer pass: each part of the app keeps its new rules under its own heading ===== */
/* -- shell: sign-in, navigation, pop-ups, shared pieces -- */
/* a field the CRM's own form check stopped at: a red edge until the person types again */
:is(input, textarea, select, .dd-btn)[aria-invalid='true'] { border-color: var(--red); outline-color: var(--red); }
/* the last row of buttons in a pop-up stays at the bottom of the box, also when the form sits in a .stack */
.modal > .stack > .formfoot { position: sticky; bottom: -24px; background: #fff; padding: 12px 0; margin-bottom: -12px; border-top: 1px solid var(--line-soft); }
.formfoot > .form-err { flex-basis: 100%; margin-bottom: 4px; }
/* the page that cannot open: one line, then Try again when the CRM did not answer */
.empty.card .btn { margin-top: 8px; }

/* -- today and the call screen -- */
/* a company rung outside its hours shows its clock in amber */
.meta .clock.closed { background: var(--amber-soft); color: var(--amber); }
.meta .clock.closed b { color: var(--amber); }
/* call mode: the answer saved last, with Undo, under the mode bar; only the company name is cut */
.modebar .lastsaved { flex: 1 1 100%; order: 3; min-width: 0; display: flex; align-items: baseline; gap: 6px; margin: -4px 0 0; font-size: 14px; color: var(--ink-2); }
.modebar .lastsaved .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modebar .lastsaved .oc { flex: none; white-space: nowrap; color: var(--ink); }
.modebar .lastsaved .linkbtn { flex: none; margin-left: 6px; }
.ev .h .linkbtn.undo { margin-left: 6px; font-size: 13px; }
/* script lines in a row under one label: one box, one paragraph each */
.script .say > p + p:not(.tip-line) { margin-top: 8px; }
/* "pick a date first": the date box says where */
.after .field.bad .dd-btn, .after .field.bad input[type='date'] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
/* the e-mail pop-up: a long link breaks inside its box instead of running out of it */
.tmpl { overflow-wrap: anywhere; }
/* New document: what each paper is for */
.picklist .item.plain .s { font-weight: 400; padding-left: 30px; }
.anotherbrief { margin: 12px 0 4px; }
.anotherbrief a { display: inline-flex; align-items: center; gap: 6px; }
/* one column: a client's papers come right after the company, not above it */
@media (max-width: 1240px) {
  .callgrid .stack.client > .first { order: 2; }
}
@media (max-width: 480px) {
  .modebar .editbtn .lbl { display: none; }
}

/* -- companies and pipeline -- */
/* Companies' filter drop-downs keep their whole label ("Wszystkie branże", "Najbliższy telefon"): as many as fit
   side by side, one under another on a phone; the trade gets more room for "Kamień, szkło, podłogi, metal" */
.fpanel .toolbar { display: flex; flex-wrap: wrap; }
.fpanel .toolbar > * { flex: 1 1 230px; }
.fpanel .toolbar > :first-child { flex: 2 1 300px; grid-column: auto; }
/* "Nothing found" spans the whole row, also when rows are blocks on a phone */
.tbl.leads td.c-empty { grid-column: 1 / -1; }
.tbl.leads .empty .linkbtn { margin-left: 6px; }
@media (max-width: 860px) {
  /* Pipeline on a phone: every column name in view as wrapping chips (a sideways strip hid Client and Not now);
     the column's own heading would only repeat the picked chip */
  .boardtabs { flex-wrap: wrap; overflow: visible; height: auto; gap: 6px; padding: 0; background: none; }
  .boardtabs button { height: 34px; border: 1px solid var(--line); border-radius: 99px; background: #fff; box-shadow: none; padding: 0 12px; font-size: 14px; }
  /* the picked column is filled, so it does not look like the list chips above it */
  .boardtabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: none; }
  .boardtabs button.on span { color: inherit; opacity: 0.85; }
  .board:not(.four) > .col.cur > h3 { display: none; }
}

/* -- tasks -- */
/* "+ New task" in "New clients waiting for work": the button takes its own width (rows restack at 1240 px and below) */
@media (min-width: 1241px) {
  .item:has(> .btn) { grid-template-columns: minmax(0, 1fr) auto auto; }
}
/* the sent-back note in the task's head card: the reason keeps its line breaks */
.lead-head .note .pre { display: block; margin-top: 2px; }
/* the task pop-up's "+ New person": the fields, then (after saving) the login and password to hand over */
.qa-fields, .qa-done { display: grid; gap: 12px; }
.qa-done p { margin: 0; }
/* credentialsBox(): a login and password with one Copy button (shared: Team can use it too) */
.creds { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #fff; }
.creds dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; min-width: 0; }
.creds dt { color: var(--ink-2); font-size: 13px; padding-top: 1px; }
.creds dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* -- team, results, documents, playbook -- */
/* printing gives the client's paper only: no interface boxes (the green "Signed" note), and the English paper that a
   Polish or Russian reader of a work brief does not see on screen */
.printonly { display: none; }
@media print {
  .note { display: none !important; }
  .printonly { display: block !important; }
}
/* a work brief read in Polish or Russian: the form, every field locked; short fields two by two on a computer */
@media (min-width: 861px) {
  .docform.locked .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.docform.locked :is(input, textarea):disabled { background: var(--band); border-color: transparent; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; resize: none; }
.docform.locked .check:has(input:not(:checked)) { color: var(--ink-2); }
.docform.locked .check:has(input:checked) { font-weight: 600; }
/* results on a phone: every table row is a block, each number with its own label; the four-way switch is 2 by 2 */
@media (max-width: 860px) {
  .tbl.stats thead, .tbl.stats colgroup { display: none; }
  .tbl.stats, .tbl.stats tbody { display: block; }
  .tbl.stats tr { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px var(--pad); border-bottom: 1px solid var(--line-soft); }
  .tbl.stats td { display: block; padding: 0 !important; border: 0; height: auto; text-align: left; }
  .tbl.stats td.t { flex-basis: 100%; font-weight: 600; }
  .tbl.stats td[data-l]::before { content: attr(data-l) " "; color: var(--ink-2); }
  .tbl.stats .barrow { display: inline; }
}
@media (max-width: 600px) {
  .card-head .seg.sm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; width: 100%; }
  .card-head .seg.sm button { height: 30px; white-space: normal; line-height: 1.2; }
  /* team on a phone: a person is name, role under it, Change on the right; "Who sees what" lists only what a role has */
  .tbl.people thead, .tbl.people colgroup { display: none; }
  .tbl.people, .tbl.people tbody { display: block; }
  .tbl.people tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px var(--pad); border-bottom: 1px solid var(--line-soft); align-items: center; }
  .tbl.people td { display: block; padding: 0 !important; border: 0; height: auto; }
  .tbl.people td.c-name, .tbl.people td.c-role { grid-column: 1; }
  .tbl.people td.c-role { color: var(--ink-2); font-size: 13px; }
  .tbl.people td.c-act { grid-column: 2; grid-row: 1 / span 2; }
  .tbl.people .t { overflow-wrap: break-word; }
  .tbl.matrix thead, .tbl.matrix colgroup { display: none; }
  .tbl.matrix, .tbl.matrix tbody { display: block; min-width: 0 !important; width: 100%; }
  .tbl.matrix tr { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 12px var(--pad); border-bottom: 1px solid var(--line-soft); }
  .tbl.matrix td { display: block; padding: 0; border: 0; }
  .tbl.matrix td:first-child { flex-basis: 100%; }
  .tbl.matrix td:has(.mv-no) { display: none; }
  .tbl.matrix td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-2); font-size: 13px; }
  /* the work brief's blank lines fit the phone instead of pushing the paper sideways */
  .paper .blank:not(.line) { min-width: 0 !important; width: 100%; max-width: 220px; }
}
/* the Guide on a phone: every page name in view as wrapping chips (a sideways strip hid six of the eight) */
@media (max-width: 860px) {
  .book nav { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }
  .book nav a { min-height: 34px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; }
  .book nav a.on { border-color: var(--blue); }
}
/* the sign-in details after Add a person or New password: the shared box on the pop-up's white */
.handover { margin: 12px 0 16px; }
.handover .creds { background: var(--band); }
