/* Trinity Text Relay — design system from the Claude Design mockup
   (Trinity Rep App v2): Barlow, navy header band, white cards, blue accent.
   Light-first with a dark toggle (body.trin-dark). Responsive: bottom tab
   bar on phones, navy sidebar + split panes on >=760px. */

:root {
  --bg: #EEF2F5; --card: #FFFFFF; --ink: #10202E; --sub: #5B6B78;
  --line: #E1E8EE; --navy: #0C1D2B; --navyInk: #F2F7FA;
  --accent: #1B9CD8; --accentDeep: #0F7FB5; --chip: #F1F5F8;
  --green: #1FA463; --yellow: #E8A413; --red: #E5484D; --redBg: #FDEBEC;
  --desk: #DDE4EA; --shadow: 0 1px 3px rgba(12, 29, 43, .08);
  --wordmark: #2FA9DE; --navySub: #8CA0B0; --navyFaint: #6E8598;
}
body.trin-dark {
  --bg: #0B141D; --card: #14212D; --ink: #E9F0F5; --sub: #8CA0B0;
  --line: #243545; --navy: #0E1B27; --navyInk: #F2F7FA; --chip: #1A2937;
  --redBg: #3A1A1E; --desk: #06090D; --shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--desk); color: var(--ink);
  font-family: 'Barlow', system-ui, sans-serif; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- shell ---------- */
#frame { height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
main#view { flex: 1 1 auto; overflow-y: auto; min-height: 0; }

/* sidebar (tablet/desktop) */
#side { display: none; }
nav.tabs {
  flex: none; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding: 8px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbtn {
  flex: 1; background: none; border: 0; cursor: pointer; color: var(--sub);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; padding: 2px 0;
}
.tabbtn.active { color: var(--accent); }
.tabbtn .icw { position: relative; }
.badge[hidden] { display: none !important; }
.tabbtn .badge {
  position: absolute; top: -3px; right: -8px; background: var(--red);
  color: #fff; font-size: 10px; font-weight: 800; min-width: 16px;
  height: 16px; border-radius: 99px; display: flex; align-items: center;
  justify-content: center; padding: 0 3px;
}

/* ---------- navy header band ---------- */
.hero {
  background: var(--navy); color: var(--navyInk);
  padding: 20px 18px 18px;
}
.hero .toprow { display: flex; align-items: center; gap: 10px; }
.wordmark { font-family: Georgia, serif; font-size: 17px; letter-spacing: 4px; color: var(--wordmark); font-weight: 600; }
.hero .spacer { flex: 1; }
.iconbtn {
  cursor: pointer; width: 32px; height: 32px; border-radius: 99px; border: 0;
  background: rgba(255, 255, 255, .1); color: #A9BCCA;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.avatar-chip {
  width: 32px; height: 32px; border-radius: 99px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
}
.hero .date { font-size: 13px; color: var(--navySub); margin-top: 12px; font-weight: 600; }
.hero .headline { font-size: 26px; font-weight: 800; margin-top: 2px; line-height: 1.15; }
.hero .headline .hl { color: var(--wordmark); }
.hero .page-title { font-size: 22px; font-weight: 800; }
.hero .page-sub { font-size: 13px; color: var(--navySub); margin-top: 3px; font-weight: 600; }
.hero select.rep-picker {
  background: rgba(255,255,255,.1); color: var(--navyInk);
  border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
  padding: 5px 8px; font-size: .82rem; font-family: inherit;
}
.legend { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--navySub); }
.legend span { display: flex; align-items: center; gap: 5px; }

/* ---------- content & cards ---------- */
.content { padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px;
}
.card.clickable { cursor: pointer; }
.qname { font-size: 17px; font-weight: 800; }
.qsub { font-size: 13px; color: var(--sub); font-weight: 600; }
.reason {
  font-size: 13.5px; line-height: 1.4; color: var(--ink); margin-top: 8px;
  background: var(--chip); border-radius: 8px; padding: 8px 10px;
}
.rowtop { display: flex; align-items: flex-start; gap: 8px; }
.rowtop .grow { flex: 1; cursor: pointer; min-width: 0; }
.pill {
  font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px;
  flex: none; white-space: nowrap;
}
.pill.overdue { background: var(--red); color: #fff; }
.pill.today { background: var(--chip); color: var(--sub); border: 1px solid var(--line); }
.pill.replied { background: var(--yellow); color: #fff; }
.pill.pausedp { background: var(--chip); color: var(--sub); border: 1px solid var(--line); }

.btnrow { display: flex; gap: 8px; margin-top: 10px; }
.btn {
  border: 0; border-radius: 11px; cursor: pointer; font-weight: 800;
  font-size: 15px; padding: 12px 0; display: flex; align-items: center;
  justify-content: center; gap: 7px;
}
.btn.primary { background: var(--accent); color: #fff; flex: 1.4; }
.btn.primary:hover { background: var(--accentDeep); }
.btn.outline {
  background: none; border: 1.5px solid var(--line); color: var(--ink);
  flex: 1; font-size: 13.5px; font-weight: 700;
}
.btn.outline.dim { color: var(--sub); flex: .8; }
.btn:disabled { opacity: .5; }

.sechead {
  font-size: 13px; font-weight: 800; letter-spacing: .8px; color: var(--sub);
  margin-top: 10px; text-transform: uppercase;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); }

/* activity rows */
.actrow {
  cursor: pointer; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 11px 13px;
  display: flex; gap: 10px; align-items: center;
}
.actrow .glyph {
  width: 34px; height: 34px; border-radius: 10px; display: flex; flex: none;
  align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px;
}
.actrow .t { font-size: 14px; font-weight: 700; line-height: 1.3; }
.actrow .w { font-size: 12px; color: var(--sub); margin-top: 1px; }
.needsrow {
  cursor: pointer; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--yellow); border-radius: 12px;
  box-shadow: var(--shadow); padding: 11px 13px;
}
.needsrow .top { display: flex; justify-content: space-between; gap: 8px; }
.needsrow .nm { font-size: 14px; font-weight: 800; }
.needsrow .tm { font-size: 12px; color: var(--sub); }
.needsrow .tx { font-size: 13.5px; color: var(--sub); margin-top: 2px; font-style: italic; }

/* ---------- pipeline ---------- */
.colhead { display: flex; align-items: center; gap: 8px; padding: 0 2px 7px; }
.colhead .cn { font-size: 12.5px; font-weight: 800; letter-spacing: .6px; color: var(--sub); text-transform: uppercase; }
.colhead .cc {
  font-size: 11.5px; font-weight: 800; color: var(--sub); background: var(--chip);
  border: 1px solid var(--line); border-radius: 99px; padding: 0 8px;
}
.colhead .rule { flex: 1; height: 1px; background: var(--line); }
.pipecard {
  cursor: pointer; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px;
  display: flex; align-items: center; gap: 11px;
}
.pipecard .nm { font-size: 16px; font-weight: 800; }
.pipecard .cr { font-size: 12.5px; font-weight: 600; color: var(--sub); }
.pipecard .days { font-size: 24px; font-weight: 800; line-height: 1; text-align: right; }
.pipecard .dl { font-size: 10.5px; font-weight: 700; color: var(--sub); }
.pipegroup { display: flex; flex-direction: column; gap: 8px; }

/* ---------- messages ---------- */
.conv {
  display: flex; gap: 12px; padding: 12px 13px; cursor: pointer;
  align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.conv.sel { border-color: var(--accent); }
.conv .cavatar {
  width: 42px; height: 42px; border-radius: 99px; flex: 0 0 42px;
  background: var(--chip); color: var(--accentDeep); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
body.trin-dark .conv .cavatar { color: var(--wordmark); }
.conv .cbody { flex: 1; min-width: 0; }
.conv .ctop { display: flex; justify-content: space-between; gap: 6px; }
.conv .cname { font-weight: 800; font-size: 15px; }
.conv .cwhen { color: var(--sub); font-size: 12px; font-weight: 600; }
.conv .cprev {
  color: var(--sub); font-size: 13.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-top: 2px; font-weight: 500;
}
.conv.unread .cprev { color: var(--ink); font-weight: 700; }
.conv .udot { width: 10px; height: 10px; border-radius: 99px; background: var(--accent); flex: none; }

/* chat thread */
.thread { display: flex; flex-direction: column; gap: 8px; }
.bubble {
  max-width: 82%; padding: 9px 13px; border-radius: 15px; font-size: 14.5px;
  line-height: 1.4; white-space: pre-wrap; word-break: break-word;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.bubble.in { align-self: flex-start; background: var(--card); border-bottom-left-radius: 5px; }
.bubble.out {
  align-self: flex-end; background: var(--accent); border-color: var(--accent);
  color: #fff; border-bottom-right-radius: 5px;
}
.bubble.out.auto { background: var(--chip); border: 1px dashed var(--line); color: var(--ink); }
.bubble .tag {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  color: var(--sub); margin-bottom: 3px; text-transform: uppercase;
}
.bubble .when { display: block; font-size: 11px; margin-top: 4px; text-align: right; opacity: .75; font-weight: 600; }
.composer {
  position: sticky; bottom: 0; background: var(--bg); display: flex; gap: 8px;
  padding: 10px 0 4px; align-items: flex-end;
}
.composer textarea {
  flex: 1; background: var(--card); border: 1px solid var(--line); color: var(--ink);
  border-radius: 14px; padding: 11px 13px; font-size: 15px; font-family: inherit;
  resize: none; min-height: 46px; max-height: 130px;
}
.composer .sendbtn {
  background: var(--accent); border: 0; color: #fff; border-radius: 99px;
  width: 46px; height: 46px; font-size: 17px; cursor: pointer; flex: 0 0 46px;
}
.tpl-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; }
.tpl-chip {
  background: var(--chip); border: 1px solid var(--line); color: var(--sub);
  border-radius: 99px; padding: 7px 13px; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; cursor: pointer; flex: none;
}
.tpl-chip:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- job detail ---------- */
.jobhero { background: var(--navy); color: var(--navyInk); padding: 16px 16px; }
.jobhero .nav { display: flex; align-items: center; gap: 10px; }
.jobhero .backbtn {
  cursor: pointer; background: none; border: 0; display: flex; align-items: center;
  gap: 5px; color: #8FCBE8; font-weight: 600; font-size: 16px; padding: 6px 8px 6px 0;
}
.jobhero .stagelbl { font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--navyFaint); text-transform: uppercase; }
.jobhero .jname { font-size: 24px; font-weight: 800; margin-top: 6px; }
.jobhero .jaddr { font-size: 14px; color: #A9BCCA; margin-top: 2px; }
.jobhero .actions { display: flex; gap: 10px; margin-top: 14px; }
.jobhero .actions a, .jobhero .actions button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; padding: 13px 0; border-radius: 12px;
  border: 0; cursor: pointer;
}
.jobhero .callbtn { flex: 1; background: rgba(255, 255, 255, .12); color: #fff; }
.jobhero .textbtn { flex: 2; background: var(--accent); color: #fff; font-weight: 800; }
.kvgrid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px;
}
.kvgrid .k { font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--sub); text-transform: uppercase; }
.kvgrid .v { font-size: 15px; font-weight: 700; margin-top: 1px; }
.cardhead { font-size: 13px; font-weight: 800; letter-spacing: .6px; color: var(--sub); text-transform: uppercase; }
.nexttouch { font-size: 15px; font-weight: 600; margin-top: 6px; }
.draftbox {
  margin-top: 10px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.draftbox .dtop { display: flex; align-items: center; justify-content: space-between; }
.draftbox .dtpl { font-size: 12px; font-weight: 700; color: var(--accent); }
.draftbox .dbody { font-size: 13.5px; line-height: 1.45; margin-top: 6px; font-style: italic; }
.feedrow { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.feedrow .fdot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); margin-top: 5px; flex: none; }
.feedrow .check { font-size: 13px; flex: none; width: 18px; text-align: center; color: var(--green); font-weight: 800; }
.feedrow .ft { font-size: 14px; font-weight: 600; line-height: 1.35; }
.feedrow .fw { font-size: 12px; color: var(--sub); margin-top: 1px; }

/* ---------- templates ---------- */
.tplcard .cat {
  font-size: 11px; font-weight: 800; letter-spacing: .4px; color: var(--accent);
  background: var(--chip); border: 1px solid var(--line); padding: 1px 8px;
  border-radius: 99px; display: inline-block;
}
.tplcard .body {
  margin-top: 10px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5;
}
.tplcard .note { font-size: 12px; color: var(--sub); font-weight: 600; }

/* ---------- scorecard ---------- */
.bignum { font-size: 38px; font-weight: 800; line-height: 1; }
.bignum small { font-size: 20px; color: var(--sub); font-weight: 700; }
.progress { height: 10px; background: var(--chip); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--accent); border-radius: 99px; }
.tile2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.barchart { display: flex; gap: 8px; align-items: flex-end; height: 70px; margin-top: 12px; }
.barchart .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.barchart .bar { width: 100%; border-radius: 5px; background: var(--accent); min-height: 3px; }
.barchart .bl { font-size: 11px; font-weight: 700; color: var(--sub); }
.quietrow { cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.quietrow .qn { font-size: 14.5px; font-weight: 700; flex: 1; }
.quietrow .qd { font-size: 12.5px; font-weight: 700; color: var(--red); }

/* ---------- misc ---------- */
.empty { color: var(--sub); text-align: center; padding: 30px 20px; font-size: 15px; font-weight: 600; }
.muted { color: var(--sub); font-size: 12.5px; font-weight: 600; }
.modal-scrim {
  position: fixed; inset: 0; background: rgba(12, 29, 43, .45);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal {
  background: var(--card); border-radius: 18px 18px 0 0; width: 100%;
  max-width: 480px; padding: 18px 16px 26px; border: 1px solid var(--line);
}
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.modal textarea {
  width: 100%; background: var(--chip); border: 1px solid var(--line);
  color: var(--ink); border-radius: 12px; padding: 11px; font-size: 14.5px;
  font-family: inherit; min-height: 110px; resize: vertical; margin-top: 10px;
}
.modal input[type="datetime-local"] {
  width: 100%; background: var(--chip); border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; padding: 10px; font-size: 14px;
  font-family: inherit; margin-top: 10px;
}

/* ============================================================
   RESPONSIVE — tablet / laptop: navy sidebar + split panes
   ============================================================ */
@media (min-width: 760px) {
  #frame { flex-direction: row; width: 100%; }
  nav.tabs { display: none; }
  #side {
    display: flex; flex-direction: column; flex: 0 0 218px;
    background: var(--navy); color: var(--navyInk); padding: 22px 14px 18px;
    gap: 4px;
  }
  #side .wordmark { font-size: 19px; padding: 0 10px 14px; }
  .sidebtn {
    display: flex; align-items: center; gap: 11px; padding: 11px 12px;
    border-radius: 10px; border: 0; background: none; cursor: pointer;
    color: var(--navySub); font-size: 15px; font-weight: 700; text-align: left;
  }
  .sidebtn.active { background: rgba(255, 255, 255, .1); color: #fff; }
  .sidebtn .badge {
    margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
    font-weight: 800; min-width: 18px; height: 18px; border-radius: 99px;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
  }
  #side .sidefoot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
  #side select.rep-picker {
    background: rgba(255,255,255,.1); color: var(--navyInk);
    border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
    padding: 7px 8px; font-size: .85rem; font-family: inherit; width: 100%;
  }
  main#view { background: var(--bg); }
  .hero { padding: 26px 28px 20px; }
  .hero .toprow .wordmark, .hero .toprow .rep-picker, .hero .toprow .avatar-chip { display: none; }
  .content { padding: 20px 28px 30px; max-width: 1160px; }

  /* Today: queue left, activity/needs-reply right */
  .today-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 22px; align-items: start; }
  .today-grid .colL, .today-grid .colR { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .today-grid .sechead:first-child { margin-top: 0; }

  /* Messages: list + thread split pane */
  .msg-split { display: grid; grid-template-columns: 340px 1fr; gap: 0; height: 100%; min-height: 0; }
  .msg-list {
    border-right: 1px solid var(--line); overflow-y: auto; padding: 16px 14px;
    display: flex; flex-direction: column; gap: 8px; min-height: 0;
  }
  .msg-pane { overflow-y: auto; padding: 0 24px 16px; min-height: 0; display: flex; flex-direction: column; }
  .msg-pane .composer { background: var(--bg); }

  /* Pipeline: real kanban columns */
  .pipe-board {
    display: flex; gap: 14px; align-items: flex-start; overflow-x: auto;
    padding: 20px 28px 30px;
  }
  .pipe-board .pipe-col { flex: 0 0 262px; display: flex; flex-direction: column; gap: 8px; }

  /* Job: info left, conversation right */
  .job-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .job-grid > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

  /* Templates: 2-up */
  .tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: start; }

  /* Scorecard grid */
  .score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: start; }
  .score-grid .span2 { grid-column: span 2; }

  .modal-scrim { align-items: center; }
  .modal { border-radius: 18px; }
}

@media (min-width: 1080px) {
  .msg-split { grid-template-columns: 380px 1fr; }
}

/* ---- pipeline filters (search + stage chips + collapse) ---- */
.pipesearch {
  width: 100%; margin-top: 12px; padding: 9px 12px; font: inherit;
  font-size: 14px; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; outline: none;
}
.pipesearch:focus { border-color: var(--accent); }
.stagechips {
  display: flex; gap: 6px; margin-top: 10px; overflow-x: auto;
  padding-bottom: 2px; scrollbar-width: none;
}
.stagechips::-webkit-scrollbar { display: none; }
.stagechip {
  cursor: pointer; white-space: nowrap; font: inherit; font-size: 12px;
  font-weight: 700; color: var(--sub); background: var(--chip);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px;
}
.stagechip b { font-weight: 800; }
.stagechip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.colhead.collapsible { cursor: pointer; user-select: none; padding-top: 4px; padding-bottom: 9px; }
.colhead.collapsible:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }
.colhead .chev { font-size: 16px; line-height: 1; color: var(--sub); width: 20px; flex: none; }

