/* Round 12 (owner, 26 October 2026): the back button in the top bar (js/back.js), and the small box that asks for what a step
   needs before a case moves on (js/views/stepneeds.js). Every colour is a token (css/app.css :root), so light and dark both
   follow; on a phone the arrow is 44px to press and stands alone (its words are its label), the box fits the screen, its
   controls are 44px and its boxes 16px. */

/* The back button */
.back-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 260px; min-height: 36px; padding: 6px 12px 6px 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 13.5px/1.2 var(--f-body);
  text-decoration: none; white-space: nowrap; }
.back-btn[hidden] { display: none; }
.back-btn svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.back-btn .back-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.back-btn:hover { background: var(--sunk); color: var(--ink); border-color: var(--accent); }
.back-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 900px) {
  .back-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; justify-content: center; }
  .back-btn .back-l { display: none; }
  .back-btn svg { width: 20px; height: 20px; }
  /* The search box opened across the bar covers it, as it covers the rest of the bar. */
}
@media (pointer: coarse) { .back-btn { min-width: 44px; min-height: 44px; } }

/* The small box: what the move needs, under each step's name */
.sn-box { display: grid; gap: 12px; }
.sn-lead { margin: 0; color: var(--ink-2); }
.sn-app { margin: -6px 0 0; }
.sn-step { margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); min-width: 0; }
.sn-step-h { padding: 0 6px; font: 700 13px var(--f-display); color: var(--ink); }
.sn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 12px; }
.sn-field { min-width: 0; }
.sn-field input, .sn-field select { background: var(--surface); }
.sn-none { margin: 0; color: var(--ink-2); }
/* The valuer's rent, or "Not given by the lender" under it (round 13) */
.sn-none-tick, .vd-none-tick { gap: 8px; margin-top: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.sn-field .sn-none-tick input, .field .vd-none-tick input { width: auto; min-height: 0; margin: 0; }
.sn-field input:disabled, .val-dialog input:disabled { opacity: .55; }
@media (pointer: coarse) { .sn-none-tick, .vd-none-tick { min-height: 44px; } }
.sn-msg { margin: 0; }
@media (max-width: 640px) { .sn-grid { grid-template-columns: 1fr; } }
@media (pointer: coarse) { .sn-field input, .sn-field select { min-height: 44px; } }

/* Round 21 (owner, 9 November 2026: "it can show but should be able to dismiss a warning and i think it should be every warning be
   able to dismiss"): a record's warnings, one quiet line each with a small × (js/views/warnings.js), "2 dismissed · Show" under
   them, and the message's own button (Undo, Move the case on). One quiet box, a coloured dot for each line (amber, or red for one
   that matters more), the words in ink: not a stack of coloured bars. Tokens only, so light and dark both follow; × is 30px (44px to
   a finger) and the lines wrap on a phone. */
.warn-strip { margin: 0 0 14px; padding: 4px 4px 4px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-1); }
.warn-strip:has(.warn-item.bad) { border-left-color: var(--bad); }
.warn-strip:not(:has(.warn-list)) { border-left-color: var(--line); }
.warn-list, .warn-gone { list-style: none; margin: 0; padding: 0; }
.warn-item { display: flex; align-items: center; gap: 10px; padding: 3px 0; color: var(--ink); font-size: 13.5px; line-height: 1.4; }
.warn-item + .warn-item { border-top: 1px solid var(--line-2); }
.warn-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.warn-item.bad .warn-dot { background: var(--bad); }
.warn-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
button.warn-go { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.warn-go:hover { text-decoration: underline; text-underline-offset: 3px; }
.warn-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: 500 18px/1 var(--f-body); cursor: pointer; display: inline-grid; place-items: center; }
.warn-x:hover { background: var(--sunk); color: var(--ink); }
.warn-x:focus-visible, button.warn-go:focus-visible, .warn-show:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.warn-foot { margin: 2px 0; padding: 3px 0; }
.warn-list + .warn-foot { border-top: 1px solid var(--line-2); }
.warn-show { padding: 0; border: 0; background: none; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.warn-gone { margin: 0 4px 6px 0; display: grid; gap: 4px; }
.warn-gone li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 5px 10px; border-radius: 8px; background: var(--sunk);
  color: var(--ink-2); font-size: 13px; }
.toast-act { margin-left: 8px; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit;
  font: 700 13px var(--f-body); cursor: pointer; }
/* 44px to a finger, and on a phone's width (where the phone sweep, test/browser/checks/23-phone-sweep.mjs, measures every control). */
@media (pointer: coarse), (max-width: 640px) {
  .warn-x { width: 44px; height: 44px; }
  button.warn-go, .warn-show { min-height: 44px; }
  .warn-gone [data-warn-restore], .toast-act { min-height: 44px; }
}
