@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter.woff2") format("woff2");
}
/*
 * Shared BoomPay visual source of truth:
 * https://boompay.ca/brandguide.html
 * Product workflows may extend these tokens without redefining the brand.
 */
:root {
  --brand-red: #c8201e;
  --brand-red-hover: #a81c1e;
  --brand-red-disabled: #a34443;
  --brand-blue: #1e7fd6;
  /* Brand guide: body links and eyebrows below 18.7px bold on white. */
  --small-text-blue: #1769b8;
  --brand-ink: #0e1a2b;
  --brand-slate: #1c2c44;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-700: #334155;

  --red: var(--brand-red);
  --red-dark: var(--brand-red-hover);
  --green: #18864b;
  --amber: #9a6700;
  --ink: var(--brand-ink);
  --slate: var(--brand-slate);
  --line: var(--slate-200);
  --muted: var(--slate-700);
  --surface: #ffffff;
  --wash: var(--slate-50);
  --page-max: 72rem;
  --page-gutter: 20px;
  /* Brand guide: focus indicators need 3:1 against adjacent backgrounds. */
  --focus: #005fcc;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 0; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:where(main [href]) { color: var(--small-text-blue); }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: calc(100% - 24px);
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.skip-link:not(:focus) { clip-path: inset(50%); }
.topbar {
	position: static;
	z-index: 40;
  min-height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--page-max);
  min-height: 64px;
  margin: 0 auto;
  padding: 12px var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  min-height: 44px;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: contain;
}
.brand-copy,
.brand-copy span {
  display: block;
}
.brand-copy strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.brand-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}
nav a:hover,
nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--slate-50);
}
main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px var(--page-gutter) 56px;
}
main:focus { outline: none; }
.workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  padding: 6px 0 22px;
  border-bottom: 1px solid var(--line);
}
.workspace-header h1 {
  max-width: 780px;
  margin: 6px 0 10px;
  font-size: 38px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.workspace-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.workspace-header .snapshot-note {
  margin-top: 12px;
  font-size: 14px;
}
.eyebrow,
.page-intro .eyebrow,
.workspace-header .eyebrow,
.receivable-review .review-heading .eyebrow {
  margin: 0;
  color: var(--small-text-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em; /* Canonical letter-widest convention. */
  font-size: 0.875rem;
  font-weight: 600;
}
.eyebrow#contextual-eyebrow { overflow-wrap: anywhere; }
.status-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}
.status-strip div {
  min-height: 64px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.status-strip dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.status-strip dd {
	min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.admin-invite-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  margin-top: 20px;
}
.admin-card,
.invite-card {
  margin-top: 0;
}
.invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 22px;
  align-items: center;
  border-color: #b7c9dc;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.invite-action-card {
  grid-template-columns: 1fr;
}
.invite-card a {
  overflow-wrap: anywhere;
}
.invite-url {
  margin-bottom: 0;
  font-size: 14px;
}
.invite-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
}
.invite-meta div {
  min-width: 150px;
}
.invite-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.invite-meta dd {
  margin: 2px 0 0;
  font-weight: 800;
}
.invite-workspace {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  margin-top: 20px;
}
.invite-form {
  margin-top: 0;
}
.qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: center;
  margin-top: 20px;
}
.qr-copy p {
  color: var(--muted);
}
.step-label,
.qr-live {
  color: var(--small-text-blue);
  font-size: 13px;
  font-weight: 800;
}
.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.qr-code {
  display: flex;
  justify-content: center;
}
.qr-code img {
  width: min(100%, 360px);
  height: auto;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.email-panel {
  margin-top: 20px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.metric-card {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid #b7c9dc;
  border-radius: 8px;
}
.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.metric-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}
.counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.section-title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 20px;
}
.count-card,
.panel {
	min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.count-card {
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}
.count-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.count-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}
.count-card.ready { border-color: #87caa0; box-shadow: inset 0 4px 0 #87caa0; }
.count-card.attention { border-color: #e3bd65; box-shadow: inset 0 4px 0 #e3bd65; }
.count-card.risk { border-color: #d98b8b; box-shadow: inset 0 4px 0 #d98b8b; }
.count-card.active { border-color: #8fbce7; box-shadow: inset 0 4px 0 #8fbce7; }
.count-card.closed { background: #f8fafc; }

/* Compact overview for the administration dashboard. */
.operations-header {
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--line);
}
.operations-header h1 {
  max-width: 780px;
  margin: 6px 0 8px;
  font-size: 34px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.operations-header p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}
.operations-header .snapshot-note {
  margin-top: 8px;
  font-size: 13px;
}
.operations-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.operations-context div {
  min-width: 0;
  padding: 10px 14px;
}
.operations-context div + div { border-left: 1px solid var(--line); }
.operations-context dt,
.funding-facts dt,
.workflow-counts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.operations-context dt { text-transform: uppercase; }
.operations-context dd {
  margin: 3px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.funding-summary,
.workflow-summary {
  margin-top: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.funding-summary .section-title,
.workflow-summary .section-title {
  margin-bottom: 12px;
  font-size: 18px;
}
.funding-facts,
.workflow-counts {
  display: grid;
  margin: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  gap: 1px;
}
.funding-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.funding-facts div {
  min-width: 0;
  padding: 13px 14px;
  background: var(--surface);
}
.funding-facts .funding-value {
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
}
.funding-facts .funding-detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.workflow-counts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.workflow-count {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
}
.workflow-count dd {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.workflow-count.ready { box-shadow: inset 0 3px 0 #87caa0; }
.workflow-count.attention { box-shadow: inset 0 3px 0 #e3bd65; }
.workflow-count.risk { box-shadow: inset 0 3px 0 #d98b8b; }
.workflow-count.active { box-shadow: inset 0 3px 0 #8fbce7; }
.workflow-count.closed { background: #f8fafc; }
.panel h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.2; }
.panel p { color: var(--muted); line-height: 1.5; }
.panel { margin-top: 20px; }
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.panel-heading p {
  margin: 0;
}

/* Task-first administration pages keep reports available without making them the default UI. */
.admin-simple main {
  max-width: var(--page-max);
  padding-top: 18px;
}
.page-intro {
  padding: 8px 0 18px;
}
.daily-briefing {
  margin: 0 0 18px;
  padding: 16px;
  color: #0f5132;
  background: #f2fbf6;
  border: 1px solid #9dceb3;
  border-radius: 8px;
}
.daily-briefing h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}
.daily-briefing p {
  max-width: 880px;
  margin: 6px 0 0;
  line-height: 1.5;
}
.daily-briefing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.daily-briefing-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--small-text-blue);
  background: var(--surface);
  border: 1px solid #9dceb3;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}
.daily-weather {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}

.daily-briefing-datetime {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.2rem 0 0.65rem;
}
.daily-weather button {
  min-height: 40px;
  padding: 8px 12px;
  color: #fff;
  background: var(--small-text-blue);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.daily-weather-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.page-intro h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.page-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.page-intro .stage-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--ink);
  font-size: 14px;
}
.report-drawer {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.report-drawer > summary {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 48px 12px 16px;
  cursor: pointer;
  font-weight: 800;
}
.report-drawer > summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  content: "+";
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
}
.report-drawer[open] > summary::after {
  content: "−";
}
.report-drawer > summary small {
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}
.report-content {
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}
.admin-simple .panel:not(.operation-form):not(.profile-review) {
  background: transparent;
  border: 0;
  padding: 0;
}
.admin-simple .files-panel {
  margin-top: 22px;
}
.admin-simple .panel-heading {
  margin-bottom: 10px;
}
.admin-simple .record-section {
  padding: 20px 0;
}
.admin-simple .record-tabs {
  position: static;
  margin-top: 0;
}
.progress-cell span,
.row-details dl div {
  display: block;
}
.row-details {
  margin-top: 8px;
}
.row-details summary {
  color: var(--small-text-blue);
  font-size: 13px;
  font-weight: 800;
}
.row-details dl {
  margin: 8px 0 0;
  font-size: 13px;
}
.row-details dt {
  color: var(--muted);
  font-weight: 700;
}
.row-details dd {
  margin: 0 0 6px;
}
.safety-line {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.admin-simple .operations-grid {
  max-width: 760px;
  grid-template-columns: 1fr;
}
.admin-simple .operation-form {
  margin-top: 16px;
}
.admin-simple .compact-metrics .metric-card {
  min-height: auto;
  padding: 14px;
  border-top-width: 1px;
}
.admin-simple table {
  min-width: 720px;
}
@media (max-width: 640px) {
  .admin-simple main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .page-intro h1 {
    font-size: 28px;
  }
  .report-drawer > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .report-drawer > summary small {
    text-align: left;
  }
}

.garage-admin {
  max-width: var(--page-max);
}
.record-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  justify-content: flex-start;
  margin: 0 calc(-1 * var(--page-gutter));
  padding: 10px var(--page-gutter);
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.record-tabs a {
  border-bottom: 3px solid transparent;
  border-radius: 4px 4px 0 0;
}
.record-tabs a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  border-bottom-color: var(--brand-blue);
}
.record-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.record-section:last-child {
  border-bottom: 0;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.section-heading h2 {
  margin: 4px 0 0;
  font-size: 24px;
}
.section-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.admin-detail-grid div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.admin-detail-grid div:nth-child(3n) {
  border-right: 0;
}
.admin-detail-grid dt,
.raw-record dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-detail-grid dd,
.raw-record dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
.admin-detail-grid dd .subtle {
	margin-top: 6px;
	font-weight: 500;
	text-transform: none;
}
.admin-file-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.admin-file-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content max-content max-content;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.admin-file-row:last-child {
  border-bottom: 0;
}
.admin-file-primary {
  min-width: 0;
}
.admin-file-primary strong,
.admin-file-primary span {
  display: block;
  overflow-wrap: anywhere;
}
.admin-file-primary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}
.admin-file-details {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
details summary {
  color: var(--small-text-blue);
  cursor: pointer;
  font-weight: 750;
}
.raw-record {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.raw-record div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.raw-record div:nth-child(2n) {
  border-right: 0;
}
.activity-timeline li > div { min-width: 0; overflow-wrap: anywhere; }

.raw-record code,
td code,
.admin-timeline code {
  display: inline-block;
  max-width: 100%;
  color: var(--slate);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.admin-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-timeline li {
  position: relative;
  padding: 16px 18px 16px 42px;
  border-bottom: 1px solid var(--line);
}
.admin-timeline li:last-child {
  border-bottom: 0;
}
.admin-timeline li::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 18px;
  width: 9px;
  height: 9px;
  background: var(--brand-blue);
  border-radius: 50%;
}
.admin-timeline strong,
.admin-timeline span {
  display: block;
}
.admin-timeline span,
.admin-timeline p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.admin-timeline details {
  margin-top: 10px;
}
.retention-notice {
  margin-top: 24px;
  border-color: #b7c9dc;
  border-left: 4px solid var(--brand-blue);
  background: #f8fbff;
}

@media (max-width: 900px) {
  .admin-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-detail-grid div:nth-child(3n) { border-right: 1px solid var(--line); }
  .admin-detail-grid div:nth-child(2n) { border-right: 0; }
  .admin-file-row { grid-template-columns: minmax(0, 1fr) max-content; }
  .admin-file-details { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .record-tabs {
    position: static;
    margin: 0 -18px;
    padding: 8px 18px;
    overflow: visible;
    flex-wrap: wrap;
  }
  .record-tabs a {
    flex: 1 1 calc(33.333% - 6px);
    justify-content: center;
    white-space: normal;
  }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-heading > p { text-align: left; }
  .admin-detail-grid,
  .raw-record { grid-template-columns: 1fr; }
  .admin-detail-grid div,
  .admin-detail-grid div:nth-child(2n),
  .admin-detail-grid div:nth-child(3n),
  .raw-record div,
  .raw-record div:nth-child(2n) { border-right: 0; }
  .admin-file-row { grid-template-columns: 1fr; align-items: start; }
  .admin-file-details { grid-column: 1; }
  .people-table {
    min-width: 0;
  }
  .people-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .people-table,
  .people-table tbody,
  .people-table tr,
  .people-table th,
  .people-table td {
    display: block;
    width: 100%;
  }
  .people-table tbody tr {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }
  .people-table tbody tr:last-child {
    border-bottom: 0;
  }
  .people-table tbody th {
    padding: 14px;
    white-space: normal;
    background: #f7f9fc;
  }
  .people-table td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 0;
  }
  .people-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .people-table .empty {
    display: block;
  }
  .people-table .empty::before {
    content: none;
  }
}
.mode-pill {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #b7c9dc;
  border-radius: 999px;
  background: #eef5fc;
  color: var(--small-text-blue);
  font-size: 12px;
  font-weight: 800;
}
.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(14, 26, 43, 0.04);
  scrollbar-color: var(--slate-300) transparent;
}
table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}
thead th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  background: var(--slate-50);
}
tbody tr:nth-child(even) { background: #fbfcfe; }
tbody tr:hover {
  background: #f2f7fc;
}
tbody th {
  white-space: nowrap;
}
.data-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 var(--line);
}
.data-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}
.data-table tbody tr:nth-child(even) th:first-child { background: #fbfcfe; }
.data-table tbody tr:hover th:first-child { background: #f2f7fc; }
.data-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table tbody tr:last-child > * { border-bottom: 0; }
.funding-files-table { min-width: 760px; }
.funding-files-table th:first-child { width: 46%; }
.funding-files-table th:nth-child(2) { width: 16%; }
.funding-files-table th:nth-child(3) { width: 25%; }
.funding-files-table th:last-child { width: 13%; }
.file-context,
.file-customer {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.file-context {
  max-width: 44ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-context a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-customer { white-space: normal; }
.subtle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.status-tag {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid #c7d0dd;
  border-radius: 999px;
  background: #f6f8fb;
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .table-wrap:has(.data-table) {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }
  .admin-simple .data-table {
    min-width: 0;
    background: transparent;
  }
  .funding-files-table { min-width: 0; }
  .file-context { max-width: 100%; }
  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .data-table tbody {
    display: grid;
    gap: 12px;
  }
  .data-table tbody tr,
  .data-table tbody tr:nth-child(even),
  .data-table tbody tr:hover {
    overflow: hidden;
    padding: 0 16px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(14, 26, 43, 0.04);
  }
  .data-table tbody th:first-child,
  .data-table tbody tr:nth-child(even) th:first-child,
  .data-table tbody tr:hover th:first-child {
    position: static;
    margin: 0 -16px 8px;
    width: auto;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--slate-50);
    box-shadow: none;
    white-space: normal;
  }
  .data-table tbody td {
    display: grid;
    grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--slate-100);
    overflow-wrap: anywhere;
  }
  .data-table tbody td:last-child { border-bottom: 0; }
  .data-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
  }
  .data-table .numeric { text-align: left; }
  .data-table .empty {
    display: block;
    margin: 0;
    padding: 18px 16px;
    border: 0;
    background: transparent;
  }
  .data-table .empty::before { content: none; }
}
.status-tag.good {
  border-color: #9dceb3;
  background: #eef9f3;
  color: #0f6b3a;
}
.status-tag.warn {
  border-color: #e6c77a;
  background: #fff8e8;
  color: #7a5200;
}
.status-tag.bad {
  border-color: #e2a0a0;
  background: #fff1f1;
  color: #9c1d1d;
}
.status-tag.muted {
  border-color: #cfd7e2;
  background: #f7f9fc;
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.detail-list {
  margin: 0;
}
.detail-list.compact div {
  grid-template-columns: 110px minmax(0, 1fr);
  padding: 9px 0;
}
.detail-list div {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}
.detail-list dd {
	min-width: 0;
  margin: 0;
	overflow-wrap: anywhere;
}
.detail-list dd span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}
.queue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
}
.queue-list,
.document-list {
  display: grid;
  gap: 12px;
}
.queue-list article,
.document-list article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.queue-list article:has(.status-tag.bad),
.document-list article:has(.status-tag.bad) {
  border-left: 4px solid #d98b8b;
}
.queue-list article:has(.status-tag.warn),
.document-list article:has(.status-tag.warn) {
  border-left: 4px solid #e3bd65;
}
.queue-list article {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
}
.queue-list p,
.document-list p {
  margin: 4px 0 0;
  color: var(--muted);
}
.queue-list dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.queue-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.queue-list dd {
  margin: 3px 0 0;
  font-weight: 800;
}
.document-list article {
  grid-template-columns: 110px 140px minmax(0, 1fr) 86px;
  align-items: start;
}
.document-list span {
  font-weight: 800;
}
.document-list small {
  color: var(--muted);
  font-weight: 800;
}
.event-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 20px;
}
/* Retained history values must wrap at enlarged browser default fonts. */
.review-history,
.purchase-history {
  min-width: 0;
  overflow-wrap: anywhere;
}
.review-history .event-list,
.purchase-history .event-list {
  grid-template-columns: minmax(0, 1fr);
}
.event-list li {
  line-height: 1.5;
}
.event-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.operations-summary .detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
}
.operations-summary .detail-list div {
  grid-template-columns: 1fr;
  gap: 4px;
}
.customer-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
}
.customer-facts div {
  grid-template-columns: 1fr;
  gap: 4px;
}
.notice.warning {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid #e3bd65;
  background: #fff8e8;
  color: #6d4900;
}
.notice.warning h3,
.customer-note h3 { margin: 0 0 8px; font-size: 15px; }
.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding-left: 20px;
}
.customer-note {
  margin-top: 16px;
  padding-left: 16px;
  border-left: 4px solid #8fbce7;
}
.customer-note p { margin: 0; color: var(--ink); }
.garage-documents article {
  grid-template-columns: minmax(180px, 0.8fr) 150px minmax(0, 1fr);
  align-items: center;
}
.garage-confirmed-details pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.records-grid .panel { margin-top: 0; }
.records-panel > h2 { margin-bottom: 16px; }
.records-panel .garage-documents article {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.agreement-list article {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}
.record-link {
  color: var(--small-text-blue);
  font-weight: 800;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.record-link.secondary { color: var(--muted); }
.operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.operation-form {
  display: grid;
  align-content: start;
  gap: 14px;
  margin-top: 0;
}
.operation-form h2 { margin-bottom: 0; }
.onboarding-exception-review > form + form { margin-top: 1.5rem; }
.operation-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.operation-form input,
.operation-form select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #7a8798;
  border-radius: 8px;
  font: inherit;
}
.profile-review-form {
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1fr);
  align-items: end;
  margin-top: 16px;
}
.profile-review-form h3 {
  grid-column: 1 / -1;
  margin: 0;
}
.inline-review-form {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.garage-documents article > .inline-review-form,
.inline-review-form > p { grid-column: 1 / -1; }
.inline-review-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.inline-review-form input,
.inline-review-form select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b7c1cd;
  border-radius: 8px;
  font: inherit;
}
.note-panel {
  border-color: #b7c9dc;
}
.claim-main {
	width: 100%;
  max-width: 1180px;
}
.claim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  margin-top: 20px;
}
.partner-claim-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}
.partner-start-card,
.handoff-rules {
  margin-top: 0;
}
.partner-progress {
	grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}
