/* Problems, changes and knowledge articles as pages of their own (GitHub issue 203, Phase 1e, build S2;
   docs/adr/0082; the owner's AJ2). public/js/app/record-pages.js builds the frame they share, and problem-page.js,
   change-page.js and article-page.js lay each one out: the breadcrumb row, one row at the top with the number, the
   title, the state and the actions that stays in view as a slim bar, the record's work in the main column and its facts
   at the side. Also Create change's risk questions as rows of answers, the lists' leftovers from the review, the
   knowledge base's list and its editor's header. Sizes are tokens (tokens.css); colors are the palette's (styles.css). */

/* ---------- A page in place of the dialogs ---------- */
/* What the dialogs showed is on the page: the dialog only holds which record is open. */
.modal-backdrop.rp-moved, .modal-backdrop.rp-moved.open { display:none !important; }
/* The page scrolls with the window, so the top bar, the outage banner and the record's bar can stay in view. */
body.rp-open .main-content { overflow-x:clip; overflow-y:visible; }
.record-page { --rp-width:82.5rem; }
.record-page > * { max-width:var(--rp-width); margin-left:auto; margin-right:auto; }
.record-page * { scroll-margin-top:calc(var(--topbar-height) + var(--outage-banner-h, 0px) + var(--rp-bar-h, 0px) + var(--space-150)); }
.record-page [hidden] { display:none !important; }

/* ---------- The top: the breadcrumb row, the bar, the dates ---------- */
.rp-nav-row { display:flex; align-items:center; gap:var(--space-150); min-height:var(--control-height-sm); margin-bottom:var(--space-100); }
.rp-nav-row > .page-breadcrumb { min-width:0; margin:0; }
.rp-header {
  position:sticky; top:calc(var(--topbar-height) + var(--outage-banner-h, 0px)); z-index:var(--z-page);
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100) var(--space-300);
  padding:var(--space-100) 0; border-bottom:1px solid transparent; background:var(--paper);
}
.rp-title-column { flex:1 1 24rem; min-width:0; }
/* The number, the title and the chips read as one line of text that wraps like a sentence. */
.rp-title-line { display:inline; margin:0 var(--space-100) 0 0; color:var(--ink); font-size:var(--text-3xl); font-weight:var(--weight-bold); letter-spacing:-.01em; line-height:var(--leading-tight); }
/* The keyboard's place goes to the title when a record opens; it is no control, so no ring, as the ticket page and the
   portal's article have it (opened from a link or a reload, a ring framed the title as if it were selected). */
.rp-title-line:focus, .rp-title-line:focus-visible { outline:none; }
.rp-number { margin-right:var(--space-50); color:var(--muted); font-size:var(--text-lg); font-weight:var(--weight-semibold); font-variant-numeric:tabular-nums; white-space:nowrap; }
.rp-chips { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); vertical-align:text-bottom; }
.rp-state { display:inline-flex; align-items:center; gap:var(--space-75); padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface); color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); line-height:var(--leading-normal); white-space:nowrap; }
.rp-state > i { flex:none; width:.5rem; height:.5rem; border-radius:var(--radius-round); background:var(--state-open); }
.rp-state.is-watch > i { background:var(--state-pending); }
.rp-state.is-off > i { background:var(--state-done); }
.rp-state.is-done { border-color:color-mix(in srgb, var(--good) 35%, var(--line)); background:var(--good-soft); color:var(--good); }
.rp-state.is-done > i { background:var(--good); }
.rp-flag { display:inline-flex; align-items:center; padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); line-height:var(--leading-normal); white-space:nowrap; }
.rp-flag.is-outage { border-color:color-mix(in srgb, var(--bad) 40%, var(--line)); background:var(--bad-soft); color:var(--bad); }
.rp-chips .pill { font-size:var(--text-sm); }
.rp-chips .change-state-chip { padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface); }
.rp-rename { display:inline-flex; min-height:0; margin-left:var(--space-75); padding:var(--space-25) var(--space-75); border:0; border-radius:var(--radius-sm); background:none; color:var(--spruce); font-size:var(--text-sm); font-weight:var(--weight-semibold); letter-spacing:0; vertical-align:middle; cursor:pointer; box-shadow:none; }
.rp-rename:hover { text-decoration:underline; text-underline-offset:var(--space-25); }
.rp-title-line.is-renaming .rp-title, .rp-title-line.is-renaming .rp-rename { display:none; }
.rp-title-input { display:block; width:100%; margin:var(--space-50) 0; font-size:var(--text-2xl) !important; font-weight:var(--weight-semibold); }
.rp-actions { display:flex; flex:0 0 auto; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:var(--space-100); }
.rp-own-actions { display:contents; }
.rp-more { position:relative; }
.rp-more-button { min-width:var(--control-height); font-size:var(--text-lg); letter-spacing:.08em; }
.rp-more-menu { position:absolute; top:calc(100% + var(--space-50)); right:0; z-index:var(--z-menu); display:grid; min-width:12rem; padding:var(--space-75); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); box-shadow:0 12px 25px rgba(39,51,47,.16); }
.rp-more-menu > * { display:block; width:100%; min-height:0; padding:var(--space-100) var(--space-150); border:0; border-radius:var(--radius-md); background:none; color:var(--ink-2); font:var(--weight-medium) var(--text-md)/var(--leading-tight) var(--font-ui); text-align:left; cursor:pointer; box-shadow:none; }
.rp-more-menu > *:hover, .rp-more-menu > *:focus-visible { background:var(--hover-bg); color:var(--ink); }
.rp-save-status { flex-basis:100%; display:inline-flex; align-items:center; justify-content:flex-end; gap:var(--space-75); color:var(--muted); font-size:var(--text-sm); }
.rp-save-status::before { content:""; width:.5rem; height:.5rem; border-radius:var(--radius-round); background:var(--good); }
.rp-save-status[data-state="saving"]::before { background:var(--state-pending); }
.rp-save-status[data-state="error"] { color:var(--bad); font-weight:var(--weight-semibold); }
.rp-save-status[data-state="error"]::before { background:var(--bad); }
.rp-dates { margin:var(--space-50) auto var(--space-250); color:var(--ink-2); font-size:var(--text-sm); }
.rp-dates:empty { display:none; }
.rp-notices:empty { display:none; }
.rp-notices { margin-bottom:var(--space-200); }
.rp-sentinel { height:1px; margin-bottom:-1px; }

/* Once the row above has scrolled away, the bar slims down to the number, the title, the state and the actions. */
.rp-header.is-stuck { flex-wrap:nowrap; padding:var(--space-75) 0; border-bottom-color:var(--line); }
.rp-header.is-stuck .rp-title-column { display:flex; flex:1 1 auto; align-items:center; gap:var(--space-100); min-width:0; }
.rp-header.is-stuck .rp-title-line { display:flex; flex:0 1 auto; align-items:baseline; gap:var(--space-75); min-width:0; margin:0; font-size:var(--text-lg); }
.rp-header.is-stuck .rp-title { overflow:hidden; overflow-wrap:break-word; white-space:normal; }
.rp-header.is-stuck .rp-number { margin:0; font-size:var(--text-md); }
.rp-header.is-stuck :is(.rp-rename, .rp-save-status, .rp-title-input) { display:none !important; }
.rp-header.is-stuck .rp-chips { flex-wrap:nowrap; }
.rp-header.is-stuck .rp-chips > :not(:first-child) { display:none; }
.rp-header.is-stuck .rp-actions { flex-wrap:nowrap; }

/* ---------- Two columns: the work, and the facts ---------- */
.rp-body { display:grid; grid-template-columns:minmax(0, 1fr) 20rem; gap:var(--space-300); align-items:start; }
.rp-main, .rp-side { display:grid; gap:var(--space-200); min-width:0; }
.rp-side { position:sticky; top:calc(var(--topbar-height) + var(--outage-banner-h, 0px) + var(--rp-bar-h, 0px) + var(--space-200)); }
.rp-card { min-width:0; padding:var(--space-250); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); }
.rp-card[hidden] { display:none; }
.rp-card-title { margin:0 0 var(--space-150); color:var(--ink); font-size:var(--text-lg); font-weight:var(--weight-semibold); letter-spacing:0; line-height:var(--leading-tight); text-transform:none; }
.rp-hint { margin:var(--space-75) 0 0; color:var(--muted); font-size:var(--text-sm); }
.rp-empty { margin:0; color:var(--muted); font-size:var(--text-md); }
/* Fields in a card: the label over the field, one height, the field the card's width. */
.rp-card > label:not(.ai-switch, .wf-check) { display:block; margin:0 0 var(--space-200); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.rp-card > label:not(.ai-switch, .wf-check):last-child { margin-bottom:0; }
.rp-card > label:not(.ai-switch, .wf-check) :is(input, select, textarea), .rp-card > label:not(.ai-switch, .wf-check) .custom-select-wrapper { display:block; width:100%; margin-top:var(--space-75); }
.rp-card > label:not(.ai-switch, .wf-check) :is(input, textarea) { box-sizing:border-box; padding:var(--space-100) var(--space-150); border:var(--control-border-width) solid var(--control-border); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font:var(--weight-regular) var(--text-md)/var(--leading-normal) var(--font-ui); }
.rp-card > label:not(.ai-switch, .wf-check) input { min-height:var(--control-height); }
.rp-card > label:not(.ai-switch, .wf-check) textarea { min-height:6rem; resize:vertical; }
.rp-card > label:not(.ai-switch, .wf-check) :is(input, textarea):disabled { background:var(--surface-2); color:var(--ink-2); }
.rp-card .field-invalid { border-color:var(--bad) !important; }
.rp-card .nt-error { margin:var(--space-50) 0 0; }
.rp-facts { display:grid; gap:0; margin:0; }
.rp-facts > div { display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-150); padding:var(--space-75) 0; border-bottom:1px solid var(--line); }
.rp-facts > div:last-child { border-bottom:0; }
.rp-facts dt { flex:none; color:var(--muted); font-size:var(--text-sm); }
.rp-facts dd { min-width:0; margin:0; color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-medium); text-align:right; overflow-wrap:anywhere; }