/* pipeline controls: group-by toggle + filter dropdown */
.pipe-controls {
  display: flex; gap: 6px; margin-top: 10px; align-items: center;
  flex-wrap: wrap;
}
.filterwrap { position: relative; }
.filterbtn {
  cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--ink); background: var(--chip); border: 1px solid var(--line);
  border-radius: 99px; padding: 5px 12px; display: flex; align-items: center; gap: 6px;
}
.filterbtn .fl { color: var(--sub); font-weight: 600; }
.filterbtn .fcaret { font-size: 10px; color: var(--sub); }
.filterbtn.active { border-color: var(--accent); color: var(--accent); }
.filtermenu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  min-width: min(260px, calc(100vw - 24px));
  max-width: min(330px, calc(100vw - 24px));
  max-height: 60vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35); padding: 6px;
}
.fmhint {
  font-size: 11px; font-weight: 600; color: var(--sub);
  padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.fmrow {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink); background: none; border: 0; border-radius: 8px;
  padding: 8px 10px 8px 6px; user-select: none;
}
.fmrow:hover { background: var(--chip); }
.fmrow:focus-visible { outline: 2px solid var(--accent); }
.fmrow.dragover { box-shadow: inset 0 2px 0 var(--accent); }
.fmrow .grip { flex: none; color: var(--sub); opacity: .55; cursor: grab; font-size: 12px; }
.fmrow .cb {
  flex: none; width: 17px; height: 17px; border-radius: 5px;
  border: 1.5px solid var(--line); background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: transparent;
}
.fmrow.on .cb { background: var(--accent); border-color: var(--accent); color: #fff; }
.fmrow b { margin-left: auto; color: var(--sub); font-weight: 700; }

/* The kanban board must be visibly side-scrollable — the global scrollbar
   hide would otherwise leave wide boards clipped with no affordance.
   NOTE: no scrollbar-width/scrollbar-color here; setting either makes
   Chromium ignore the ::-webkit-scrollbar styling below entirely. */
.pipe-board { cursor: grab; }
.pipe-board.dragging { cursor: grabbing; user-select: none; }
.pipe-board::-webkit-scrollbar { height: 11px; width: 11px; }
.pipe-board::-webkit-scrollbar-thumb {
  background: var(--sub); border-radius: 99px;
  border: 2px solid var(--bg); background-clip: padding-box;
}
.pipe-board::-webkit-scrollbar-track { background: var(--chip); border-radius: 99px; }

/* Wide pipeline: the BOARD is the scroll container (hero pinned on top),
   so the horizontal scrollbar always sits at the bottom of the screen
   instead of below the tallest column. */
@media (min-width: 760px) {
  #view.pipe-full { display: flex; flex-direction: column; overflow: hidden; }
  #view.pipe-full .hero { flex: none; }
  #view.pipe-full #pipeGroups { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  #view.pipe-full .pipe-board { flex: 1 1 auto; min-height: 0; overflow: auto; }
}
.showmore {
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--accent); background: none; border: 1.5px dashed var(--line);
  border-radius: 10px; padding: 9px;
}
.showmore:hover { border-color: var(--accent); }