.claim-card {
	min-width: 0;
  margin-top: 20px;
}
.claim-card label {
	min-width: 0;
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--ink);
  font-weight: 800;
}
.claim-card input,
.claim-card select,
.claim-card textarea {
	min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid #b7c1cd;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.claim-card textarea { min-height: 112px; resize: vertical; }
.claim-card input:focus,
.claim-card select:focus,
.claim-card textarea:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  max-width: 100%;
}
.journey-actions .action {
  min-width: min(220px, 100%);
  max-width: 100%;
  margin-top: 0;
  overflow-wrap: anywhere;
}
.table-action {
  min-width: max-content;
  padding: 10px 14px;
}
.action,
.button-link,
:where(.admin-simple main form button[type="submit"]:not([class], [hidden], .staff-decision *)) {
	appearance: none;
	-webkit-appearance: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: var(--red);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.action,
.button-link { margin-top: 18px; }

.action:hover:not(:disabled):not([aria-disabled="true"]),
.button-link:hover,
:where(.admin-simple main form button[type="submit"]:not([class], [hidden], .staff-decision *, :disabled):hover) {
	background: var(--red-dark);
}

.action:focus-visible,
.button-link:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
	box-shadow: 0 0 0 2px var(--surface);
}

.action:disabled,
.action[aria-disabled="true"],
:where(.admin-simple main form button[type="submit"]:not([class], [hidden], .staff-decision *):disabled) {
	opacity: 0.52;
	cursor: not-allowed;
	pointer-events: none;
}