/* ---------- A record that isn't here ---------- */
.record-page.is-missing > :not(.rp-nav-row, .rp-missing) { display:none !important; }
.rp-missing { max-width:40rem; margin:var(--space-500) auto; }

/* ---------- A problem ---------- */
.pp-linked .problem-incidents { margin:0; padding:0; border:0; background:none; }
.pp-linked .problem-incidents + .problem-incidents, .pp-linked .devops-links:not([hidden]) { margin-top:var(--space-250); padding-top:var(--space-200); border-top:1px solid var(--line); }
.pp-linked .problem-incidents-head { display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-150); margin-bottom:var(--space-100); }
.pp-linked .problem-incidents-head b, .pp-cis .ci-links h3, .pp-cause .pd-depth h3, .pp-linked .devops-links h3 { margin:0; color:var(--ink); font-size:var(--text-lg); font-weight:var(--weight-semibold); letter-spacing:0; text-transform:none; }
.pp-linked .problem-incidents-head span { color:var(--muted); font-size:var(--text-sm); }
.pp-cause .pd-depth { margin-top:var(--space-250); padding:var(--space-200) 0 0; border:0; border-top:1px solid var(--line); background:none; }
.pp-cause .pd-depth h3 { margin:var(--space-200) 0 var(--space-100); }
.pp-cause .pd-depth h3:first-child { margin-top:0; }
.pp-cis .problem-ci-links { margin:0; padding:0; border:0; background:none; }
.pp-cis .ci-links h3 { margin-bottom:var(--space-100); }
/* The outage card: each switch beside its words, the words at their size, and what the form recorded as facts. */
.pp-outage .pf-detail { margin:0; padding:0; border:0; background:none; }
.pp-outage #pdMeta { display:none; }
.pp-outage .pf-check { display:flex; align-items:flex-start; gap:var(--space-100); margin:0 0 var(--space-150); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-regular); }
.pp-outage .pf-check input { flex:none; width:1rem; height:1rem; margin:var(--space-25) 0 0; accent-color:var(--spruce); }
.pp-outage .pf-check b { display:block; margin-bottom:var(--space-25); color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); }
.pp-outage textarea { box-sizing:border-box; width:100%; margin:0 0 var(--space-150); padding:var(--space-100) var(--space-150); border:var(--control-border-width) solid var(--control-border); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font:var(--weight-regular) var(--text-md)/var(--leading-normal) var(--font-ui); }
.pp-outage .rp-facts { margin-top:var(--space-50); }
.pp-timeline .problem-updates { margin:0; padding:0; border:0; }
.pp-timeline .problem-update-composer { display:flex; gap:var(--space-100); align-items:flex-start; }
.pp-timeline .problem-update-composer textarea { flex:1 1 auto; min-width:0; }
.pp-timeline .problem-updates > .wf-hint { margin:var(--space-75) 0 var(--space-200); }
.rp-timeline { display:grid; gap:var(--space-150); margin:0; padding:0; list-style:none; }
.rp-timeline-item { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:var(--space-100); align-items:start; }
.rp-timeline-item .avatar { width:1.75rem; height:1.75rem; font-size:var(--text-2xs); }
/* A moment the problem records (opened, marked a known error) has a quiet mark: its letters in the muted color, over
   styles.css's dark saffron (#6b4e0e !important, for a saffron mark's own light fill), which on the dark theme's
   surface read at 1.91:1. */
.rp-timeline-item.is-event .avatar { background:var(--surface-2); color:var(--muted) !important; }
.rp-timeline-head { margin:0; color:var(--ink-2); font-size:var(--text-md); }
.rp-timeline-head b { color:var(--ink); font-weight:var(--weight-semibold); }
.rp-timeline-head time { margin-left:var(--space-50); color:var(--muted); font-size:var(--text-xs); white-space:nowrap; }
.rp-timeline-text { margin:var(--space-25) 0 0; color:var(--ink); font-size:var(--text-md); white-space:pre-wrap; }
.rp-timeline-item.is-event .rp-timeline-head { color:var(--muted); }

/* ---------- A change ---------- */
.rp-change .change-detail-tabs { margin:0 0 var(--space-50); }
.rp-change .change-detail-tab-panel { padding-top:var(--space-200); }
.rp-change .change-review-grid { display:none; }
/* One heading style for every section of a change (the plans were in small capitals, the links in sentence case). */
.rp-change :is(.group-modal-section-label, .problem-incidents-head b, .ci-links h3, .pd-change h3, .change-detail-section h3, .devops-deployment h3) {
  display:block; margin:0 0 var(--space-100); color:var(--ink); font-size:var(--text-lg); font-weight:var(--weight-semibold); letter-spacing:0; line-height:var(--leading-tight); text-transform:none;
}
.rp-change .change-detail-section, .rp-change .change-problem-links, .rp-change .change-ci-links, .rp-change .pd-change > * { margin:0; padding:var(--space-200) 0; border:0; border-top:1px solid var(--line); border-radius:0; background:none; }
.rp-change #changeDetailTabDetails > :first-child { padding-top:0; border-top:0; }
.rp-change .change-detail-section p { margin:0; color:var(--ink); font-size:var(--text-md); line-height:var(--leading-normal); white-space:pre-line; }
.rp-change .problem-incidents-head { display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-150); }
.rp-change .problem-incidents-head span { color:var(--muted); font-size:var(--text-sm); }
.rp-change #changeDetailApprovalsSection.is-waiting { padding:var(--space-200); border:1px solid color-mix(in srgb, var(--saffron) 55%, var(--line)); border-radius:var(--radius-lg); background:color-mix(in srgb, var(--saffron-pale) 55%, var(--surface)); }
.rp-change .cp-why p { margin:0; color:var(--ink); font-size:var(--text-md); line-height:var(--leading-normal); white-space:pre-line; }
.rp-change .devops-deployment:not([hidden]) { padding:var(--space-250); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); }
/* Its facts at the side, as a compact list. */
.rp-change .change-detail-state-field { display:block; margin:0 0 var(--space-150); color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.rp-change .change-detail-state-field select, .rp-change .change-detail-state-field .custom-select-wrapper { display:block; width:100% !important; max-width:none; margin-top:var(--space-75); }
.rp-change .change-detail-meta { display:grid; grid-template-columns:1fr; gap:0; margin:0; }
.rp-change .change-detail-meta-item { display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-150); padding:var(--space-75) 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; box-shadow:none; }
.rp-change .change-detail-meta-item:last-child { border-bottom:0; }
.rp-change .change-detail-meta-item span { margin:0; color:var(--muted); font-size:var(--text-sm); font-weight:var(--weight-regular); letter-spacing:0; text-transform:none; white-space:nowrap; }
.rp-change .change-detail-meta-item strong { color:var(--ink); font:var(--weight-medium) var(--text-md)/var(--leading-tight) var(--font-ui); text-align:right; overflow-wrap:anywhere; }
[data-theme="dark"] .rp-change .change-detail-meta-item { background:none; border-color:var(--line); }
.rp-change .change-detail-notices { margin:0; }
.rp-change .rp-own-actions .approve-button, .rp-change .rp-own-actions .reject-button { min-height:var(--control-height); }

/* ---------- An article ---------- */
/* The article at a reading width; its summary at the body's size, the start of the article, not a caption. */
.ap-reader { max-width:72ch; padding:var(--space-300); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); }
.ap-summary { margin:0 0 var(--space-250); color:var(--ink-2); font-size:var(--text-lg); line-height:var(--leading-normal); }
.ap-languages { display:inline-flex; gap:var(--space-50); margin-bottom:var(--space-200); }
.ap-languages button { min-height:var(--control-height-sm); padding:var(--space-25) var(--space-150); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface); color:var(--ink-2); font-size:var(--text-sm); }
.ap-languages button[aria-pressed="true"] { border-color:var(--spruce); background:var(--spruce-pale); color:var(--spruce-dark); font-weight:var(--weight-semibold); }
.ap-files { margin-top:var(--space-300); padding-top:var(--space-200); border-top:1px solid var(--line); }
.ap-feedback-slot:not(:empty) { margin-top:var(--space-300); padding-top:var(--space-200); border-top:1px solid var(--line); }
.ap-feedback-slot .kb-reader-feedback[hidden] { display:none; }
/* What waits on the article, above it; its owner and dates are in the side column. */
.rp-article .rp-notices .kb-reader-lifecycle { padding:var(--space-200); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); }
.rp-article .rp-notices .kb-reader-lifecycle:empty { display:none; }
.rp-article .rp-notices .kb-reader-meta { display:none; }
.rp-article .rp-notices .kb-reader-note { margin:0 0 var(--space-100); }

/* ---------- Narrower screens and phones ---------- */
@media (max-width:900px) {
  .rp-body { grid-template-columns:minmax(0, 1fr); }
  .rp-side { position:static; }
  .rp-title-column { flex-basis:100%; }
  .rp-actions { justify-content:flex-start; }
  .rp-header.is-stuck .rp-title-column { flex:1 1 auto; }
  .rp-save-status { justify-content:flex-start; }
}
@media (max-width:700px) {
  .rp-title-line { font-size:var(--text-2xl); }
  .rp-header { gap:var(--space-100); }
  .rp-actions { width:100%; }
  .rp-header.is-stuck .rp-actions { width:auto; }
  .rp-header.is-stuck .rp-actions :is(.outline-button, .save-button, .approve-button, .reject-button):not(.rp-more-button) { display:none; }
  .rp-header.is-stuck .rp-state { padding:0; border:0; background:none; }
  .rp-header.is-stuck .rp-state > span { display:none; }
  .rp-card { padding:var(--space-200); }
  .ap-reader { padding:var(--space-200); }
  .pp-timeline .problem-update-composer { flex-direction:column; align-items:stretch; }
  .rp-dates { margin-bottom:var(--space-200); }
}

