/* Shared page helpers (app/static/js/ui.js): confirm box, notices, busy banner, autosave status, click to edit. */
.rbr-modal { position: fixed; inset: 0; background: rgba(0, 43, 84, .35); display: flex; align-items: center;
  justify-content: center; z-index: 1000; padding: 16px; }
.rbr-modal[hidden] { display: none; }
.rbr-modal-box { position: relative; background: #fff; border-radius: 14px; padding: 18px 20px; max-width: 460px;
  width: 100%; box-shadow: 0 10px 30px rgba(0, 43, 84, .25); color: var(--navy); }
.rbr-modal-box p { margin: 0 34px 14px 0; font-weight: 600; }
/* D-139: one close and one button order for every pop-up. */
.x-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; padding: 0;
  border: 1px solid var(--gray); background: #fff; color: var(--navy); font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1;
  cursor: pointer; z-index: 2; }
.x-close:hover { background: var(--blue-t); }
.x-close:focus-visible, .btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
dialog { position: relative; }
dialog::backdrop { background: rgba(0, 43, 84, .35); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
#rbr-notify { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1001; display: flex;
  flex-direction: column; gap: 6px; max-width: 560px; width: calc(100% - 32px); }
#rbr-notify .notice { margin: 0; box-shadow: 0 4px 14px rgba(0, 43, 84, .15); }
#rbr-busy { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 999; background: var(--navy);
  color: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 14px; }
#rbr-busy[hidden] { display: none; }
.as-state { margin-left: 6px; color: var(--gray-txt); white-space: nowrap; }
.as-state.ok { color: var(--green); }
.as-state.busy { color: var(--gray-txt); }
.as-state.unsaved { color: var(--orange-dk); }
.as-state.err { color: var(--red); cursor: pointer; text-decoration: underline; }
.as-summary { margin-left: 12px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.as-summary.ok { color: var(--green); }
.as-summary.busy { color: var(--gray-txt); }
.as-summary.err { color: var(--red); }
.as-restore { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
textarea { overflow-y: hidden; resize: vertical; }
[data-click-edit] .ce-view { cursor: text; border-radius: 8px; padding: 2px 4px; margin: 0 -4px; }
[data-click-edit] .ce-view:hover { background: var(--blue-t); }
[data-click-edit] .ce-view .ce-empty { color: var(--gray-txt); font-style: italic; }
[hidden] { display: none !important; }
/* One item per box (APP_SPEC "UI and UX principles"). */
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-box { border: 1px solid var(--gray); border-radius: 10px; padding: 8px 12px; background: #fff; }
.item-box .row { gap: 8px; }
.chip { display: inline-block; background: var(--light); border: 1px solid var(--gray); border-radius: 999px;
  padding: 1px 10px; font-size: 12px; font-weight: 700; color: var(--navy); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dl-link { white-space: nowrap; text-decoration: none; font-weight: 700; }
textarea[rows] { min-height: 0; }
.proj-switch { gap: 12px; align-items: baseline; } .proj-switch h1 { margin: 0 0 6px; }
/* Careers summary (outline/_mix.html): one box per domain. */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.cs-dom { border: 1px solid var(--gray); border-radius: 12px; padding: 10px 12px; background: #fff; }
.cs-dom.empty { background: var(--light); }
.cs-h { font-weight: 800; color: var(--navy); margin-bottom: 4px; }

/* The floating "← Back to Missing items" button. */
.rbr-return { position: fixed; left: 20px; bottom: 20px; z-index: 900; background: var(--purple-dk); color: #fff; font-weight: 800;
  font-size: 14px; padding: 10px 18px; border-radius: 999px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.rbr-return:hover { background: var(--purple-dk2); color: #fff; }

/* The Back button sits at the top of the page content, the same place on every page (Jeff, 2026-11-08) */
.rbr-return.at-top { position: static; display: inline-flex; margin: 0 0 12px; box-shadow: none; }
/* D-139 item 9: the shared ↶ Undo control, the header Undo beside "Saved ✓", the backup Undo bar and the one
   version-list look (templates/_versions.html). */
.as-undo { margin-left: 8px; vertical-align: middle; padding: 2px 10px; font-size: 12px; }
.undo-bar { align-items: center; gap: 10px; }
.version-table .vl-current td { background: var(--green-t); }
.version-table .vl-form { display: inline; margin: 0; }
.version-table pre.hist { white-space: pre-wrap; margin: 0; max-height: 8em; overflow: auto; font: inherit; }
.as-done { margin-left: 6px; }

/* Type DELETE to confirm (D-143) */
.rbr-typed { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; font-weight: 600; }
.rbr-typed[hidden] { display: none; }
.rbr-typed input { width: 9em; text-transform: uppercase; letter-spacing: .08em; }
.rbr-yes:disabled { opacity: .45; cursor: not-allowed; }

/* The Back button's row on pages without a main area (documents): the top, under the toolbar (2026-11-08) */
.rbr-return-row { padding: 14px 32px 0; }
.rbr-return-row .rbr-return.at-top { margin: 0; }
@media print { .rbr-return-row { display: none; } }
