/* The transition tracker.  Colours are the Select Tech document palette used across
   project 54 (docs/src/*.html), so the screen and the printed plans look like one family. */
:root {
  --blue: #1565C0; --blue-dark: #0D47A1; --blue-pale: #E8F0FB;
  --ink: #1b1b1b; --muted: #5f6b7a; --rule: #c9d3e0; --bg: #f5f7fa; --card: #fff;
  --red: #B3261E; --red-pale: #FBECEA; --green: #1B7F3B; --green-pale: #E7F4EB;
  --amber: #A15C00; --amber-pale: #FFF3E0; --grey: #9aa5b1; --purple: #5B3E96; --purple-pale: #EFEAF7;
  --teal: #00695C; --teal-pale: #E0F2F1;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); }
button { font: inherit; cursor: pointer; }
select, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.hint { color: var(--muted); font-size: 13px; }
.err { color: var(--red); font-size: 14px; }
.err:empty { display: none; }
.ok { color: var(--green); }
.link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.link.strong { font-weight: 600; }
.primary { background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; font-weight: 600; }
.primary:hover { background: var(--blue-dark); }
.primary:disabled { opacity: .6; cursor: default; }
.grow { flex: 1; }

/* top bar */
.bar { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--card);
  border-bottom: 3px solid var(--blue); position: sticky; top: 0; z-index: 5; }