/* ---------- Create change: the risk questions as rows of answers ---------- */
.ce-risk-question { min-width:0; margin:0 0 var(--space-250); padding:0; border:0; }
.ce-risk-question:last-child { margin-bottom:0; }
.ce-risk-question legend { display:flex; align-items:baseline; gap:var(--space-100); margin:0 0 var(--space-100); padding:0; color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); }
.ce-risk-number { flex:none; display:inline-grid; place-items:center; width:1.4rem; height:1.4rem; border-radius:var(--radius-round); background:var(--surface-2); color:var(--ink-2); font-size:var(--text-xs); font-weight:var(--weight-semibold); }
.ce-risk-answers { display:flex; flex-wrap:wrap; gap:var(--space-100); }
.ce-risk-answer { position:relative; display:inline-flex; align-items:center; gap:var(--space-100); min-height:var(--control-height); padding:var(--space-75) var(--space-150); border:var(--control-border-width) solid var(--control-border); border-radius:var(--radius-md); background:var(--surface); color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-regular); cursor:pointer; }
.ce-risk-answer:hover { border-color:var(--control-hover); }
.ce-risk-answer input { width:1rem; height:1rem; margin:0; accent-color:var(--spruce); }
.ce-risk-answer small { color:var(--muted); font-size:var(--text-xs); white-space:nowrap; }
.ce-risk-answer:has(input:checked) { border-color:var(--spruce); background:var(--spruce-pale); color:var(--spruce-dark); font-weight:var(--weight-semibold); }
.ce-risk-answer:has(input:focus-visible) { outline:2px solid var(--spruce); outline-offset:var(--space-25); }
.ce-risk-question.is-unanswered legend { color:var(--bad); }
.ce-risk-question.is-unanswered .ce-risk-answer { border-color:color-mix(in srgb, var(--bad) 55%, var(--control-border)); }
#ceRiskQuestions { display:block; }
/* No score until every question is answered: a dash in a quiet circle. */
.change-risk-meter.is-unscored .change-risk-score { background:var(--surface-2); color:var(--muted); }
/* The fields' borders are one in both themes. */
#changeNewPanel .change-field :is(input:not([type="checkbox"], [type="radio"]), textarea) { border-color:var(--control-border); }
.change-notice-box { margin:var(--space-200) 0 0; padding:0; border:0; background:none; color:var(--muted); font-size:var(--text-sm); }

/* ---------- Changes: the lists ---------- */
/* Closed and declined changes have the grey dot finished tickets have; an approved one still to run keeps its green. */
.change-state-chip.state-completed::before { background:var(--state-done); }
/* A change's title reads as the link it is, as a ticket's does. */
.change-list-open b { color:var(--spruce); }
[data-theme="dark"] .change-list-open b { color:var(--spruce-dark); }
/* All changes: the search and the state beside each other under the description. */
#changeAllPanel .panel-heading { flex-wrap:wrap; }
#changeAllPanel .change-list-tools { flex:1 1 100%; flex-wrap:nowrap; }
/* The schedule's type and risk stay inside the card. */
.change-schedule-header, .change-schedule-row { grid-template-columns:minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, .9fr) auto; }
.change-schedule-row > * { min-width:0; }
.change-schedule-kind { flex-wrap:wrap; }
.change-schedule-header span:last-child { white-space:nowrap; }
@media (max-width:900px) { .change-schedule-row { grid-template-columns:minmax(0, 1fr) auto; } }
/* The approval queue: the number as strong as the ticket list's, and a change waiting on others on one line. */
.approval-queue-title .change-number { color:var(--ink-2); font-weight:var(--weight-semibold); }
.approval-queue-fold { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100); margin-top:var(--space-100); color:var(--ink-2); font-size:var(--text-sm); }
.approval-queue-card.is-folded .approver-list { margin-top:var(--space-100); }
/* A row of tabs wider than a phone fades at the side where there are more. */
#changeTabs.rp-more-right { mask-image:linear-gradient(to right, #000 calc(100% - 3rem), transparent); }
#changeTabs.rp-more-left { mask-image:linear-gradient(to left, #000 calc(100% - 3rem), transparent); }
#changeTabs.rp-more-left.rp-more-right { mask-image:linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); }

/* ---------- Problems: the list ---------- */
#problemFilterClear[hidden] { display:none; }
.problem-outage-title .rp-flag, .problem-outage-row .rp-flag { margin-left:var(--space-50); padding:0 var(--space-75); font-size:var(--text-xs); vertical-align:middle; }
/* Possible problems fold to one line on a phone. */
.pd-suggest-fold { display:none; }
@media (max-width:700px) {
  .pd-suggest-fold { display:flex; align-items:center; justify-content:space-between; gap:var(--space-150); width:100%; min-height:var(--control-height); padding:0; border:0; background:none; color:var(--ink); font-size:var(--text-md); text-align:left; cursor:pointer; box-shadow:none; }
  .pd-suggest-fold span { color:var(--spruce); font-weight:var(--weight-semibold); }
  .pd-suggestions.is-folded > :not(.pd-suggest-fold) { display:none !important; }
  .pd-suggestions:not(.is-folded) .pd-suggest-fold { margin-bottom:var(--space-100); }
}

/* ---------- The knowledge base: the search and the list first ---------- */
/* What no article covers yet, on one line until it's opened. */
.kb-suggestions.is-collapsed { padding:var(--space-100) var(--space-200); }
.kb-suggestions-line { display:flex; align-items:center; gap:var(--space-100); min-width:0; color:var(--ink); font-size:var(--text-md); }
.kb-suggestions-line b { flex:none; font-weight:var(--weight-semibold); }
.kb-suggestions-names { flex:1 1 auto; min-width:0; overflow:hidden; color:var(--muted); overflow-wrap:break-word; white-space:normal; }
.kb-suggestions-line .text-button { flex:none; margin-left:auto; }
.kb-suggestions-spark { color:var(--spruce); }
#knowledgeView .knowledge-search-icon { flex:none; width:1rem; height:1rem; color:var(--muted); }
@media (max-width:700px) {
  /* A suggestion's words have the row; its buttons go under them. */
  .kb-suggestions li { flex-wrap:wrap; }
  .kb-suggestions li > div { flex:1 1 100%; }
  .kb-suggestions-line { flex-wrap:wrap; }
  .kb-suggestions-line b { flex:1 1 auto; white-space:normal; }
  .kb-suggestions-names { display:none; }
}

/* ---------- The article editor: the standard page header ---------- */
/* Where every page starts: the breadcrumb on its row with "Times in …", then the title with the actions at its right
   and where the writing stands under it. It was a bar of its own 25 px higher, with the actions in its middle. */
.knowledge-editor-view.active-view, [data-theme="dark"] .knowledge-editor-view.active-view, body.density-compact .knowledge-editor-view.active-view { margin:0; min-height:0; background:none; }
.kbe-nav-row { display:flex; align-items:center; gap:var(--space-150); min-height:var(--control-height-sm); margin:0 0 var(--space-100); }
.kbe-nav-row > .page-breadcrumb { min-width:0; margin:0; padding:0; }
.kbe-header, [data-theme="dark"] .kbe-header {
  position:sticky; top:calc(var(--topbar-height) + var(--outage-banner-h, 0px)); z-index:var(--z-page);
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100) var(--space-300);
  min-height:0; margin:0 0 var(--space-200); padding:var(--space-100) 0; border:0; background:var(--paper);
}
.kbe-heading { flex:1 1 20rem; min-width:0; }
.kbe-page-title { margin:0; color:var(--ink); font-size:var(--text-3xl); font-weight:var(--weight-bold); letter-spacing:-.01em; line-height:var(--leading-tight); }
.kbe-status-line { display:flex; align-items:center; gap:var(--space-100); min-width:0; margin:var(--space-50) 0 0; overflow:hidden; white-space:nowrap; }
.kbe-status-line .kbe-status { min-width:0; overflow:hidden; font-size:var(--text-sm); overflow-wrap:break-word; }
.kbe-status-line .kbe-count { font-size:var(--text-sm); }
.kbe-status-line .kbe-count:empty { display:none; }
.kbe-header .kbe-actions { flex:0 0 auto; flex-wrap:wrap; justify-content:flex-end; margin-left:auto; }
.kbe-body { grid-template-columns:minmax(0, 1fr) 17.5rem; gap:var(--space-250); max-width:none; padding:0 0 var(--space-800); }
@media (max-width:1100px) { .kbe-body { grid-template-columns:minmax(0, 1fr); } }
.kbe-toolbar, .kbe-side { top:calc(var(--topbar-height) + var(--outage-banner-h, 0px) + var(--kbe-bar-h, 0px) + var(--space-150)); }
/* An empty title is the page, not a grey box. */
.kbe-title, [data-theme="dark"] .kbe-title, .kbe-title:focus, [data-theme="dark"] .kbe-title:focus { background:transparent !important; box-shadow:none; }
.kbe-title[aria-invalid="true"], [data-theme="dark"] .kbe-title[aria-invalid="true"] { box-shadow:inset 0 -2px 0 var(--bad); }
@media (max-width:700px) {
  /* On a phone the actions are a bar at the bottom of the screen, and where the writing stands is one line. */
  /* The page's fade-in leaves a transform on it, which would hold the bar inside the page instead of the screen. */
  .knowledge-editor-view.active-view, [data-theme="dark"] .knowledge-editor-view.active-view { padding-bottom:calc(var(--control-height-lg) + var(--space-400)); animation:none; transform:none; }
  .kbe-header, [data-theme="dark"] .kbe-header { position:static; margin-bottom:var(--space-150); padding:0; }
  .kbe-page-title { font-size:var(--text-2xl); }
  .kbe-header .kbe-actions, [data-theme="dark"] .kbe-header .kbe-actions { position:fixed; left:0; right:0; bottom:0; z-index:var(--z-page); display:flex; flex-wrap:nowrap; gap:var(--space-75); width:auto; margin:0; padding:var(--space-100) var(--space-200); border-top:1px solid var(--line); background:var(--surface); box-shadow:0 -6px 16px rgba(0,0,0,.08); }
  .kbe-header .kbe-actions > * { flex:1 1 0; min-width:0; padding-left:var(--space-100); padding-right:var(--space-100); white-space:nowrap; }
  .kbe-header .kbe-actions > .kbe-preview-toggle { flex:0 0 auto; }
  .kbe-header .kbe-actions > .kbe-preview-toggle span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .kbe-header .kbe-actions > #saveKnowledgeArticleButton { flex:1.4 1 0; }
}