.action--secondary,
.button-link.secondary {
	margin-top: 0;
	background: var(--surface);
	color: var(--muted);
	border: 1px solid var(--slate-300);
}
/* Form actions follow the fields at their natural width and wrap with the form. */
:is(.operation-form, .inline-review-form) button:is([type="submit"], .staff-confirmation-trigger):not([hidden]) {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
:is(.operation-form, .inline-review-form) > button.action { margin-top: 0; }
:is(.profile-review-form, .inline-review-form) > button:is([type="submit"], .staff-confirmation-trigger):not([hidden]) { grid-column: 1 / -1; }
.registration-packet .operation-form button.action { margin-top: .75rem; }
.operation-form button.action:not(.action--secondary):disabled,
.operation-form button.action:not(.action--secondary)[aria-disabled="true"] {
  border-color: var(--brand-red-disabled);
  background: var(--brand-red-disabled);
  color: #fff;
  opacity: 1;
}
@media (max-width: 639px) {
  :is(.operation-form, .inline-review-form) button:is([type="submit"], .staff-confirmation-trigger):not([hidden]):not(.action--secondary) { width: 100%; }
}
.action-explanation {
	display: block;
	margin-top: 8px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.45;
}
.restart-control {
	display: grid;
	gap: 4px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}
.restart-control h3 {
	margin: 0 0 4px;
	font-size: 16px;
}
.restart-control .action {
	justify-self: start;
	margin-top: 0;
}
.restart-control small,
.form-grid label > small {
	color: var(--muted);
	font-weight: 500;
	line-height: 1.4;
}
.onboarding-fieldset {
	min-width: 0;
	margin: 18px 0 0;
	padding: 0 16px 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
}
.onboarding-fieldset legend {
	padding: 0 6px;
	font-weight: 850;
}
.submitted-review {
	border-top: 4px solid var(--amber);
}

.action--secondary:hover:not(:disabled):not([aria-disabled="true"]),
.button-link.secondary:hover {
	background: var(--slate-50);
	border-color: var(--slate-300);
}

@media (max-width: 600px) {
	.action,
	.button-link {
		width: 100%;
	}
}
.form-error {
  color: var(--red-dark);
  font-weight: 800;
}
.rule-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  line-height: 1.5;
}
.onboarding-hub {
  padding: 24px;
}
.funnel-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}
.funnel-steps.partner-progress {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.funnel-steps article {
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.funnel-steps article span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dbe4ef;
  color: var(--slate);
  font-weight: 900;
}
.funnel-steps article strong {
  line-height: 1.2;
	overflow-wrap: anywhere;
	white-space: normal;
}
.funnel-steps article small {
  color: var(--muted);
  font-weight: 800;
	overflow-wrap: anywhere;
	white-space: normal;
}
.funnel-steps article.complete {
  border-color: #9dceb3;
  background: #f2fbf6;
}
.funnel-steps article.complete span {
  background: #18864b;
  color: #fff;
}
.funnel-steps article.active {
  border-color: #8fbce7;
  box-shadow: inset 0 4px 0 #8fbce7;
  background: #f5faff;
}
.funnel-steps article.active span {
  background: var(--small-text-blue);
  color: #fff;
}

.admin-workspace-section > summary,
.review-stage > summary,
.decision-branch > summary,
.review-details > summary,
.review-queue-item > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 52px;
	cursor: pointer;
	font-weight: 800;
}
.admin-workspace-section > summary,
.review-stage > summary {
	margin: -22px;
	padding: 16px 22px;
}
.admin-workspace-section[open] > summary,
.review-stage[open] > summary {
	margin-bottom: 0;
	border-bottom: 1px solid var(--line);
}
.admin-workspace-section > summary small,
.review-stage > summary small {
	color: var(--muted);
	font-weight: 600;
	text-align: right;
}
.admin-workspace-content,
.review-stage-content,
.review-details-content {
	padding-top: 18px;
}
.review-queue-list,
.decision-workspace {
	display: grid;
	gap: 12px;
}
.review-queue-item,
.decision-branch,
.review-details {
	min-width: 0;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #f8fafc;
}
.review-queue-item > summary span:first-child,
.review-queue-item > summary small {
	display: block;
}
.review-queue-item > summary span:first-child {
	min-width: 0;
	overflow-wrap: anywhere;
}
.review-queue-item > summary small {
	margin-top: 3px;
	color: var(--muted);
}
.review-queue-item[open],
.decision-branch[open],
.review-details[open] {
	background: var(--surface);
}
.review-queue-item > .action {
	margin: 0 0 16px;
}
.review-details {
	margin-top: 16px;
}
.review-details > summary,
.decision-branch > summary {
	padding: 13px 0;
}
.review-details-content {
	padding-bottom: 16px;
}
.approval-boundary {
	margin-top: 18px;
}
.approval-boundary .rule-list {
	margin-bottom: 0;
}
.review-stage > summary .eyebrow {
	display: block;
	margin-bottom: 4px;
}
.review-stage-content {
	padding-bottom: 0;
}
.decision-workspace {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.decision-branch form {
  margin: 0;
  padding: 0 0 16px;
  border: 0;
  background: transparent;
}
.decision-branch h3 {
	margin: 16px 0 0;
}
.review-stage--current {
	border-color: #8fbce7;
	box-shadow: inset 4px 0 0 #8fbce7;
}
.review-stage--complete {
	border-color: #9dceb3;
	background: #f2fbf6;
}
.readonly-email {
	text-overflow: clip;
}
.task-handoff {
	padding: 12px 14px;
	border-left: 4px solid var(--red);
	background: #fff7f6;
}

@media (max-width: 700px) {
	.lifecycle-table {
		min-width: 0;
	}
	.lifecycle-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		border: 0;
	}
	.lifecycle-table tbody,
	.lifecycle-table tr,
	.lifecycle-table td {
		display: block;
		width: 100%;
	}
	.lifecycle-table tr {
		margin-bottom: 14px;
		border: 1px solid var(--line);
		border-radius: 8px;
		overflow: hidden;
	}
	.lifecycle-table td {
		min-width: 0;
		padding: 12px 14px;
		overflow-wrap: anywhere;
	}
	.lifecycle-table td::before {
		display: block;
		margin-bottom: 4px;
		content: attr(data-label);
		color: var(--muted);
		font-size: 11px;
		font-weight: 800;
		text-transform: uppercase;
	}
}
.onboarding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}
.onboarding-form,
.onboarding-side {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.onboarding-form h3,
.onboarding-side h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.check-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.check-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.check-list input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
  flex: 0 0 auto;
}
.onboarding-side {
  display: grid;
  gap: 18px;
}
.onboarding-side section + section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.onboarding-side p {
  margin: 0;
}
.partner-portfolio {
  margin-top: 20px;
}
.portfolio-metrics {
  margin-top: 18px;
}
.portfolio-table {
  margin-top: 18px;
}
.portfolio-table table {
  min-width: 860px;
}
.notice {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.notice h2,
.notice h3,
.notice p {
  margin-top: 0;
}
.notice p:last-child {
  margin-bottom: 0;
}
.notice.good {
  border-color: #8fc8a4;
  background: #f2fbf6;
}
.partner-create {
  display: block;
  padding: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.operation-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #7a8798;
  border-radius: 8px;
  font: inherit;
}
.form-grid textarea,
.operation-form textarea { min-height: 112px; resize: vertical; }
.form-grid textarea:focus-visible,
.operation-form textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-grid button {
	grid-column: 1 / -1;
}
.form-grid .wide {
  grid-column: span 2;
}
.form-grid button {
  align-self: end;
}
.inline-admin-form {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.allocation-list {
  display: grid;
  gap: 14px;
}
.allocation-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(480px, 1.4fr);
  gap: 20px;
  align-items: end;
  margin-top: 0;
  padding: 18px;
}
.allocation-card p {
  margin: 5px 0;
}
.allocation-card small {
  color: var(--muted);
}
.allocation-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}
.allocation-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.allocation-form input,
.allocation-form select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #7a8798;
  border-radius: 8px;
  font: inherit;
}
.allocation-form button {
	align-self: end;
}
@media (max-width: 840px) {
  html { scroll-padding-top: 0; }
  .topbar { position: static; }
  .topbar-inner {
    align-items: flex-start;
    min-height: auto;
    padding: 16px;
    flex-direction: column;
    gap: 14px;
  }
  nav {
    width: 100%;
    justify-content: flex-start;
  }
  main { padding: 26px 16px 40px; }
  .workspace-header {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 24px;
  }
  .workspace-header h1 { font-size: 30px; }
  .workspace-header p { font-size: 16px; }
  .admin-invite-grid,
  .invite-card,
  .invite-workspace,
  .qr-panel,
  .claim-layout,
  .onboarding-grid,
  .field-grid,
  .form-grid,
  .allocation-card,
  .allocation-form,
  .inline-admin-form {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-header h1 { font-size: 30px; }
  .funding-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics,
  .detail-grid,
  .queue-grid,
	.funnel-steps,
	.operations-grid,
	.records-grid,
	.inline-review-form,
	.profile-review-form,
	.customer-facts,
	.operations-summary .detail-list { grid-template-columns: 1fr; }
  .queue-list article,
  .document-list article { grid-template-columns: 1fr; }
  .panel-heading { flex-direction: column; }
  .detail-list div { grid-template-columns: 1fr; gap: 4px; }
	.decision-workspace { grid-template-columns: 1fr; }
	.funnel-steps.partner-progress {
		grid-template-columns: minmax(0, 1fr);
	}
	.funnel-steps.partner-progress article {
		min-height: 0;
		overflow: visible;
	}
	.admin-workspace-section > summary,
	.review-stage > summary {
		align-items: flex-start;
		flex-direction: column;
		gap: 5px;
	}
	.admin-workspace-section > summary small,
	.review-stage > summary small { text-align: left; }
	.table-action { min-width: 0; }
}
@media (max-width: 420px) {
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  nav a {
    flex: 1 1 calc(33.333% - 6px);
    justify-content: center;
  }
  .counts { grid-template-columns: 1fr; }
  .operations-context { grid-template-columns: 1fr; }
  .operations-context div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .funding-facts { grid-template-columns: 1fr; }
  .workflow-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funding-summary,
  .workflow-summary { padding: 12px; }
  .workflow-count { padding: 11px 10px; }
  .workspace-header h1 { font-size: 26px; }
  .operations-header h1 { font-size: 26px; }
}

/* Scoped capital-partner workspace. */
.portfolio-body {
  --portfolio-navy: #111d31;
  --portfolio-navy-soft: #1b2a43;
  --portfolio-red: #c8201e;
  --portfolio-green: #167849;
  --portfolio-blue: #1969a9;
  background: var(--wash);
}
.portfolio-topbar {
  box-shadow: 0 1px 0 rgba(17, 29, 49, 0.04);
}
.portfolio-topbar .topbar-inner {
  min-height: 64px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.portfolio-topbar .brand-logo {
  width: 40px;
  height: 40px;
}
.portfolio-topbar .topbar-inner,
.portfolio-main {
  max-width: 1320px;
}
.portfolio-main {
  padding-top: 22px;
}
.portfolio-toast {
  margin-bottom: 18px;
  padding: 13px 16px;
  color: #105d38;
  background: #eaf7f0;
  border: 1px solid #a9d8be;
  border-radius: 10px;
}
.portfolio-form-error {
  margin-bottom: 18px;
  padding: 13px 16px;
  color: #7c1c1b;
  background: #fff1f0;
  border: 1px solid #d9a7a4;
  border-radius: 10px;
}
.portfolio-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 2px 18px;
}
.portfolio-workspace-header h1 {
  margin: 0 0 4px;
  color: var(--portfolio-navy);
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.portfolio-workspace-header p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.capital-position-panel {
  padding: 24px 26px 22px;
  background: #fff;
  border: 1px solid #dce1e8;
  border-radius: 14px;
}
.capital-position-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.capital-position-heading h2 {
  margin: 0;
  color: var(--portfolio-navy);
  font-size: 23px;
  letter-spacing: -0.025em;
}
.capital-file-count {
  padding-top: 4px;
  color: #657285;
  font-size: 13px;
  font-weight: 700;
}
.capital-primary-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: #f7f8fa;
  border: 1px solid #e0e4ea;
  border-radius: 11px;
}
.capital-primary-values article {
  min-width: 0;
  padding: 24px 26px 22px;
}
.capital-primary-values article + article {
  border-left: 1px solid #e0e4ea;
}
.capital-primary-values span,
.capital-primary-values small {
  display: block;
}
.capital-primary-values span {
  color: #4f5f72;
  font-size: 13px;
  font-weight: 700;
}
.capital-primary-values strong {
  display: block;
  margin: 8px 0 7px;
  color: var(--portfolio-navy);
  font-size: clamp(32px, 3.5vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.capital-primary-values small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.capital-deployment-row {
  padding: 23px 2px 22px;
  border-bottom: 1px solid #e3e7ed;
}
.deployment-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}
.deployment-label span {
  color: #4f5f72;
  font-size: 13px;
  font-weight: 700;
}
.deployment-label strong {
  color: var(--portfolio-navy);
  font-size: 17px;
}
.capital-deployment-row progress {
  width: 100%;
  height: 9px;
  display: block;
  overflow: hidden;
  margin: 10px 0 8px;
  appearance: none;
  background: #e7ebf0;
  border: 0;
  border-radius: 999px;
}
.capital-deployment-row progress::-webkit-progress-bar {
  background: #e7ebf0;
  border-radius: 999px;
}
.capital-deployment-row progress::-webkit-progress-value {
  background: var(--portfolio-blue);
  border-radius: 999px;
}
.capital-deployment-row progress::-moz-progress-bar {
  background: var(--portfolio-blue);
  border-radius: 999px;
}
.capital-deployment-row small {
  color: var(--muted);
  font-size: 12px;
}
.capital-detail-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding-top: 20px;
}
.capital-detail-list div {
  min-width: 0;
  padding: 1px 20px;
}
.capital-detail-list div:first-child {
  padding-left: 2px;
}
.capital-detail-list div + div {
  border-left: 1px solid #e3e7ed;
}
.capital-detail-list dt {
  color: #697588;
  font-size: 12px;
  font-weight: 700;
}
.capital-detail-list dd {
  margin: 7px 0 0;
  color: var(--portfolio-navy);
  font-size: 20px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.capital-detail-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.portfolio-card {
  margin-top: 14px;
  padding: 25px;
  background: #fff;
  border: 1px solid #dce2eb;
  border-radius: 12px;
}
.portfolio-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.portfolio-card-heading h2 {
  margin: 0;
  color: var(--portfolio-navy);
  font-size: 23px;
  letter-spacing: -0.02em;
}
.portfolio-card-heading p {
  margin: 7px 0 0;
  color: #657285;
  line-height: 1.5;
}
.count-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #46566c;
  background: #f1f4f8;
  border: 1px solid #dce2eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.service-account-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid #e6eaf0;
}
.service-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 70px;
  padding: 12px 0;
  border-bottom: 1px solid #e6eaf0;
}
.service-account-copy strong,
.service-account-copy span {
  display: block;
}
.service-account-copy strong {
  color: var(--portfolio-navy);
  font-size: 14px;
}
.service-account-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.service-account-state {
  text-align: right;
}
.portfolio-wide-card {
  padding-bottom: 20px;
}
.portfolio-data-table {
  margin: 22px -25px -20px;
  border-top: 1px solid #e1e6ed;
}
.portfolio-data-table table {
  min-width: 900px;
}
.portfolio-data-table th,
.portfolio-data-table td {
  padding: 15px 17px;
}
.portfolio-data-table thead th:first-child,
.portfolio-data-table tbody th:first-child,
.portfolio-data-table tbody td:first-child {
  padding-left: 25px;
}
.portfolio-data-table thead th:last-child,
.portfolio-data-table tbody td:last-child {
  padding-right: 25px;
}
.portfolio-empty {
  min-height: 126px;
  margin-top: 20px;
  padding: 24px;
  color: #58667a;
  background: #f7f9fb;
  border-radius: 9px;
}
.portfolio-empty.compact {
  min-height: 96px;
  padding: 20px;
}
.portfolio-empty h3 {
  margin: 0 0 5px;
  color: var(--portfolio-navy);
  font-size: 17px;
}
.portfolio-empty p {
  max-width: 720px;
  margin: 0;
  line-height: 1.5;
}
.portfolio-records-empty {
  margin-top: 18px;
  padding: 18px 2px;
  border-top: 1px solid #dce2eb;
  border-bottom: 1px solid #dce2eb;
}
.portfolio-records-empty h2 {
  margin: 0 0 5px;
  color: var(--portfolio-navy);
  font-size: 17px;
}
.portfolio-records-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.manage-capital {
  padding: 0;
  overflow: hidden;
  border-color: #dce2eb;
}
.manage-capital > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 25px;
  cursor: pointer;
  list-style: none;
  background: #fff;
}
.manage-capital > summary::-webkit-details-marker { display: none; }
.manage-capital > summary span,
.manage-capital > summary strong {
  display: block;
}
.manage-capital > summary strong {
  color: var(--portfolio-navy);
  font-size: 17px;
}
.summary-action {
  color: var(--small-text-blue);
  font-size: 13px;
  font-weight: 800;
}
.summary-action::after { content: "Show"; }
.manage-capital[open] .summary-action::after { content: "Hide"; }
.manage-capital-body {
  display: grid;
  gap: 0;
}
.manage-capital-body > section {
  padding: 25px;
  border-top: 1px solid #e1e6ed;
}
.manage-heading h2 {
  margin: 0;
  font-size: 19px;
}
.manage-heading p {
  margin: 6px 0 0;
  color: #637185;
}
.portfolio-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.portfolio-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.field-optional {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.portfolio-form .wide {
  grid-column: span 2;
}
.portfolio-form button {
  align-self: end;
}
.portfolio-footer {
  padding: 24px 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.portfolio-access-main {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  padding-block: 34px 48px;
}
@media (max-width: 840px) {
  .portfolio-access-main { padding-block: 26px 40px; }
}
.portfolio-access-state {
  text-align: left;
}
.portfolio-access-state h1 {
  margin: 8px 0 13px;
  color: var(--portfolio-navy);
  font-size: 32px;
  letter-spacing: -0.035em;
}
.portfolio-access-state > p:not(.eyebrow) {
  color: #627084;
  line-height: 1.55;
}
.access-account {
  display: inline-block;
  margin: 10px 0 0;
  padding: 9px 12px;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 13px;
}
.access-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 24px;
}
.access-actions .action {
	margin-top: 0;
}
.primary-action,
.secondary-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}
.primary-action {
  color: #fff;
  background: var(--portfolio-navy);
}
.secondary-action {
  color: var(--portfolio-navy);
  background: #fff;
  border: 1px solid #cbd3de;
}
.access-help {
  margin: 22px 0 0;
  font-size: 12px;
}