.logo { height: 38px; width: auto; }
.title .t1 { font-weight: 700; font-size: 17px; }
.title .t2 { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; margin-left: 12px; }
.tabs button { border: 1px solid var(--rule); background: var(--card); padding: 6px 16px; border-radius: 6px; color: var(--muted); }
.tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.who { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.print-head { display: none; }
.print-only { display: none !important; }

/* sign-in gate */
.gate { max-width: 520px; margin: 12vh auto; background: var(--card); border: 1px solid var(--rule);
  border-radius: 10px; padding: 28px 32px; }
.gate h1 { margin: 0 0 10px; font-size: 22px; }

/* the split: list left, step right */
.split { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; height: calc(100vh - 62px); }
.list { overflow-y: auto; border-right: 1px solid var(--rule); background: var(--card); padding-bottom: 40px; }
.detail { overflow-y: auto; padding: 22px 34px 60px; }
.pathbar { padding: 10px 16px; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.pathbar select { padding: 4px 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); }

ol.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.row { display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 10px; align-items: center; width: 100%;
  text-align: left; background: none; border: 0; padding: 9px 16px; color: inherit; }
.row:hover { background: var(--blue-pale); }
.row .meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.row .badge { grid-column: 3; grid-row: 1 / span 2; }
.phase-row { border-top: 1px solid var(--rule); background: #f9fbfd; }
.phase-row .row { padding-top: 12px; padding-bottom: 12px; }
.phase-row .name { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; }
.phase-row .count { font-size: 12px; color: var(--muted); }
.phase-row .row { grid-template-columns: 18px 1fr auto auto; }
.step-row .row { padding-left: 26px; position: relative; }
.step-row .row::before { content: ""; position: absolute; left: 24px; top: 0; bottom: 0; border-left: 2px solid var(--rule); }
.step-row .dot { position: relative; z-index: 1; margin-left: -9px; }
.step-row .name { font-size: 14.5px; }
li.sel > .row { background: var(--blue-pale); box-shadow: inset 4px 0 0 var(--blue); }
li.current > .row .name { font-weight: 700; }
li.current > .row { box-shadow: inset 4px 0 0 var(--amber); }
li.current.sel > .row { box-shadow: inset 4px 0 0 var(--blue); }
li.off > .row { opacity: .45; }
.now { display: inline-block; margin-left: 8px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; vertical-align: 1px; letter-spacing: .03em; }
.pstate { display: none; }
.owner { padding: 0 6px; border-radius: 4px; background: #eef1f5; }
.o-selecttech { background: var(--blue-pale); color: var(--blue-dark); }
.o-customer { background: var(--green-pale); color: var(--green); }
.o-provider { background: var(--purple-pale); color: var(--purple); }
.path { padding: 0 6px; border-radius: 4px; border: 1px solid var(--rule); font-size: 12px; }
.badge { font-size: 12px; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 10px; background: #eef1f5; color: var(--muted); }
.badge.open { background: var(--red-pale); color: var(--red); font-weight: 600; }

.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid var(--grey); background: var(--card); flex: none; }
.dot.in_progress { border-color: var(--blue); background: linear-gradient(90deg, var(--blue) 50%, var(--card) 50%); }
.dot.waiting { border-color: var(--amber); background: var(--amber-pale); }
.dot.done { border-color: var(--green); background: var(--green); }
.dot.blocked { border-color: var(--red); background: var(--red); }

/* one step */
.idle { color: var(--muted); max-width: 560px; margin-top: 30px; }
.step-detail { max-width: 820px; }
.crumb { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.step-detail h2 { margin: 2px 0 10px; font-size: 24px; }
.step-detail h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--blue-dark); margin: 24px 0 8px; }
.metaline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.sep { color: var(--rule); }
.metaedit { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.metaedit label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; }
.metaedit select, .metaedit input { padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); min-width: 150px; }
.what { font-size: 16px; margin: 0; max-width: 70ch; }
ul.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ul.issues li { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--blue); border-radius: 6px; padding: 10px 14px; }
ul.issues li.internal { border-left-color: var(--amber); background: #fffaf2; }
ul.issues p { margin: 0 0 6px; }
.src { font-size: 12px; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.share { border: 1px solid var(--amber); color: var(--amber); background: var(--card); border-radius: 12px; padding: 1px 10px; font-size: 12px; }
.share.on { border-color: var(--green); color: var(--green); }
ul.kids { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.kids li { padding-left: 24px; text-indent: -24px; }
ul.kids li .dot { vertical-align: -2px; margin-right: 8px; text-indent: 0; }
ul.kids li.off { opacity: .45; }
ul.kids .pstate { display: inline; color: var(--muted); font-size: 13px; }

.loghead { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.loghead h3 { margin: 0; }
.composer { background: var(--card); border: 2px solid var(--blue); border-radius: 8px; padding: 12px; margin: 12px 0; display: grid; gap: 10px; }
.composer textarea { width: 100%; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; resize: vertical; min-height: 70px; }
.row2 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hidden-file { display: none; }
.internal-box { font-size: 13px; color: var(--amber); display: flex; align-items: center; gap: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--rule); background: var(--card); border-radius: 14px; padding: 3px 12px; font-size: 13px; color: var(--muted); }
.chip.on { color: #fff; border-color: transparent; background: var(--blue); font-weight: 600; }
.chip.c-issue.on { background: var(--red); }
.chip.c-question.on { background: var(--amber); }
.chip.c-decision.on { background: var(--purple); }
.chip.c-meeting.on { background: var(--teal); }
.chip.c-document.on { background: #37474F; }
.autobox { font-size: 13px; color: var(--muted); margin-left: 8px; display: flex; align-items: center; gap: 4px; }

ol.notes { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.note { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 13px; }
.note.resolved { opacity: .7; }
.note.internal { border-left: 4px solid var(--amber); }
.note.auto { background: transparent; border-style: dashed; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.note.auto .nbody { margin: 2px 0 0; }
.nhead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.cat { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 1px 8px; border-radius: 4px; background: var(--blue-pale); color: var(--blue-dark); }
.c-issue.cat { background: var(--red-pale); color: var(--red); }
.c-question.cat { background: var(--amber-pale); color: var(--amber); }
.c-decision.cat { background: var(--purple-pale); color: var(--purple); }
.c-meeting.cat { background: var(--teal-pale); color: var(--teal); }
.c-document.cat { background: #ECEFF1; color: #37474F; }
.c-auto.cat { background: #eef1f5; color: var(--muted); }
.tag-int { font-size: 11px; color: var(--amber); font-weight: 600; }
.by { font-weight: 600; }
.at { color: var(--muted); }
.stepname { font-size: 13px; }
.nbody { margin: 6px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.file { display: inline-block; margin: 2px 0 4px; font-size: 14px; }
.nact { display: flex; gap: 14px; align-items: center; margin-top: 4px; font-size: 13px; }
.nact .link { white-space: nowrap; }
.nact select { max-width: 240px; font-size: 13px; padding: 2px 4px; border: 1px solid var(--rule); border-radius: 5px; background: var(--card); color: var(--muted); }

/* Everything */
.all { max-width: 980px; margin: 0 auto; padding: 22px 24px 60px; }
.all h2 { font-size: 18px; margin: 18px 0 10px; }
.openbox { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--red); border-radius: 8px; padding: 4px 18px 16px; }
.filter { margin-bottom: 6px; }

/* People */
dialog { border: 1px solid var(--rule); border-radius: 10px; padding: 18px 22px; width: min(720px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(20, 30, 45, .35); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
table.ppl { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.ppl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--rule); padding: 4px 6px; }
.ppl td { padding: 6px; border-bottom: 1px solid #eef1f5; }
.ppl tr.off td { color: var(--grey); }
.ppl .right { text-align: right; }
.ppl .right .link { margin-left: 12px; white-space: nowrap; }
.ppl td.seen { white-space: nowrap; font-size: 13px; color: var(--muted); }
.ppl-add { display: flex; gap: 8px; flex-wrap: wrap; }
.ppl-add input, .ppl-add select { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; }
.ppl-add input { flex: 1; min-width: 200px; }
.linkbox { margin-top: 14px; background: var(--green-pale); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
.linkbox input { width: 100%; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.linkbox .primary { justify-self: start; }

/* narrow screens: one column, the step opens under its own line */
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; gap: 8px 14px; padding: 8px 16px; }
  .logo { height: 30px; }
  .tabs { margin-left: 0; order: 3; }
  .who { order: 2; gap: 10px; font-size: 13px; }
  .single .list { border-right: 0; }
  .inplace { padding: 14px 16px 18px; background: var(--bg); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .step-detail h2 { font-size: 20px; }
  .all { padding: 14px 16px 40px; }
  .ppl th:nth-child(3), .ppl td.seen { display: none; }   /* Last seen: no room on a phone */
  dialog { padding: 14px 14px; }
}

/* paper: letter, Select Tech header, no buttons */
@page { size: letter; margin: 0.55in 0.6in; }
@media print {
  body { background: #fff; font-size: 11pt; }
  .bar, .pathbar, .loghead button, .composer, .nact, .share, .chips, .autobox, dialog, .idle { display: none !important; }
  .metaedit { display: none !important; }
  .print-only { display: flex !important; }
  .list { padding-bottom: 0; }
  .print-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--blue); padding-bottom: 8px; margin-bottom: 12px; }
  .print-head img { height: 40px; }
  .split { display: block; height: auto; }
  .list, .detail { overflow: visible; border: 0; padding: 0; }
  .detail { break-before: page; }
  .detail.none { display: none; }
  .row { padding: 4px 0; break-inside: avoid; }
  .step-row .row { padding-left: 18px; }
  .step-row .row::before { left: 16px; }
  .row .pstate { display: inline; font-weight: 600; color: var(--ink); }
  li.sel > .row, li.current > .row { box-shadow: none; background: none; }
  .note, ul.issues li { break-inside: avoid; }
  .all { padding: 0; max-width: none; }
  a.file { color: var(--ink); text-decoration: none; }
}

.inplace { scroll-margin-top: 140px; }

/* the PIN step */
.pinform { display: flex; gap: 10px; margin: 14px 0 6px; }
.pin { font-size: 22px; letter-spacing: .25em; width: 9.5ch; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px; text-align: center; }
.pinbox { font-size: 15px; }
.pinbox b { font-size: 20px; letter-spacing: .15em; font-family: ui-monospace, Menlo, monospace; }