/* ---------- A problem's and a change's linked lists ---------- */
/* On the page the incidents list has more room (it was a box of five rows inside the dialog); a long one still scrolls. */
.record-page .problem-incidents ul { max-height:22rem; }
@media (max-width:700px) {
  /* The number and the title on a line, who and the state under them, the ×  at the end. */
  .record-page .problem-incidents li { flex-wrap:wrap; }
  .record-page .problem-incidents li small { flex:1 1 100%; order:3; margin-left:0; white-space:normal; }
}
/* With nothing waiting on the article, only its History link is above it: a link, not a card. */
.rp-article .rp-notices .kb-reader-lifecycle:not(:has(.kb-reader-note, .kb-reader-actions > :not([data-kb-history]), .kb-history, .kb-compare, .kb-reader-ask)) { padding:0; border:0; background:none; }
.rp-article .rp-notices .kb-reader-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
/* The formatting bar on one row at a laptop's width: the style menu and the tools a little narrower. */
@media (max-width:1440px) and (min-width:701px) {
  .kbe-toolbar .kbe-select { min-width:7.5rem; }
  .kbe-toolbar .kbe-tool { min-width:30px; padding:0 var(--space-75); }
  .kbe-toolbar .kbe-group { padding-right:var(--space-50); margin-right:var(--space-25); }
}
/* A role that only reads problems: no linking or unlinking, as in the dialog. */
.rp-problem.is-read-only :is(.problem-link-row, [data-problem-unlink], [data-problem-unlink-change], #problemIncidentAdd) { display:none !important; }
/* The CIs' heading is a section's heading on these pages (styles.css mutes it everywhere with !important). */
.record-page .ci-links h3 { color:var(--ink) !important; }
/* Problems on a phone: the filters behind one button. */
.pd-filters-toggle { display:none; }
@media (max-width:700px) {
  .pd-filters-toggle { display:inline-flex; margin:0 0 var(--space-150); }
  #problemOutageFilters:not(.is-open) { display:none; }
  /* What no article covers yet: its words beside Review, on two lines at most. */
  .kb-suggestions-line { flex-wrap:nowrap; align-items:flex-start; }
  .kb-suggestions-line b { min-width:0; }
}
@media (max-width:700px) {
  /* A change's state in the slim bar on a phone is its colored dot, so the title has the room. */
  .rp-header.is-stuck .change-state-chip { gap:0; padding:0; border:0; background:none; font-size:0; }
}
/* Problems on a phone: each problem is a card, its service, severity, status and duration as labelled lines (the table
   ran off the side). */
@media (max-width:700px) {
  #problemRegister .tableWrap { overflow:visible; }
  #problemRegister table thead { display:none; }
  #problemRegister table, #problemRegister tbody, #problemRegister tr, #problemRegister td { display:block; width:100%; }
  #problemRegister tr.problem-outage-row { padding:var(--space-150) 0; border-bottom:1px solid var(--line); }
  #problemRegister td { padding:var(--space-25) 0; border:0; }
  #problemRegister td[data-label] { display:flex; align-items:center; justify-content:space-between; gap:var(--space-150); }
  #problemRegister td[data-label]::before { content:attr(data-label); color:var(--muted); font-size:var(--text-sm); }
}

/* Runbooks (GitHub issue 472; public/js/app/runbooks.js). Colors come from the theme's own tokens, so light, dark and
   high contrast follow the rest of the app. */
.runbooks-view .rb-list, .runbooks-view .rb-detail > .panel { margin-bottom:var(--space-200); }
.rb-filters { display:flex; flex-wrap:wrap; gap:var(--space-75); margin-bottom:var(--space-150); }
.rb-filter { min-height:var(--control-height-sm); padding:0 var(--space-150); border:1px solid var(--line-strong, var(--line)); border-radius:var(--radius-pill); background:var(--surface); color:var(--ink-2); font:inherit; font-size:var(--text-sm); cursor:pointer; }
.rb-filter[aria-pressed="true"] { border-color:var(--spruce); background:var(--spruce-pale); color:var(--ink); font-weight:var(--weight-semibold); }
.rb-count { margin:0 0 var(--space-100); color:var(--muted); font-size:var(--text-sm); }
.rb-table td { vertical-align:top; }
.rb-open { font-weight:var(--weight-semibold); text-align:left; }
.rb-chip { display:inline-block; padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface-2); color:var(--ink-2); font-size:var(--text-xs); line-height:1.4; white-space:nowrap; }
.rb-chip-draft { background:var(--surface-2); color:var(--ink-2); }
.rb-chip-review { border-color:transparent; background:var(--saffron-pale, var(--surface-2)); color:var(--ink); }
.rb-chip-published { border-color:transparent; background:var(--good-soft); color:var(--good); }
.rb-chip-retired { background:var(--surface-2); color:var(--muted); }
.rb-chip-due, .rb-chip-required { border-color:transparent; background:var(--bad-soft); color:var(--bad); }
.rb-back { display:inline-block; margin:0 0 var(--space-150); }
.rb-detail-head h2 { margin:0 0 var(--space-50); }
.rb-meta { margin:0 0 var(--space-150); color:var(--muted); font-size:var(--text-sm); }
.rb-facts { display:grid; grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr)); gap:var(--space-150); margin:0 0 var(--space-150); }
.rb-facts dt { color:var(--muted); font-size:var(--text-xs); text-transform:uppercase; letter-spacing:.04em; }
.rb-facts dd { margin:var(--space-25) 0 0; color:var(--ink); overflow-wrap:anywhere; }
.rb-description { margin:0 0 var(--space-150); color:var(--ink-2); white-space:pre-wrap; }
.rb-actions { display:flex; flex-wrap:wrap; gap:var(--space-100); margin-top:var(--space-150); }
.rb-note { display:block; margin-top:var(--space-150); }
.rb-note textarea { box-sizing:border-box; width:100%; }
.rb-steps, .rb-edit-steps { margin:0; padding:0; list-style:none; counter-reset:none; }
.rb-step, .rb-edit-step { padding:var(--space-150) 0; border-top:1px solid var(--line); }
.rb-step:first-child, .rb-edit-step:first-child { border-top:0; }
.rb-step-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); margin-bottom:var(--space-75); }
.rb-step-moves { display:flex; gap:var(--space-100); margin-left:auto; }
.rb-who { color:var(--ink-2); font-size:var(--text-sm); }
.rb-step-text { margin:0; color:var(--ink); white-space:pre-wrap; overflow-wrap:anywhere; }
.rb-step-article, .rb-step-action { margin:var(--space-75) 0 0; color:var(--ink-2); }
.rb-step-article a { color:var(--spruce); font-weight:var(--weight-semibold); text-underline-offset:2px; }
.rb-step-action small { display:block; margin-top:var(--space-25); }
.rb-editor > .ai-field, .rb-edit-step > .ai-field { display:block; margin-bottom:var(--space-150); }
.rb-editor :is(input, textarea, select), .rb-edit-step :is(input, textarea, select) { box-sizing:border-box; width:100%; max-width:100%; }
.rb-edit-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-150); margin-bottom:var(--space-150); }
.rb-edit-row > .ai-field { flex:1 1 12rem; min-width:0; }
.rb-required { flex:0 0 auto; min-height:var(--control-height); display:flex; align-items:center; gap:var(--space-75); }
.rb-required input { width:auto; }
@media (max-width:640px) {
  .rb-table th:nth-child(n+5), .rb-table td:nth-child(n+5) { display:none; }
  .rb-step-moves { margin-left:0; }
}
/* What a runbook is attached to (GitHub issue 472, part 2). */
.rb-attach-kind { margin:0 0 var(--space-150); padding:var(--space-100) var(--space-150); border:1px solid var(--line); border-radius:var(--radius-md); }
.rb-attach-kind legend { padding:0 var(--space-50); color:var(--ink); font-weight:var(--weight-semibold); }
.rb-attach-options { display:grid; grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); gap:var(--space-75) var(--space-150); max-height:16rem; overflow:auto; }
.rb-attach-options .rp-check { display:flex; align-items:center; gap:var(--space-75); min-width:0; overflow-wrap:anywhere; color:var(--ink); }
.rb-attach-options input { flex:0 0 auto; width:auto; }
/* A ticket's runbooks: a card at the top of its right-hand column. */
.trb-card { min-width:0; }
.trb-card .trb-list, .trb-card .trb-steps { margin:0; padding:0; list-style:none; }
.trb-entry + .trb-entry { margin-top:var(--space-200); padding-top:var(--space-150); border-top:1px solid var(--line); }
.trb-entry-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:var(--space-75); }
.trb-entry-head h3 { margin:0; color:var(--ink); font-size:var(--text-md); overflow-wrap:anywhere; }
.trb-meta, .trb-progress { margin:var(--space-50) 0 0; color:var(--muted); font-size:var(--text-xs); }
.trb-step { padding:var(--space-100) 0; border-top:1px solid var(--line); font-size:var(--text-sm); }
.trb-step:first-child { margin-top:var(--space-100); }
.trb-step .rb-step-head { margin-bottom:var(--space-50); }
.trb-step.trb-done .rb-step-text, .trb-step.trb-notNeeded .rb-step-text { color:var(--muted); }
.trb-section { margin:var(--space-50) 0 0; padding:var(--space-75) var(--space-100); border-left:3px solid var(--line); color:var(--ink-2); font-size:var(--text-xs); overflow-wrap:anywhere; }
.trb-marked { margin:var(--space-75) 0 0; color:var(--ink-2); font-size:var(--text-xs); }
.trb-why { display:block; margin-top:var(--space-25); overflow-wrap:anywhere; }
.trb-chip-done { border-color:transparent; background:var(--good-soft); color:var(--good); }
.trb-chip-skipped { border-color:transparent; background:var(--saffron-pale, var(--surface-2)); color:var(--ink); }
.trb-chip-notNeeded { background:var(--surface-2); color:var(--muted); }
.trb-buttons { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); margin-top:var(--space-75); }
.trb-form { margin-top:var(--space-75); }
.trb-form .ai-field, .trb-add .ai-field { display:block; margin-bottom:var(--space-75); }
.trb-form textarea, .trb-add select { box-sizing:border-box; width:100%; max-width:100%; }
.trb-add { margin-top:var(--space-150); }
.trb-off { margin-top:var(--space-100); }
.trb-empty { margin:0; font-size:var(--text-sm); }
/* The card folds to its title as its neighbors do (ticket-workspace.js twArrangeSidebar: the review of part 2), and
   then says what is on it. Its body is a div, not one of the card's rows. */