@media (max-width: 980px) {
  .capital-detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 0;
  }
  .capital-detail-list div:nth-child(3) {
    padding-left: 2px;
    border-left: 0;
  }
}
@media (max-width: 840px) {
  .portfolio-topbar .topbar-inner {
    min-height: 64px;
    padding: 6px 16px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }
  .portfolio-topbar .brand {
    min-width: 0;
  }
  .portfolio-topbar nav {
    width: auto;
    margin-left: auto;
  }
  .portfolio-topbar nav a {
    flex: 0 0 auto;
  }
}
@media (max-width: 700px) {
  .portfolio-main { padding-top: 16px; }
  .portfolio-workspace-header,
  .capital-position-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .capital-position-panel { padding: 22px 20px; }
  .capital-primary-values,
  .portfolio-form { grid-template-columns: 1fr; }
  .capital-primary-values article + article {
    border-top: 1px solid #e0e4ea;
    border-left: 0;
  }
  .portfolio-form .wide { grid-column: auto; }
  .portfolio-card { padding: 20px; }
  .portfolio-data-table { margin-left: -20px; margin-right: -20px; }
  .service-account-row { grid-template-columns: 1fr; gap: 9px; }
  .service-account-state { text-align: left; }
  .portfolio-card-heading { flex-direction: column; }
  .access-actions { flex-direction: column; }
}
@media (max-width: 460px) {
  .capital-detail-list { grid-template-columns: 1fr; }
  .capital-detail-list div,
  .capital-detail-list div:first-child,
  .capital-detail-list div:nth-child(3) {
    padding: 12px 0;
    border-top: 1px solid #e3e7ed;
    border-left: 0;
  }
  .capital-detail-list div:first-child { border-top: 0; }
}

