/* Where you are, at a glance, and less moving about (round 21, owner, 9 November 2026: "so with this rebuild make sure its nice
   simple and easy to see where you are and what step and navigating. nice layout not noisy and beautiful"; js/views/wayfind.js).
   The brand's tokens only (app.css: the navy and the mint, light and dark), so both themes come with them and every pair keeps
   the contrast app.css measures. test/browser/checks/99zc-wayfind-r21.mjs looks at each, wide and on a phone, light and dark. */

/* ---- the case's steps at a glance: a row of the ten under the case's header, joined to it as its foot */
.page-head.case-head:has(+ .cstep) { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: var(--line-2); box-shadow: none; }
.cstep { margin: 0 0 16px; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r) var(--r); box-shadow: var(--shadow-1); }
.cstep-list { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.cstep-li { position: relative; min-width: 0; }
/* The line between two steps: green up to the step the case is at, grey after it. */
.cstep-li + .cstep-li::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; border-radius: 2px; background: var(--line); }
.cstep-li[data-state="done"]::before, .cstep-li[data-state="now"]::before, .cstep-li[data-state="skipped"]::before { background: var(--good); }
.cstep-b { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 1px 4px 4px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); font: 600 12px/1.25 var(--f-body); text-align: center; cursor: pointer; }
.cstep-b:hover { background: var(--sunk); color: var(--ink); }
.cstep-n { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface); color: var(--muted); font: 700 12.5px/1 var(--f-body); }
.cstep-t { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cstep-b[data-state="done"] { color: var(--ink-2); }
.cstep-b[data-state="done"] .cstep-n { background: var(--good); border-color: var(--good); color: var(--surface); }
.cstep-b[data-state="now"] { color: var(--ink); font-weight: 700; }
.cstep-b[data-state="now"] .cstep-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.cstep-b[data-state="skipped"] .cstep-n { border-style: dashed; }
/* The phone's bar of the ten, with All steps (it opens them in a pop-up); hidden on a wider screen, where the row has room. */
.cstep-m { display: none; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 2px; border: 0; background: none; color: var(--ink-2); cursor: pointer;
  font: 600 13.5px/1.2 var(--f-body); border-radius: 10px; }
.cstep-bar { flex: 1 1 auto; display: flex; gap: 3px; min-width: 0; }
.cstep-bar i { flex: 1 1 0; height: 8px; border-radius: 4px; background: var(--line); }
.cstep-bar i[data-state="done"], .cstep-bar i[data-state="skipped"] { background: var(--good); }
.cstep-bar i[data-state="now"] { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cstep-m-t { flex: none; }
.cstep-m-chev { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; }
.cstep-m-chev svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .cstep { padding: 6px 12px 8px; }
  .cstep-list { display: none; }
  .cstep-m { display: flex; }
}

/* ---- "Step 4 of 10 · DIP" in the compact header that stays at the top as the case scrolls; it opens the steps */
.case-bar .cb-where { display: none; flex: 0 1 auto; min-width: 0; align-items: center; gap: 4px; padding: 3px 10px; border: 0; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-2); font: 600 13px/1.4 var(--f-body); white-space: nowrap; cursor: pointer; }
.case-bar .cb-where > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.case-bar .cb-where svg { flex: none; width: 14px; height: 14px; }
.case-bar.stuck .cb-where { display: inline-flex; }
@media (max-width: 760px) {
  .case-bar.stuck .cb-name { display: none; }
  .case-bar.stuck .cb-id { gap: 6px; }
}

/* ---- the case's steps in a pop-up (the phone's All steps, and the compact header's "Step 4 of 10 · DIP") */
.dialog.popup.popup-narrow { width: min(560px, 100%); }
.steps-sheet .popup-b { background: var(--surface); padding-top: 10px; }
.ss-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 7px 12px; border: 1px solid transparent; border-radius: 10px;
  background: none; color: var(--muted); text-align: left; cursor: pointer; font: inherit; }
.ss-item:hover { background: var(--sunk); color: var(--ink); }
.ss-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  color: var(--muted); font: 700 12px/1 var(--f-body); }
.ss-n svg { width: 15px; height: 15px; }
.ss-also .ss-n { border: 0; background: var(--sunk); color: var(--ink-2); }
.ss-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ss-t { font-weight: 600; overflow-wrap: anywhere; }
.ss-sub { font-size: 12.5px; color: var(--muted); }
.ss-count { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ss-count.warn { background: var(--warn-soft); color: var(--warn); }
.ss-item[data-state="done"], .ss-item[data-state="now"] { color: var(--ink); }
.ss-item[data-state="done"] .ss-n { background: var(--good); border-color: var(--good); color: var(--surface); }
.ss-item[data-state="now"] { background: var(--accent-soft); border-color: var(--accent); }
.ss-item[data-state="now"] .ss-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ss-item[data-state="now"] .ss-sub { color: var(--accent-2); }
.ss-item[data-state="skipped"] .ss-n { border-style: dashed; }
.ss-item[data-shown="1"]:not([data-state="now"]) { box-shadow: inset 4px 0 0 var(--accent); }
.ss-gh { margin: 16px 12px 6px; font: 700 11.5px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

/* ---- a page in the pop-up: its own title is the pop-up's, so its heading, breadcrumb and way back aren't shown again */
.popup-page .page-head .crumbs, .popup-page .page-head h1, .popup-page .page-head > div > .sub, .popup-page .fd-back { display: none; }
.popup-page .page-head { margin-bottom: 12px; }
.popup-page .page-head > div:first-child:empty { display: none; }
/* Printed from the pop-up (the fact-find's Print): the page in it alone, as on its own page. */
@media print {
  body:has(.popup-page) > :not(.popup-scrim) { display: none !important; }
  .scrim.popup-scrim:has(.popup-page) { position: static; display: block; padding: 0; background: none; }
  .dialog.popup.popup-page { width: auto; height: auto; max-height: none; overflow: visible; box-shadow: none; border-radius: 0; }
  .popup-page .popup-h, .popup-page .popup-f, .popup-page .fd-bar { display: none !important; }
  .popup-page .popup-b { overflow: visible; padding: 0; background: none; }
}

/* ---- a record's breadcrumb back to its list ("Clients › Alex Example"), where its kind's eyebrow was */
.rec-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; }
.rec-crumbs .sep { color: var(--muted); flex: none; }
.rec-crumbs .rec-here { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13.5px; }
.page-head .crumbs .sep { margin: 0 2px; }

/* ---- a finger's 44×44 for each (app.css "Touch screens") */
@media (pointer: coarse) {
  .case-bar .cb-where { min-height: 44px; }
  .cstep-b { min-width: 44px; }
}