.trb-card > .trb-body { display:block; padding:0; border-top:0; color:inherit; font-size:inherit; }
.trb-fold-sum { margin-right:auto; color:var(--muted); font-size:var(--text-xs); font-weight:500; }
.trb-card:not(.is-folded) .trb-fold-sum { display:none; }
.trb-entry-head h3:focus { outline:2px solid var(--spruce); outline-offset:2px; }
.trb-entry-head h3:focus:not(:focus-visible) { outline:none; }
.trb-steps-fold { margin-top:var(--space-75); }
.trb-steps-fold > summary { cursor:pointer; color:var(--spruce); font-size:var(--text-sm); font-weight:600; }
/* Runbooks, part 3 (GitHub issue 472): what a step's in-app action did, a ticket resolved with required steps not
   done, the Resolve dialog's box for why, and where each workspace's choice is made. */
.trb-ran { margin:var(--space-50) 0 0; color:var(--ink-2); font-size:var(--text-xs); overflow-wrap:anywhere; }
.trb-resolves { margin-top:var(--space-150); padding-top:var(--space-100); border-top:1px solid var(--line); }
.trb-resolves h3 { margin:0 0 var(--space-50); color:var(--ink); font-size:var(--text-sm); }
.trb-resolves ul { margin:0; padding:0; list-style:none; display:grid; gap:var(--space-75); font-size:var(--text-xs); color:var(--ink-2); }
.resolution-runbooks { margin:var(--space-150) 0; padding:var(--space-100) var(--space-150); border-left:3px solid var(--saffron, var(--line)); background:var(--surface-2); border-radius:var(--radius-md); }
.resolution-runbooks label { display:block; }
.resolution-runbooks textarea { box-sizing:border-box; width:100%; max-width:100%; }
.rr-modes { display:grid; gap:var(--space-100); margin:0 0 var(--space-150); padding:0; border:0; min-width:0; }
.rr-modes legend { margin-bottom:var(--space-75); font-weight:var(--weight-semibold, 600); color:var(--ink); }
.rr-mode { display:flex; align-items:flex-start; gap:var(--space-100); }
.rr-mode input { margin-top:var(--space-25); }
.rr-mode span { display:grid; gap:var(--space-25); min-width:0; }
.rr-mode small { color:var(--muted); }
.department-runbook-resolve { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:var(--space-100) var(--space-150); align-items:center; padding-top:var(--space-100); border-top:1px solid var(--line); min-width:0; }
.department-runbook-resolve label { display:grid; gap:var(--space-25); min-width:0; font-size:var(--text-sm); }
.department-runbook-resolve small { color:var(--muted); }
.department-runbook-resolve select { max-width:100%; }
@media (max-width: 600px) { .department-runbook-resolve { grid-template-columns:minmax(0, 1fr); } }
/* Runbooks, part 4 (GitHub issue 472): the page's Reports, and the note of runbooks past their review date. */
.rb-heading-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
.rb-due-note { margin:0 0 var(--space-100); }
.rbr-range { margin:var(--space-100) 0 0; }
.rbr-book { margin:var(--space-200) 0 var(--space-75); color:var(--ink); font-size:var(--text-sm); overflow-wrap:anywhere; }
.rbr-book:first-of-type { margin-top:var(--space-100); }
.rbr-table td { vertical-align:top; }
.rbr-step { display:block; min-width:12rem; color:var(--ink); overflow-wrap:anywhere; }
.rbr-reasons { margin:0; padding:0; list-style:none; display:grid; gap:var(--space-75); min-width:14rem; }
.rbr-reasons li { overflow-wrap:anywhere; }
/* Runbook reports on a phone (the review of part 4): each row a card, each value under its column's name, so the
   counts and times are on screen without swiping inside the table. */
@media (max-width:700px) {
  .rbr-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .rp-table.rbr-table, .rbr-table tbody { display:block; width:100%; min-width:0; }
  .rbr-table tr { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--space-75) var(--space-150); padding:var(--space-150) 0; border-bottom:var(--control-border-width, 1px) solid var(--line); }
  .rp-table.rbr-table td { display:grid; gap:var(--space-25); padding:0; border:0; min-width:0; overflow-wrap:anywhere; }
  .rbr-table td::before { content:attr(data-label); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-semibold); }
  .rbr-table td:first-child, .rbr-table td[data-label="Latest reasons"] { grid-column:1 / -1; }
  .rbr-step, .rbr-reasons { min-width:0; }
  /* A runbook's name, a button, wraps as the words around it do. */
  .rbr-table .nt-link { white-space:normal; overflow-wrap:anywhere; text-align:left; }
}
/* Vendors (GitHub issue 524; vendors.js): the list with its tiles, chips, filters and saved views, and a vendor's page with
   tabs. On phones the list's rows become cards and the tabs become one list of sections. */
#vendorsView .vn-tiles { grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); }
.vn-tile { font:inherit; cursor:pointer; }
.vn-tile[aria-pressed="true"] { border-color:var(--spruce); background:var(--spruce-pale); }
.vn-chips { display:flex; flex-wrap:wrap; gap:var(--space-75); margin:0 0 var(--space-150); }
.vn-toolbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-100) var(--space-150); margin:0 0 var(--space-150); }
/* One look for the whole filter row: every control has its label above in the same words' size, and is the height,
   border and corners of a dropdown (the search box, the Show only toggles and the buttons too). */