@media (max-width: 600px) {
  .journey-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .journey-actions .action {
    min-width: 0;
    width: 100%;
  }
}
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-top: 20px; }
.metric-grid > .metric-card { min-width: 0; overflow-wrap: anywhere; }

.navigation-menu > summary::-webkit-details-marker { display: none; }
.navigation-dropdown a { justify-content: flex-start; }
.breadcrumb-bar { display: block; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-gutter); background: var(--wash); }
.breadcrumb-bar:has(li:nth-child(3)) { position: sticky; top: 0; z-index: 30; }
body:has(.breadcrumb-bar li:nth-child(3)) main [id]:target { scroll-margin-top: 260px; }
.breadcrumb-bar ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0; list-style: none; margin: 0; padding: 6px 0; }
.breadcrumb-bar li { display: inline-flex; align-items: baseline; min-width: 0; max-width: 100%; }
.breadcrumb-separator { flex: 0 0 auto; color: var(--muted); padding: 0 10px; }
.breadcrumb-bar a, .breadcrumb-bar [aria-current="page"] { display: inline-block; min-height: 44px; padding: 10px 0; font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.breadcrumb-bar a { color: var(--small-text-blue); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb-bar a:hover { color: var(--small-text-blue); }
.breadcrumb-bar [aria-current="page"] { color: var(--ink); font-weight: 700; }
.breadcrumb-bar a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.briefing-loading-dots { display: inline-flex; gap: 4px; margin-right: 6px; }
.briefing-loading-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: briefing-pulse 0.8s ease-in-out infinite alternate; }
.briefing-loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.briefing-loading-dots i:nth-child(3) { animation-delay: 0.3s; }
.daily-weather-credit { font-size: 11px; opacity: 0.75; flex-basis: 100%; }
@keyframes briefing-pulse { from { opacity: 0.25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .briefing-loading-dots i { animation: none; } }

.servicing-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.servicing-totals dt { color: var(--muted, #526174); }
.servicing-totals dd { margin: 6px 0 0; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.loan-servicing progress { display: block; width: 100%; height: 18px; margin: 10px 0; accent-color: #1767a6; }
.loan-servicing dd, .servicing-payments details { overflow-wrap: anywhere; }
.servicing-payments .numeric { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .servicing-totals { grid-template-columns: 1fr; gap: 16px; }
  .servicing-payments, .servicing-payments tbody, .servicing-payments tr, .servicing-payments td, .servicing-payments th { display: block; width: auto; }
  .servicing-payments thead { display: none; }
  .servicing-payments tr { padding: 12px 0; border-bottom: 1px solid #dce4ed; }
  .servicing-payments td::before { content: attr(data-label); display: block; color: #526174; font-size: .85rem; }
  .servicing-payments .numeric { text-align: left; }
}

/* Work orders start with a decision summary; supporting records open on demand. */
.funding-file main { font-size: 1.125rem; line-height: 1.6; }
.funding-file .report-drawer > summary { font-size: 1rem; line-height: 1.5; }
.work-order-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work-order-overview dt { color: var(--muted); font-size: 1rem; }
.work-order-overview dd { margin: 6px 0 0; font-size: 1.125rem; font-weight: 700; }
.work-order-next { max-width: 70ch; }
.work-order-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.work-order-links a { display: inline-flex; align-items: center; min-height: 44px; }
.funding-file .report-drawer { scroll-margin-top: 20px; }
.funding-file .report-content { overflow-wrap: anywhere; }
.funding-file .report-content > .report-drawer { background: transparent; }
.funding-file .operations-grid { grid-template-columns: minmax(0, 1fr); }
.funding-file .page-intro { overflow-wrap: anywhere; }
.funding-file .report-drawer > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 700px) {
  .work-order-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 380px) {
  .work-order-overview { grid-template-columns: minmax(0, 1fr); }
}

/* Expanded follow-up forms keep the card width on small screens. */
.garage-followup-form { min-width: 0; }
.garage-followup-form input,
.garage-followup-form select,
.garage-followup-form textarea { min-width: 0; max-width: 100%; }
@media (max-width: 700px) {
  .data-table td.garage-followup-cell { display: block; }
  .data-table td.garage-followup-cell::before { display: block; margin-bottom: 8px; }
}

.security-review-page .report-content,
.security-review-page .security-review-form,
.security-review-page .security-review-form label { min-width: 0; max-width: 100%; }
.security-review-page .security-review-form input,
.security-review-page .security-review-form textarea,
.security-review-page .security-review-form select { min-width: 0; max-width: 100%; box-sizing: border-box; }
.security-review-page code,
.security-review-page dd { overflow-wrap: anywhere; }

.queue-pagination { display: flex; flex-wrap: wrap; gap: 16px; margin-block: 18px; }
.queue-pagination a { min-height: 44px; display: inline-flex; align-items: center; }

.security-review-page [data-claim-rows] { display: grid; gap: 16px; min-width: 0; }
.security-review-page [data-claim-row] { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 16px; }
.security-review-page [data-claim-row] legend { font-weight: 600; padding-inline: 6px; }

/* Keep review details readable inside the existing small-screen record cards. */
.check-fee-reviews-table .row-details { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 700px) {
  .check-fee-reviews-table td.check-fee-review-status { display: block; }
  .check-fee-reviews-table td.check-fee-review-status::before { display: block; margin-bottom: 8px; }
}

.file-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
.file-filters label { display: grid; gap: 4px; font-weight: 600; }
.file-filters .filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.file-filters .filter-actions > button, .file-filters .filter-actions > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; }
.file-filters .filter-actions > button { padding: 8px 16px; font: inherit; font-weight: 600; }
.file-filters label { font-size: 1rem; }
.file-filters .filter-submit {
  margin-top: 0;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  white-space: normal;
}
.file-filters .filter-checkbox { display: flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; cursor: pointer; }
.file-filters .filter-checkbox input[type="checkbox"] { box-sizing: border-box; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; flex: 0 0 16px; }
.home-review-layout .funding-files-table tbody th > a,
.funding-file a[href$="/garage-onboarding"],
.admin-simple main > .panel:is([aria-labelledby="evidence-title"], [aria-labelledby="invoice-title"]) a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.admin-simple main > .panel:is([aria-labelledby="evidence-title"], [aria-labelledby="invoice-title"]) summary {
  min-width: 44px;
  min-height: 44px;
  padding-block: 10px;
}
.admin-simple main > .panel:is([aria-labelledby="evidence-title"], [aria-labelledby="invoice-title"]) details {
  overflow-wrap: anywhere;
}
.pagination { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 20px; }
@media (max-width: 640px) {
 .file-filters label { width: 100%; }
}

.garage-document-preview { display: block; max-width: 100%; max-height: 28rem; object-fit: contain; }

/* Brand guide: common header, responsive menu, and application or account action. */
.topbar .topbar-inner {
  position: relative;
  flex-flow: row wrap;
  align-items: center;
  gap: 12px;
}
.topbar .topbar-inner .brand {
  display: flex;
  flex: 1 1 8rem;
  min-width: 44px;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.topbar-inner .brand picture { display: flex; flex: 0 0 auto; }
.topbar .topbar-inner .brand-logo { border-radius: 8px; }
.topbar-inner .brand-copy { min-width: 0; }
.topbar .topbar-inner:not(.public-header-inner) .brand { flex-basis: auto; }
.topbar .topbar-inner .brand strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.125;
  letter-spacing: -0.025em;
}
.topbar .primary-navigation {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: 100%;
  gap: 8px;
  margin-left: auto;
}
.topbar .primary-navigation a,
.topbar .primary-navigation .navigation-menu > summary {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--small-text-blue);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.topbar .primary-navigation a:hover,
.topbar .primary-navigation a[aria-current="page"],
.topbar .primary-navigation .navigation-menu > summary:hover { background: #f1f5f9; }
.topbar .primary-navigation a[aria-current="page"] { color: var(--ink); }
.topbar .topbar-inner :is(a, summary, button):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.topbar .primary-navigation .navigation-menu > summary {
  justify-content: center;
  gap: 8px;
  padding-inline: 8px;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.topbar .primary-navigation .navigation-dropdown {
  position: absolute;
  top: calc(100% - .5rem);
  right: var(--page-gutter);
  left: auto;
  z-index: 50;
  width: min(20rem, calc(100% - 2 * var(--page-gutter)));
  max-width: none;
  max-height: 60vh;
  padding: 8px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px #12203320;
}
.topbar .primary-navigation .navigation-dropdown a { display: flex; }
.header-nav-separator { width: 1px; height: 32px; background: #e2e8f0; }
.public-menu-audience { display: none; }
.topbar .primary-navigation .public-application {
  color: #fff;
  background: #c8201e;
  justify-content: center;
  text-align: center;
}
.topbar .primary-navigation .public-application:hover { color: #fff; background: #a81c1e; }
@media (width < 768px) {
  .topbar .public-navigation > .public-audience { display: none; }
  .public-menu-audience {
    display: block;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
    padding-bottom: 4px;
  }
}
.topbar .sign-out {
  min-width: 44px;
  padding: 0 12px;
}
@media (width >= 640px) {
  .topbar .topbar-inner .brand strong { font-size: 1.125rem; }
}
/* Brand guide: shared compact footer for utility pages. */
.site-footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1rem var(--page-gutter);
  border-top: 1px solid #e2e8f0;
  background: var(--wash);
  color: #334155;
  font-size: .875rem;
  line-height: 1.5;
  text-align: right;
  overflow-wrap: anywhere;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 1rem;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 0;
  border-radius: 8px;
  color: #1769b8;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.site-footer nav a:hover { background: transparent; }
.site-footer nav a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-footer small { display: block; margin-top: .25rem; font-size: inherit; }
@media (width < 768px) {
  .site-footer { text-align: left; }
  .site-footer nav { justify-content: flex-start; }
}
/* BP-146: one secondary filter action on both queue views. */
.queue-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block: 16px; }
.queue-controls label { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; font-size: 1rem; }
.queue-controls input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; }
.queue-controls .action { font-size: 1rem; border-radius: 8px; }
/* The native reason label must fit the exception review column. */
.garage-admin select[name="reason_codes"] { max-width: 100%; }
@media (max-width: 767px) {
  .queue-controls { flex-direction: column; align-items: flex-start; }
}

/* Home and single-receivable review: retain text at larger browser defaults.
 * Brand guide: Default reading size and zoom. Allow identifiers and words to
 * wrap within their content column; keep tables in their existing scroll region.
 */
.home-review-layout main {
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-review-layout .file-filters label {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.home-review-layout .file-filters input,
.home-review-layout .file-filters select {
  min-width: 0;
}

/* Shared page grid: keep header, breadcrumb, content and utility footer aligned. */
@media (max-width: 840px) {
  :root { --page-gutter: 16px; }
  .breadcrumb-bar { padding-inline: var(--page-gutter); }
}

/* account-heading-reflow: brand guide, Default reading size and zoom.
 * Keep the overview's heading groups inside the drawer at native text sizes.
 */
.account-heading-reflow .section-heading > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Refs #41: proposed shared rhythm; retain natural wrapping and growth. */
.topbar { min-height: calc(44px + 2rem); }
.topbar .topbar-inner {
  padding-block: 1rem;
  min-height: calc(44px + 2rem);
}

/* Shared staff form fields. Date and select controls keep their native widgets. */
.admin-simple main form :where(label) {
  font-size: max(16px, 1rem);
}
.admin-simple main form :where(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="reset"]), select, textarea) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px;
  border-width: 1px;
  border-style: solid;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: max(16px, 1rem);
}

/* Component-specific heights and focus colours take precedence over the defaults. */
:where(.admin-simple main form :is(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="reset"]), select, textarea)) {
  min-height: 44px;
  border-color: #7a8798;
}

/* Brand guide text fields. Keep the visible note label above the control. */
.admin-simple main form .staff-note-field {
  display: grid;
  gap: .5rem;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
}
.staff-note-field textarea {
  width: 100%;
  min-height: 48px;
  border-color: #d8dee8;
  resize: vertical;
}

.form-fieldset {
  display: grid;
  gap: 14px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.form-fieldset legend {
  margin-block-end: 14px;
  padding: 0;
  font-weight: 600;
}
.form-fieldset .action {
  justify-self: start;
}
@media (width < 640px) {
  .form-fieldset .action { justify-self: stretch; }
}

/* Apply the focus border after the component-level field borders. */
:is(input, select, textarea):focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(0 95 204 / 15%);
}

.vehicle-condition-figure { margin-inline: 0; }
.vehicle-condition-photo { max-width: 100%; height: auto; }
.vehicle-condition-comment { white-space: pre-wrap; overflow-wrap: anywhere; }