.vn-search { flex:1 1 16rem; min-width:0; }
.vn-search, .vn-select, .vn-field { display:flex; flex-direction:column; gap:var(--space-25); color:var(--muted); font-size:var(--text-xs); }
.vn-search input { box-sizing:border-box; width:100%; min-height:var(--control-height); padding:0 var(--space-150); border:var(--control-border-width) solid var(--control-border); border-radius:var(--radius-lg); background:var(--field-bg); color:var(--ink); font-size:var(--text-md); }
.vn-toolbar > .outline-button, .vn-toolbar > .save-button, .vn-columns > .outline-button { min-height:var(--control-height); }
.vn-select select { min-width:9rem; }
.vn-view-name { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-75); }
.vn-view-name label { display:flex; flex-direction:column; gap:var(--space-25); color:var(--muted); font-size:var(--text-xs); }
.vn-columns { position:relative; }
.vn-column-picker { position:absolute; z-index:var(--z-popover); right:0; top:calc(100% + var(--space-50)); min-width:13rem; margin:0; padding:var(--space-100) var(--space-150); border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); box-shadow:var(--shadow); }
.vn-column-picker legend { padding:0 var(--space-50); color:var(--ink); font-weight:var(--weight-semibold); }
.vn-column-picker .wf-check { display:flex; align-items:center; gap:var(--space-75); padding:var(--space-25) 0; color:var(--ink); }
.vn-table tbody tr { cursor:pointer; }
.vn-table td { overflow-wrap:anywhere; }
.vn-status { display:inline-block; padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface-2); color:var(--ink-2); font-size:var(--text-xs); line-height:1.4; white-space:nowrap; }
.vn-status-active { border-color:var(--spruce); background:var(--spruce-pale); color:var(--ink); }
.vn-status-draft { border-color:var(--saffron); background:var(--saffron-pale); color:var(--ink); }
/* Emergency, 24-hour and Preferred (GitHub issue 527): quiet chips, wrapping onto lines of their own. */
.vn-flags { display:inline-flex; flex-wrap:wrap; gap:var(--space-50); }
.vn-flag { display:inline-block; max-width:100%; padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface-2); color:var(--ink); font-size:var(--text-xs); line-height:1.4; overflow-wrap:anywhere; }
.vn-flag-preferred { border-color:var(--spruce); background:var(--spruce-pale); }
.vn-flag-filters { display:flex; flex-wrap:wrap; gap:var(--space-50); }
.vn-flag-filters .rb-filter { min-height:var(--control-height); padding:0 var(--space-150); border-color:var(--control-border); border-radius:var(--radius-lg); color:var(--ink); font-size:var(--text-md); }
.vn-flag-filters .rb-filter:hover:not([aria-pressed="true"]) { border-color:var(--control-hover); }
.vn-flag-filters .rb-filter[aria-pressed="true"] { border-color:var(--spruce); }
.vn-pref-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-75) var(--space-150); margin:0 0 var(--space-100); }
.vn-pref-row label { display:flex; flex-direction:column; gap:var(--space-25); min-width:0; color:var(--muted); font-size:var(--text-xs); }
.vn-pref-row select { min-width:10rem; max-width:100%; }
/* Admin settings › Vendors (GitHub issue 527): one row per category, its request types folded under it. */
.vendor-category-list { list-style:none; margin:0; padding:0; }
.vendor-category-row { padding:var(--space-100) 0; border-bottom:1px solid var(--line); }
.vendor-category-row:last-child { border-bottom:0; }
.vendor-category-main { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-75) var(--space-150); }
.vendor-category-main .ai-field { flex:1 1 16rem; min-width:0; margin:0; }
.vendor-category-main .wf-check, .vendor-category-count { align-self:center; margin:0; }
.vendor-category-types { margin-top:var(--space-75); }
.vendor-category-types summary { cursor:pointer; color:var(--ink-2); }
.vendor-category-type-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); gap:var(--space-50) var(--space-150); padding:var(--space-75) 0 0; }
.vn-page-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--space-150); margin-bottom:var(--space-150); }
.vn-page-head > div:first-child { min-width:0; flex:1 1 20rem; }
.vn-title { margin:0; overflow-wrap:anywhere; }
.vn-back { margin:0 0 var(--space-50); }
.vn-actions, .vn-page .cmdb-form-actions { display:flex; flex-wrap:wrap; gap:var(--space-75); }
.vn-tabs { display:flex; flex-wrap:wrap; gap:var(--space-25); margin:0 0 var(--space-150); border-bottom:1px solid var(--line); }
.vn-tabs [role="tab"] { min-height:var(--control-height); padding:0 var(--space-150); border:0; border-bottom:2px solid transparent; background:none; color:var(--ink-2); font:inherit; cursor:pointer; }
.vn-tabs [role="tab"][aria-selected="true"] { border-bottom-color:var(--spruce); color:var(--ink); font-weight:var(--weight-semibold); }
.vn-panel { min-width:0; }
.vn-panel:not(.is-active) { display:none; }
.vn-panel-title { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.vn-facts { display:grid; grid-template-columns:repeat(auto-fill, minmax(15rem, 1fr)); gap:var(--space-150) var(--space-250); margin:0; }
.vn-facts dt { color:var(--muted); font-size:var(--text-xs); }
.vn-facts dd { margin:var(--space-25) 0 0; color:var(--ink); overflow-wrap:anywhere; }
.vn-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.vn-page.is-editing .asset-form-grid :is(input, select), .vn-page.is-editing textarea { box-sizing:border-box; width:100%; max-width:100%; }
.vn-page.is-editing input::placeholder, .vn-page.is-editing textarea::placeholder { color:var(--muted); }
.vn-copy { margin:0 0 var(--space-200); padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface-2); }
.vn-copy h3 { margin-top:0; }
.vn-money-part { margin-bottom:var(--space-250); }
.vn-history { margin:0; padding:0; list-style:none; }
/* A vendor's jobs on the Performance tab (GitHub issue 533): by category, and the ratings with their tickets. */
.vj-part { margin:var(--space-200) 0 0; }
.vj-part h3 { margin:0 0 var(--space-75); }
.vj-ratings { margin:0; padding:0; list-style:none; }
.vj-ratings li { display:grid; gap:var(--space-25); padding:var(--space-100) 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.vj-ratings li p { margin:0; color:var(--ink); }
.vj-stars { color:var(--ink); letter-spacing:0.05em; }
.vj-tickets tbody tr { cursor:pointer; }
.vj-target-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap:var(--space-100) var(--space-200); }
.vj-target-grid label { display:grid; gap:var(--space-25); min-width:0; }
.vj-target-grid input { width:100%; min-width:0; }
.vn-history li { padding:var(--space-100) 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
/* Needs review, the completeness meter and History in plain words (GitHub issue 525). */
.vn-field { display:flex; flex-direction:column; gap:var(--space-25); min-width:0; }
.vn-review { display:inline-flex; align-items:center; gap:var(--space-50); color:var(--muted); font-size:var(--text-xs); font-weight:var(--weight-regular); }
.vn-review input { width:auto; }
.vn-page .vn-field > .vn-review, .vn-page .asset-form-grid .vn-review { display:inline-flex; flex-direction:row; align-items:center; align-self:flex-start; gap:var(--space-50); margin:0; color:var(--muted); font-size:var(--text-xs); font-weight:var(--weight-regular); }
.vn-page .vn-review input[type="checkbox"] { width:auto; min-height:0; margin:0; }
.vn-review-mark { display:inline-block; margin-left:var(--space-50); padding:0 var(--space-75); border:1px solid var(--saffron); border-radius:var(--radius-pill); background:var(--saffron-pale); color:var(--ink); font-size:var(--text-2xs); line-height:1.5; white-space:nowrap; }
.vn-meter { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--space-50) var(--space-150); margin:0 0 var(--space-150); color:var(--muted); font-size:var(--text-sm); }
.vn-meter summary { cursor:pointer; color:var(--spruce); }
.vn-meter ul { margin:var(--space-50) 0 0; padding-left:var(--space-250); color:var(--ink-2); }
/* What is ticked Needs review, with each note (GitHub issue 532). */
.vn-review-list { margin:0 0 var(--space-150); padding:var(--space-100) var(--space-150); border:1px solid var(--saffron); border-radius:var(--radius-lg); background:var(--saffron-pale); color:var(--ink); }
.vn-review-list h3 { margin:0 0 var(--space-50); font-size:var(--text-sm); }
.vn-review-list ul { display:grid; gap:var(--space-25); margin:0; padding-left:var(--space-200); font-size:var(--text-sm); overflow-wrap:anywhere; }
.vn-history p { margin:0; color:var(--ink); }
.vn-history details { margin-top:var(--space-50); }
.vn-history summary { cursor:pointer; color:var(--spruce); font-size:var(--text-sm); }
.vn-history-details { display:grid; gap:var(--space-50); margin:var(--space-75) 0 0; }
.vn-history-details dt { color:var(--muted); font-size:var(--text-xs); }
.vn-history-details dd { margin:0; overflow-wrap:anywhere; }
.vn-was { color:var(--muted); text-decoration:line-through; }
/* Coverage (GitHub issue 528; vendor-coverage.js): the US map drawn from the bundled state outlines, with its legend and the
   same in words beside it; in edit mode the locations as a tree and the states as boxes. */
.vn-map { margin:0 0 var(--space-200); max-width:56rem; }
.vn-map-svg { display:block; width:100%; height:auto; }
.vn-map-state { fill:var(--surface-2); stroke:var(--line-strong); stroke-width:.8; stroke-linejoin:round; }
.vn-map-state.is-covered { fill:var(--spruce); fill-opacity:.72; }
.vn-map-svg.is-editing .vn-map-state { cursor:pointer; }
.vn-map-svg.is-editing .vn-map-state:hover { fill:var(--spruce-pale); }
.vn-map-svg.is-editing .vn-map-state.is-covered:hover { fill:var(--spruce); fill-opacity:.9; }
.vn-map-borders { fill:none; stroke:var(--surface); stroke-width:1; stroke-linejoin:round; pointer-events:none; }
.vn-map-pin { fill:var(--terra); stroke:var(--surface); stroke-width:3; }
.vn-map-pin.is-outside { fill:var(--surface); stroke:var(--ink); stroke-width:2.5; }
.vn-map figcaption { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-75) var(--space-200); margin-top:var(--space-75); }
.vn-map-legend { display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-200); margin:0; padding:0; list-style:none; color:var(--ink-2); font-size:var(--text-xs); }
.vn-map-legend li { display:inline-flex; align-items:center; gap:var(--space-75); }
.vn-key { display:inline-block; width:14px; height:14px; box-sizing:border-box; }
.vn-key-state { border:1px solid var(--line-strong); border-radius:var(--radius-sm); background:var(--spruce); opacity:.8; }
.vn-key-pin { border:2px solid var(--surface); border-radius:50%; background:var(--terra); box-shadow:0 0 0 1px var(--line-strong); }
.vn-key-outside { border:2px solid var(--ink); border-radius:50%; background:var(--surface); }
.vn-map-outside { display:inline-flex; align-items:center; gap:var(--space-75); color:var(--ink); font-size:var(--text-sm); }
.vn-cover-list { margin:0; padding-left:var(--space-200); }
.vn-cover-list li { overflow-wrap:anywhere; }
.vn-cover-review { margin:0 0 var(--space-100); color:var(--muted); font-size:var(--text-sm); }
.vn-coverage-edit > .vn-review { margin:0 0 var(--space-150); }
.vn-coverage-edit .buy-kinds { display:block; }
.vn-coverage-edit .buy-kinds > .wf-hint { margin:0 0 var(--space-100); }
.vn-map-edit { max-width:40rem; margin:0 0 var(--space-150); }
.vn-cover-places .vn-cover-place { display:flex; align-items:flex-start; gap:var(--space-75); padding:var(--space-50) 0 var(--space-50) calc(var(--vn-depth, 0) * var(--space-250)); color:var(--ink); }
.vn-cover-place > span { min-width:0; overflow-wrap:anywhere; }
.vn-cover-place small { display:block; }
.vn-cover-place input:disabled + span { color:var(--ink-2); }
.vn-state-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(11rem, 1fr)); gap:var(--space-25) var(--space-150); }
.vn-state-grid .wf-check { display:flex; align-items:center; gap:var(--space-75); color:var(--ink); }
/* Admin settings › Organization & locations: a location's suggested state, and the vendors covering it. */
.location-state-suggestion { margin:0; color:var(--ink-2); font-size:var(--text-sm); }
.location-state-suggestion[hidden] { display:none; }
.vn-covering { margin-top:var(--space-50); font-size:var(--text-xs); }
.vn-covering summary { cursor:pointer; color:var(--spruce); }
.vn-covering ul { margin:var(--space-50) 0 0; padding-left:var(--space-200); }
.vn-covering li { overflow-wrap:anywhere; }
.vn-covering .nt-link { white-space:normal; overflow-wrap:anywhere; text-align:left; }
.organization-row:has(.vn-covering) > div:first-child { min-width:0; }
.vn-covering-none { display:block; margin-top:var(--space-25); color:var(--muted); }
/* A vendor's Contacts tab (GitHub issue 529): a card per contact, the Primary first. */
.vn-contacts { display:grid; grid-template-columns:repeat(auto-fill, minmax(18rem, 1fr)); gap:var(--space-150); margin:0; padding:0; list-style:none; }
.vn-contact { min-width:0; padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.vn-contact.is-primary { border-color:var(--spruce); }
.vn-contact-name { margin:0; font-size:var(--text-md); overflow-wrap:anywhere; }
.vn-contact-role { margin:var(--space-50) 0 var(--space-100); }
.vn-contact-facts { display:grid; gap:var(--space-100); margin:0; }
.vn-contact-facts dt { color:var(--muted); font-size:var(--text-xs); }
.vn-contact-facts dd { margin:var(--space-25) 0 0; color:var(--ink); overflow-wrap:anywhere; }
.vn-email-off { display:block; margin-top:var(--space-25); color:var(--muted); font-size:var(--text-xs); }
.vn-email-off .nt-link { font-size:inherit; white-space:normal; text-align:left; }
.vn-contacts-edit > .vn-review { margin:0 0 var(--space-150); }
.vn-contact-edit { display:block; min-width:0; margin:0 0 var(--space-150); padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); }
.vn-contact-edit legend { max-width:100%; padding:0 var(--space-50); color:var(--ink); font-weight:var(--weight-semibold); overflow-wrap:anywhere; }
.vn-contact-edit > .vn-field { margin:var(--space-100) 0; }
.vn-contact-cover { margin:0 0 var(--space-150); }
.vn-contact-cover summary { cursor:pointer; color:var(--spruce); overflow-wrap:anywhere; }
.vn-cover-group { display:grid; grid-template-columns:repeat(auto-fill, minmax(12rem, 1fr)); gap:var(--space-25) var(--space-150); min-width:0; margin:var(--space-100) 0 0; padding:0; border:0; }
.vn-cover-group legend { padding:0; margin-bottom:var(--space-50); color:var(--muted); font-size:var(--text-xs); }
.vn-cover-group .wf-check { display:flex; align-items:flex-start; gap:var(--space-75); color:var(--ink); overflow-wrap:anywhere; }
@media (max-width:640px) {
  .vn-contacts { grid-template-columns:minmax(0, 1fr); }
  .vn-contact, .vn-contact-edit { padding:var(--space-100) var(--space-150); }
  .vn-cover-group { grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:640px) {
  /* The list's rows as cards. */
  .vn-table thead { display:none; }
  .vn-table, .vn-table tbody, .vn-table tr, .vn-table td { display:block; width:100%; box-sizing:border-box; }
  .vn-table tr { margin:0 0 var(--space-100); padding:var(--space-100) var(--space-150); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
  .vn-table td { padding:var(--space-25) 0; border:0; }
  .vn-table td:empty { display:none; }
  .vn-table td:not(.vn-cell-name)::before { content:attr(data-label); display:block; color:var(--muted); font-size:var(--text-xs); }
  .vn-toolbar > * { flex:1 1 100%; }
  .vn-select select { width:100%; }
  .vn-columns > .outline-button { width:100%; }
  .vn-pref-row label, .vn-pref-row select { width:100%; }
  .vn-cover-places .vn-cover-place { padding-left:calc(var(--vn-depth, 0) * var(--space-150)); }
  .vn-state-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .vn-column-picker { left:0; right:auto; }
  /* The tabs as one list of sections. */
  .vn-tabs { display:none; }
  .vn-panel:not(.is-active) { display:block; }
  .vn-panel { margin-bottom:var(--space-250); }
  .vn-panel-title { position:static; width:auto; height:auto; overflow:visible; clip:auto; margin:0 0 var(--space-100); font-size:var(--text-lg); }
}
/* Notify vendors (GitHub issue 535; vendor-notify.js): the bar and check boxes on the list, the drawer's lists, and a
   vendor's conversations on its Overview. The drawer itself is the Ask for approval drawer's look (approval-ask.css). */
.vnn-bar { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); margin:0 0 var(--space-150); }
.vnn-bar-words { min-width:0; color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:anywhere; }
.vn-table th.vn-cell-pick, .vn-table td.vn-cell-pick { width:2.75rem; }
.vnn-pick { display:inline-flex; align-items:center; justify-content:center; min-width:32px; min-height:32px; cursor:pointer; }
.vnn-pick input { margin:0; }
.vnn-pick-word { display:none; }
.vnn-who { margin:0 0 var(--space-150); color:var(--ink); overflow-wrap:anywhere; }
.vnn-insert { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-75); margin:var(--space-75) 0 0; color:var(--muted); font-size:var(--text-sm); }
.vnn-list { margin:0 0 var(--space-150); }
.vnn-list summary { cursor:pointer; color:var(--ink); font-weight:var(--weight-semibold); }
.vnn-list ul { display:grid; gap:var(--space-50); margin:var(--space-75) 0 0; padding:0; list-style:none; }
.vnn-list li { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--space-25) var(--space-75); min-width:0; padding:var(--space-50) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-md); overflow-wrap:anywhere; }
.vnn-list li small { color:var(--muted); }
.vnn-list li.vnn-skipped { border-color:var(--saffron); background:var(--saffron-pale); }
.vnn-list li.vnn-skipped small { color:var(--ink-2); }
.vnn-why { flex:1 1 100%; }
.vnn-list .nt-link { white-space:normal; text-align:left; }
.vnn-threads { margin:var(--space-250) 0 0; }
.vnn-threads h3 { margin:0 0 var(--space-50); }
.vnn-thread-list { display:grid; gap:var(--space-100); margin:var(--space-100) 0 0; padding:0; list-style:none; }
.vnn-thread { min-width:0; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.vnn-thread summary { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-25) var(--space-75); padding:var(--space-100) var(--space-150); cursor:pointer; }
.vnn-thread-subject { flex:1 1 12rem; min-width:0; color:var(--ink); font-weight:var(--weight-semibold); }
.vnn-thread summary small { flex:1 1 100%; color:var(--muted); overflow-wrap:anywhere; }
.vnn-thread details > :not(summary) { margin-left:var(--space-150); margin-right:var(--space-150); }
.vnn-thread .side-messages { margin-bottom:var(--space-150); }
.vnn-thread textarea { display:block; box-sizing:border-box; width:calc(100% - 2 * var(--space-150)); }
.vnn-thread-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--space-75); margin-top:var(--space-100) !important; margin-bottom:var(--space-150) !important; }
@media (max-width:640px) {
  .vnn-pick { min-width:44px; min-height:44px; gap:var(--space-75); }
  .vn-table td.vn-cell-pick { width:100%; }
  .vn-table td.vn-cell-pick::before { display:none; }
  .vnn-pick-word { display:inline; color:var(--ink-2); font-size:var(--text-sm); }
  .vnn-bar > button { flex:1 1 100%; min-height:44px; }
  .vnn-thread .side-message { max-width:100%; }
}
/* A vendor's Documents tab and the Vendor documents page (GitHub issue 530), and a contract's Files section. */
.vn-head-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
.vd-toolbar { margin:0 0 var(--space-150); }
.vd-add { margin:0 0 var(--space-200); padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.vd-add h3 { margin:0 0 var(--space-50); font-size:var(--text-md); }
.vd-file { display:block; margin:var(--space-100) 0; }
.vd-file input { display:block; max-width:100%; margin-top:var(--space-50); }
.vd-notes { display:block; margin:var(--space-100) 0; }
.vd-notes textarea { display:block; width:100%; box-sizing:border-box; margin-top:var(--space-50); }
.vd-add .wf-check, .vd-edit .wf-check { display:flex; align-items:flex-start; gap:var(--space-75); color:var(--ink); overflow-wrap:anywhere; }
.vd-docs { display:grid; grid-template-columns:repeat(auto-fill, minmax(20rem, 1fr)); gap:var(--space-150); margin:0; padding:0; list-style:none; }
.vd-doc { display:flex; flex-direction:column; gap:var(--space-100); min-width:0; padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.vd-doc.is-restricted { border-color:var(--saffron); }
.vd-doc-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--space-50) var(--space-100); min-width:0; }
.vd-doc-name { flex:1 1 12rem; min-width:0; margin:0; font-size:var(--text-md); overflow-wrap:anywhere; }
.vd-doc-name .nt-link { white-space:normal; text-align:left; }
.vd-chips { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); }
.vd-restricted { border-color:var(--saffron); background:var(--saffron-pale); }
/* A document an import made with no file (GitHub issue 532). */
.vd-no-file { border-style:dashed; }
.vd-expiry small { display:block; color:var(--muted); font-size:var(--text-xs); }
.vd-expiry.vd-soon small { color:var(--ink); font-weight:var(--weight-semibold); }
.vd-expiry.vd-expired small { color:var(--bad); font-weight:var(--weight-semibold); }
.vd-doc-actions { display:flex; flex-wrap:wrap; gap:var(--space-100); margin-top:auto; }
.vd-hidden { margin-top:var(--space-150); }
.vd-links { margin-top:var(--space-250); }
.vd-links h3 { margin:0 0 var(--space-50); font-size:var(--text-md); }
.vd-row-notes { display:block; max-width:40rem; overflow-wrap:anywhere; }
.vd-table td { overflow-wrap:anywhere; }
.vd-table .nt-link { white-space:normal; text-align:left; }
@media (min-width:641px) {
  .vd-table td:nth-child(2) { min-width:8rem; max-width:16rem; }
  .vd-table td:nth-child(1) { min-width:12rem; }
}
.rf-files li { overflow-wrap:anywhere; }
.rf-files li > * { min-width:0; max-width:100%; }
.rf-files .rf-name { white-space:normal; overflow-wrap:anywhere; text-align:left; }
.rf-upload { display:inline-flex; align-items:center; cursor:pointer; }
.rf-upload:focus-within { outline:2px solid var(--spruce); outline-offset:2px; }
@media (max-width:640px) {
  .vd-docs { grid-template-columns:minmax(0, 1fr); }
  .vd-doc, .vd-add { padding:var(--space-100) var(--space-150); }
  .vn-head-actions { width:100%; }
}
/* ---- Vendor compliance (GitHub issue 531; vendor-compliance.js): a status chip each, the Compliance tab's requirements ---- */
.vc-status { display:inline-block; padding:var(--space-25) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface-2); color:var(--ink); font-size:var(--text-xs); line-height:1.4; white-space:nowrap; }
.vc-status-compliant, .vc-status-waived { border-color:var(--spruce); background:var(--spruce-pale); }
.vc-status-expiring { border-color:var(--saffron); background:var(--saffron-pale); }
.vc-status-expired, .vc-status-missing { border-color:var(--terra); background:var(--terra-pale); font-weight:var(--weight-semibold); }
.vc-overall { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); margin:0 0 var(--space-150); }
.vc-items { display:grid; grid-template-columns:repeat(auto-fill, minmax(20rem, 1fr)); gap:var(--space-150); margin:0; padding:0; list-style:none; }
.vc-item { display:flex; flex-direction:column; gap:var(--space-100); min-width:0; padding:var(--space-150) var(--space-200); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.vc-item-expired, .vc-item-missing { border-color:var(--terra); }
.vc-item-expiring { border-color:var(--saffron); }
.vc-item-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--space-50) var(--space-100); min-width:0; }
.vc-name { flex:1 1 12rem; min-width:0; margin:0; font-size:var(--text-md); overflow-wrap:anywhere; }
.vc-words { margin:0; color:var(--ink-2); overflow-wrap:anywhere; }
.vc-waiver { padding:var(--space-100) var(--space-150); border-left:3px solid var(--spruce); background:var(--surface-2); border-radius:var(--radius-sm); overflow-wrap:anywhere; }
.vc-waiver.is-ended { border-left-color:var(--line); }
.vc-waiver p { margin:0; }
.vc-waiver p + p { margin-top:var(--space-50); }
.vc-waive { display:grid; gap:var(--space-100); }
.vc-waive label { display:grid; gap:var(--space-25); }
.vc-waive textarea, .vc-waive input { width:100%; max-width:100%; box-sizing:border-box; }
.vq-row .vq-type { flex:1 1 12rem; }
.vq-row .vq-amount { flex:0 1 11rem; }
.vq-subject { grid-column:span 2; }
@media (max-width:640px) {
  .vc-items { grid-template-columns:minmax(0, 1fr); }
  .vc-item { padding:var(--space-100) var(--space-150); }
  .vq-subject { grid-column:auto; }
  .vq-row .vq-amount { flex:1 1 100%; }
}

/* ---- Custom record types (GitHub issue 520; public/js/app/record-types.js) ---- */
.cr-actions { display:flex; flex-wrap:wrap; gap:var(--space-100); align-items:center; }
.cr-filters { display:flex; flex-wrap:wrap; gap:var(--space-150); align-items:flex-end; margin-bottom:var(--space-150); }
.cr-filters label { display:grid; gap:var(--space-50); font-size:var(--text-xs); color:var(--muted); min-width:0; }
.cr-filters select, .cr-filters input { min-height:var(--control-height); }
.cr-search { flex:1 1 14rem; }
.cr-search input { width:100%; }
.cr-columns { position:relative; }
.cr-columns summary { list-style:none; cursor:pointer; }
.cr-columns summary::-webkit-details-marker { display:none; }
.cr-columns-list { position:absolute; z-index:var(--z-menu); top:calc(100% + var(--space-50)); left:0; display:grid; gap:var(--space-75); min-width:14rem; max-height:20rem; overflow:auto; padding:var(--space-150); border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); box-shadow:var(--shadow-md, 0 8px 24px rgba(0, 0, 0, .12)); }
.cr-table td { vertical-align:top; overflow-wrap:anywhere; }
.cr-table .cr-number { white-space:nowrap; }
.cr-title { min-width:10rem; }
.cr-record-head { display:flex; flex-wrap:wrap; gap:var(--space-100); align-items:center; }
.cr-record-title { margin:0; overflow-wrap:anywhere; }
.cr-form { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--space-150) var(--space-200); margin-top:var(--space-150); }
.cr-form .ai-field { display:grid; gap:var(--space-50); min-width:0; }
.cr-form .ai-field input, .cr-form .ai-field select, .cr-form .ai-field textarea { width:100%; min-width:0; }
.cr-wide { grid-column:1 / -1; }
.cr-required { color:var(--danger, var(--ink)); }
.cr-links { margin:0; padding:0; list-style:none; display:grid; gap:var(--space-75); }
.cr-links li { display:flex; flex-wrap:wrap; gap:var(--space-75); align-items:center; overflow-wrap:anywhere; }
.cr-link-label { overflow-wrap:anywhere; }
a.cr-link-label { color:var(--spruce); font-weight:var(--weight-semibold); text-decoration:none; }
a.cr-link-label:hover, a.cr-link-label:focus-visible { text-decoration:underline; text-underline-offset:2px; }
.rec-ticket-card .cr-links li { align-items:flex-start; }
.cr-link-add { display:flex; flex-wrap:wrap; gap:var(--space-150); align-items:flex-end; margin-top:var(--space-150); }
.cr-link-add label { display:grid; gap:var(--space-50); font-size:var(--text-xs); color:var(--muted); }
.cr-link-id { flex:1 1 12rem; }
.cr-link-id input { width:100%; }
.cr-history { margin:0; padding-left:var(--space-250); display:grid; gap:var(--space-100); }
.cr-history p { margin:0; overflow-wrap:anywhere; }
.cr-history ul { margin:var(--space-50) 0 0; padding-left:var(--space-200); font-size:var(--text-sm); overflow-wrap:anywhere; }
.cr-import { margin-bottom:var(--space-200); }
.cr-problems { margin:0; padding-left:var(--space-250); font-size:var(--text-sm); overflow-wrap:anywhere; }
.cr-danger-link { color:var(--danger, var(--ink)); }
.rt-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--space-150) var(--space-200); }
.rt-grid .ai-field, .rt-row .ai-field { display:grid; gap:var(--space-50); min-width:0; }
.rt-grid input, .rt-grid select, .rt-row input[type="text"], .rt-row select, .rt-row textarea { width:100%; min-width:0; }
.rt-wide { grid-column:1 / -1; }
.rt-rows { margin:0 0 var(--space-150); padding:0; list-style:none; display:grid; gap:var(--space-100); }
.rt-row { display:flex; flex-wrap:wrap; gap:var(--space-150); align-items:flex-end; padding:var(--space-150); border:1px solid var(--line); border-radius:var(--radius-md); }
.rt-row > .ai-field { flex:1 1 12rem; }
.rt-row .rt-options { flex-basis:100%; }
.rt-moves, .rt-links { display:flex; flex-wrap:wrap; gap:var(--space-75) var(--space-150); margin:var(--space-150) 0; padding:var(--space-100) var(--space-150); border:1px solid var(--line); border-radius:var(--radius-md); min-width:0; }
.rt-moves { flex:1 1 100%; margin:0; }
.rta-table td, .rta-table th { vertical-align:top; }
.rta-fields .ai-field { display:grid; gap:var(--space-25); margin-top:var(--space-75); font-size:var(--text-xs); }
@media (max-width:700px) {
  .cr-form, .rt-grid { grid-template-columns:minmax(0, 1fr); }
  .cr-actions { width:100%; }
  .cr-filters > label, .cr-filters > details, .cr-filters > button { flex:1 1 100%; }
  .cr-filters select { width:100%; }
  /* The list on a phone: each record a card, each value under its column's name, nothing hidden off to the side. */
  .cr-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .rp-table.cr-table, .cr-table tbody { display:block; width:100%; min-width:0; }
  .cr-table tr { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--space-75) var(--space-150); padding:var(--space-150) 0; border-bottom:1px solid var(--line); }
  .rp-table.cr-table td { display:grid; justify-items:start; gap:var(--space-25); padding:0; border:0; min-width:0; overflow-wrap:anywhere; text-align:left; }
  .cr-table td::before { content:attr(data-label); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-semibold); }
  .cr-table td:nth-child(2) { grid-column:1 / -1; }
  .cr-title { min-width:0; }
}
.cr-form .ai-field input:not([type="checkbox"]):not([type="radio"]), .cr-form .ai-field select { min-height:var(--control-height); height:var(--control-height); box-sizing:border-box; }
.rec-modules-heading { margin:var(--space-300) 0 var(--space-100); font-size:var(--text-lg); }

/* ---- Custom records' approvals, rules and reports (GitHub issue 521) ---- */
.cr-approval .ar-run, .cr-approval p { overflow-wrap:anywhere; }
.rtr-recipients { flex:1 1 100%; margin:0; padding:0; list-style:none; display:grid; gap:var(--space-75); }
.rtr-recipient { display:flex; flex-wrap:wrap; gap:var(--space-150); align-items:flex-end; }
.rtr-recipient > .ai-field { flex:1 1 10rem; display:grid; gap:var(--space-50); min-width:0; }
.rtr-recipient select { width:100%; min-width:0; }
.rtr-action > .rt-links { flex:1 1 100%; margin:0; }
.rtr-action .cr-wide { flex-basis:100%; }
.rtr-days input { max-width:8rem; }
.crr-card .tableWrap { margin-top:var(--space-100); }
.crr-table td { vertical-align:middle; overflow-wrap:anywhere; }
.crr-bar { display:block; width:100%; min-width:6rem; height:.5rem; border-radius:999px; background:var(--line); overflow:hidden; }
.crr-bar + .crr-bar { margin-top:var(--space-50); }
.crr-bar > span { display:block; height:100%; border-radius:inherit; background:var(--spruce); }
.crr-bar.is-closed > span { background:var(--muted); }
@media (max-width:700px) {
  .crr-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .rp-table.crr-table, .crr-table tbody { display:block; width:100%; min-width:0; }
  .crr-table tr { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--space-75) var(--space-150); padding:var(--space-150) 0; border-bottom:1px solid var(--line); }
  .rp-table.crr-table td { display:grid; justify-items:start; gap:var(--space-25); padding:0; border:0; min-width:0; text-align:left; }
  .crr-table td[data-label]::before { content:attr(data-label); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-semibold); }
  .crr-table td:first-child, .crr-table td:last-child { grid-column:1 / -1; }
  .crr-table .nt-link { white-space:normal; text-align:left; }
}
