/* Shared mobile foundation, loaded after app.css. Breakpoint matches mobile-layout.js. */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-navigation { display: flex; flex: 1; flex-direction: column; min-width: 0; }
/* Visibility follows [hidden] so viewport changes can transfer keyboard focus first. */
.navigation-toggle { display: inline-flex; }
.desktop-navigation-toggle {
  position: fixed; top: 20px; left: 228px; z-index: 30;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  padding: 0; margin: 0; border-radius: 50%;
  border: 1px solid var(--border); box-shadow: 0 2px 6px #0002;
}
.desktop-navigation-toggle svg { flex-shrink: 0; }
@media (min-width: 768px) {
  .shell.desktop-navigation-collapsed { grid-template-columns: minmax(0, 1fr); }
  .desktop-navigation-collapsed .desktop-navigation-toggle { left: 12px; }
  .desktop-navigation-collapsed .desktop-navigation-toggle svg { transform: rotate(180deg); }
  .shell.desktop-navigation-collapsed > #main-content { padding-left: 72px; }
}
@media (min-width: 768px) and (max-width: 900px) {
  .desktop-navigation-toggle { left: 178px; }
  .sidebar .brand { font-size: 22px; }
}
@media print { .desktop-navigation-toggle { display: none; } }
.menu-more > summary { padding: 9px 12px; min-height: 44px; border-radius: 6px; color: #456267; font-size: 15px; cursor: pointer; list-style-position: inside; }
.menu-more > summary:hover { background: #e9f1ee; color: #174e49; }
.menu-more-links { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }

.form-grid > * { min-width: 0; }
textarea { max-width: 100%; font: inherit; }
.page-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.page-actions .button { margin: 0; }
.secondary-actions { min-width: 0; }
.secondary-actions summary { cursor: pointer; min-height: 44px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 600; }
.secondary-actions[open] { flex-basis: 100%; }
.secondary-actions[open] summary { width: fit-content; margin-bottom: 8px; }
.secondary-actions-links { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.secondary-actions-links a { padding: 10px 12px; min-height: 44px; }
.employee-cards { display: none; }
.status-badge { display: inline-block; flex-shrink: 0; padding: 2px 8px; border: 1px solid var(--border); border-radius: 20px; background: #edf3f1; font-size: 12px; color: #365b56; }
.table-scroll { max-width: 100%; overscroll-behavior-x: contain; }
.table-scroll table { min-width: 40rem; }
.table-scroll th, .table-scroll td { overflow-wrap: normal; word-break: normal; }
.table-scroll:focus-visible { outline: 3px solid #d89832; outline-offset: 3px; }
.has-horizontal-scroll { border-bottom: 2px solid #9cafa9; }
.pagination { flex-direction: row; align-items: center; white-space: normal; overflow: visible; }
.pagination a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 767px) {
  .shell { display: block; }
  .sidebar { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { font-size: 24px; }
  .sidebar .caption { margin: 0; }
  .navigation-toggle { display: inline-flex; padding: 8px 14px; min-height: 44px; }
  .site-navigation nav { flex-direction: column; overflow: visible; white-space: normal; margin-top: 12px; gap: 4px; }
  .site-navigation nav a { font-size: 15px; padding: 10px 12px; min-height: 44px; }
  main { padding: 18px 12px; }
  h1 { font-size: 28px; margin: 6px 0 10px; }
  .lead { margin: 0 0 18px; }
  .eyebrow { margin-bottom: 6px; }
  .card { padding: 16px; margin: 16px 0; }
  .hero-card { padding: 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  input, select, textarea { min-width: 0; max-width: 100%; font-size: 16px; }
  input[type=file] { padding: 12px; }
  button, .button { max-width: 100%; min-height: 44px; padding: 9px 14px; gap: 8px; line-height: 1.4; vertical-align: middle; }
  .button { margin-block: 4px; }
  .button + .button { margin-inline-start: 8px; }
  .page-actions .button { margin: 0; }
  .section-tabs, .treasury-tabs { flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 16px 0; padding: 0 0 8px; }
  .section-tabs a, .treasury-tabs a { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; font-size: 14px; }
  .table-scroll table { min-width: 40rem; }
  .table-scroll th, .table-scroll td { overflow-wrap: normal; word-break: normal; }
  .table-scroll input, .table-scroll select { min-width: 8rem; }
  .table-scroll input[type=checkbox], .table-scroll input[type=radio] { min-width: 0; }
  .employee-table { display: none; }
  .employee-cards { display: grid; gap: 12px; list-style: none; padding: 0; margin: 12px 0; }
  .employee-cards li { border: 1px solid var(--border); border-radius: 8px; padding: 12px; min-width: 0; }
  .employee-card-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
  .employee-card-heading a { display: block; padding-block: 8px; min-height: 44px; font-weight: 650; overflow-wrap: break-word; min-width: 0; max-width: 100%; }
  .employee-cards p { margin: 4px 0 0; }
  .employee-cards .hint { font-size: 13px; }
  .pagination { gap: 8px 12px; margin-top: 16px; flex-wrap: wrap; }
  .auth-body { padding: 16px; }
  .auth-card { padding: 20px; }
  footer { margin-top: 28px; overflow-wrap: anywhere; }
}

/* Lot 2: scoped children/HR records. Lists and retained contracts share these cards. */
.record-page { min-width: 0; overflow-wrap: break-word; }
.record-page > a:first-child, .record-page > p > a { display: inline-flex; align-items: center; min-height: 44px; }
.record-page .lead, .record-page .error { overflow-wrap: anywhere; }
.record-page .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.record-page .form-actions button { margin: 0; }
.record-page .confirmation { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 12px 0; cursor: pointer; }
.record-page .confirmation input, .record-page .barcode-selection input { width: 22px; height: 22px; flex: 0 0 22px; margin: 2px 0; }
.record-page .barcode-selection { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; cursor: pointer; }
.record-page .page-actions > a, .record-page .record-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
.record-cards { display: none; }
.record-history > summary { cursor: pointer; font-size: 21px; font-weight: 620; min-height: 44px; padding: 8px 0; }
.record-history[open] > summary { margin-bottom: 16px; }
.record-comparison th, .record-comparison td { min-width: 9rem; }
.record-page .table-scroll td a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; }
.record-page .table-scroll td { overflow-wrap: break-word; }
.record-page .table-scroll table { table-layout: auto; }
.record-page :target { scroll-margin-top: 16px; }
@media (max-width: 767px) {
  .record-table { display: none; }
  .record-cards { display: grid; gap: 12px; list-style: none; padding: 0; margin: 16px 0; }
  .record-cards > li { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
  .record-card-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
  .record-card-heading a { min-width: 0; max-width: 100%; min-height: 44px; padding-block: 8px; font-weight: 650; }
  .record-cards h3 { font-size: 17px; line-height: 1.5; margin: 0 0 12px; }
  .record-facts { display: grid; gap: 8px; margin: 12px 0; }
  .record-facts > div { min-width: 0; }
  .record-facts dt { font-size: 12px; color: var(--muted); }
  .record-facts dd { margin: 0; }
  .record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .record-page .form-actions > button { width: 100%; justify-content: center; }
  .record-page .form-grid { gap: 4px; }
}

/* Payroll comparisons retain their full table structure and source completeness flags. */
.payroll-page { min-width: 0; }
.payroll-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.payroll-filter > div { flex: 0 1 16rem; min-width: 0; }
.payroll-filter label, .payroll-filter button { margin: 0; }
.payroll-filter label { margin-bottom: 6px; }
.payroll-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.payroll-highlights > div { padding: 16px; background: #f2f6f4; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.payroll-highlights dt { font-size: 14px; color: var(--muted); }
.payroll-highlights dd { margin: 8px 0 0; font-size: 20px; font-weight: 650; }
.payroll-page .table-scroll { margin-top: 12px; }
.payroll-page .table-scroll th { min-width: 10rem; max-width: 16rem; }
.payroll-page .table-scroll td { min-width: 10rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.payroll-page .table-scroll td.payroll-text { white-space: normal; max-width: 16rem; overflow-wrap: break-word; }
.payroll-page .table-scroll tbody th { color: inherit; background: var(--surface); font-weight: 600; overflow-wrap: break-word; }
.payroll-page .table-scroll tbody th a { display: block; min-width: 0; min-height: 44px; max-width: 14rem; overflow-wrap: anywhere; }
.payroll-page .payroll-year-table th:first-child { min-width: 5rem; }
.payroll-page :target { scroll-margin-top: 16px; }
@media (min-width: 768px) {
  .payroll-page .table-scroll tr > :first-child { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .payroll-highlights { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .payroll-filter > div, .payroll-filter button { flex: 1 1 100%; }
  .payroll-filter button { min-height: 44px; justify-content: center; }
  .payroll-page .notice, .payroll-page .error { overflow-wrap: break-word; }
}

/* Lot 3: finance and reporting pages only. Numeric comparisons remain tables. */
.pilotage-page { min-width: 0; overflow-wrap: break-word; }
.pilotage-page h1, .pilotage-page h2, .pilotage-page .notice, .pilotage-page .error,
.pilotage-page code, .pilotage-page .dashboard-card, .pilotage-page .dashboard-list,
.pilotage-page .dashboard-balance-list { overflow-wrap: anywhere; }
.pilotage-page :target { scroll-margin-top: 16px; }
.pilotage-page .table-scroll th, .pilotage-page .table-scroll td { min-width: 9rem; max-width: 18rem; }
.pilotage-page .table-scroll tbody th { color: inherit; background: var(--surface); font-weight: 600; }
.pilotage-page .table-scroll th { overflow-wrap: anywhere; }
.pilotage-page .table-scroll th[colspan] { background: #edf3f1; }
.pilotage-page .table-scroll .numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pilotage-page .numeric .hint { white-space: normal; }
.pilotage-page .cell-text { display: block; width: 14rem; max-width: 100%; overflow-wrap: anywhere; }
.pilotage-page .table-scroll a { display: block; max-width: 16rem; min-height: 44px; padding-block: 8px; overflow-wrap: anywhere; }
.pilotage-page .table-scroll input, .pilotage-page .table-scroll select { width: 14rem; max-width: 100%; }
.pilotage-page .table-scroll button { margin-top: 8px; }
.pilotage-page .table-scroll td.provenance { overflow-wrap: anywhere; }
.pilotage-page .table-scroll td.provenance .hint { max-width: 16rem; }
.pilotage-page .metric-grid, .pilotage-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.pilotage-page .metric-grid > div, .pilotage-facts > div { min-width: 0; padding: 16px; background: #f2f6f4; border: 1px solid var(--border); border-radius: 8px; }
.pilotage-page .metric-grid strong { display: block; margin-top: 8px; font-size: 20px; font-variant-numeric: tabular-nums; }
.pilotage-facts dt { font-size: 14px; color: var(--muted); }
.pilotage-facts dd { margin: 8px 0 0; font-size: 22px; font-weight: 650; }
.pilotage-page .section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pilotage-page .section-heading > * { min-width: 0; }
.pilotage-page .compact-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.pilotage-page .compact-filter > div { flex: 0 1 16rem; min-width: 0; }
.pilotage-page .compact-filter label, .pilotage-page .compact-filter button { margin: 0; }
.pilotage-page .compact-filter label { margin-bottom: 6px; }
.pilotage-page .form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pilotage-page .form-actions button { margin: 0; }
.pilotage-page .confirmation { display: flex; align-items: center; gap: 12px; min-height: 44px; padding-block: 12px; cursor: pointer; }
.pilotage-page .confirmation input { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; }
.pilotage-page > a:first-child, .pilotage-page > p a, .pilotage-page .page-actions > a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.pilotage-page .page-actions > a:not(.button) { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
.pilotage-page details > summary { cursor: pointer; min-height: 44px; padding-block: 10px; }
.pilotage-page .activity-bars { grid-template-columns: 6rem minmax(0, 1fr); }
.pilotage-page .activity-bar-values { grid-column: 2; font-size: 12px; color: var(--muted); }
@media (min-width: 1024px) {
  .pilotage-page [data-comparison] tr > :first-child:not([colspan]) { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--border); }
}
@media (max-width: 1100px) {
  .pilotage-page .metric-grid, .pilotage-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilotage-page .dashboard-list > div { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .pilotage-page .metric-grid, .pilotage-facts { grid-template-columns: minmax(0, 1fr); }
  .pilotage-page .compact-filter > div, .pilotage-page .compact-filter button { flex: 1 1 100%; }
  .pilotage-page form > button, .pilotage-page .form-actions > button { width: 100%; justify-content: center; }
  .pilotage-page .treasury-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .pilotage-page .treasury-tabs a { white-space: normal; justify-content: center; }
  .pilotage-page .activity-bars { grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 16px 0; }
  .pilotage-page .activity-bar-values { grid-column: 1; }
  .pilotage-page .dashboard-card { padding: 16px; }
  .pilotage-page .dashboard-section-heading { flex-wrap: wrap; gap: 12px; }
}

/* Lot 4: weekly matrices, annual agenda and their forms. */
.schedule-page { min-width: 0; overflow-wrap: anywhere; }
.schedule-page .schedule-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.schedule-filter > div { flex: 1 1 16rem; min-width: 0; }
.schedule-filter label, .schedule-filter button { margin: 0; }
.schedule-filter label { margin-bottom: 6px; }
.schedule-page .schedule-navigation, .schedule-page .calendar-modes { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; white-space: normal; overflow: visible; }
.schedule-navigation a, .schedule-page > a:first-child, .schedule-page > p a,
.schedule-page .page-actions > a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding-block: 8px; }
.schedule-page .table-scroll { margin: 12px 0; }
.schedule-page .table-scroll caption { text-align: left; padding-block: 8px; }
.schedule-page .table-scroll th, .schedule-page .table-scroll td { min-width: 11rem; max-width: 18rem; vertical-align: top; }
.schedule-page .table-scroll th { overflow-wrap: anywhere; }
.schedule-page .table-scroll tbody th { color: inherit; background: var(--surface); font-weight: 600; }
.schedule-page .table-scroll a { display: block; min-height: 44px; max-width: 14rem; padding-block: 8px; overflow-wrap: anywhere; }
.schedule-page .planning-week th:first-child { min-width: 14rem; }
.schedule-page .planning-week .planning-summary { min-width: 18rem; }
.schedule-page .planning-week p { margin: 4px 0 12px; }
.schedule-page .schedule-history th { white-space: nowrap; }
.schedule-page .schedule-history td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.schedule-page .schedule-history th:first-child { min-width: 5rem; }
.schedule-page details > summary { cursor: pointer; min-height: 44px; padding-block: 10px; font-weight: 600; }
.schedule-page .schedule-secondary { margin-top: 24px; }
.schedule-page .confirmation { display: flex; align-items: center; gap: 12px; min-height: 44px; padding-block: 12px; cursor: pointer; }
.schedule-page .confirmation input { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; }
.schedule-page input[type=color] { width: 6rem; height: 44px; padding: 4px; }
.schedule-page .calendar-modes a { border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; min-height: 44px; }
.schedule-page .calendar-modes a[aria-current=page] { color: var(--surface); background: var(--primary); border-color: var(--primary); font-weight: 700; }
.schedule-page .calendar-navigation { justify-content: space-between; }
.schedule-page .calendar-navigation strong { font-size: 1.1rem; }
.schedule-page .calendar-start { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.schedule-page .calendar-start input { width: auto; }
.schedule-page .calendar-start input, .schedule-page .calendar-start button, .schedule-page .calendar-start label { margin: 0; }
.schedule-page .calendar-start .hint { flex-basis: 100%; }
.schedule-page .calendar-month h2 { text-transform: capitalize; }
.schedule-page .calendar-month h2 small { font-size: .75em; font-weight: normal; }
.schedule-page .calendar-count { margin: 24px 0 12px; }
.schedule-page .calendar-events { list-style: none; margin: 0; padding: 0; }
.schedule-page .calendar-event { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.schedule-page .calendar-event > * { min-width: 0; margin: 0; }
.schedule-page .calendar-event h3 { font-size: 17px; line-height: 1.5; margin: 0 0 8px; }
.schedule-page .calendar-event a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
.schedule-page .calendar-category { display: block; border-left: .35rem solid var(--category-color, #64748b); padding-left: 8px; }
@media (min-width: 1024px) {
  .schedule-page .planning-week tr > :first-child { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .schedule-page .calendar-event { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .schedule-page .calendar-event a { justify-self: start; }
}
@media (max-width: 767px) {
  .schedule-page .schedule-filter > div, .schedule-page .schedule-filter button { flex: 1 1 100%; }
  .schedule-page form > button { width: 100%; justify-content: center; }
  .schedule-page .calendar-navigation { align-items: flex-start; flex-direction: column; }
  .schedule-page .calendar-start input { width: 100%; }
  .schedule-page .form-grid { gap: 4px; }
}

/* Lot 5: import workflows and administration. Each form is rendered only once. */
.workflow-page { min-width: 0; overflow-wrap: anywhere; }
.workflow-page :target { scroll-margin-top: 16px; }
.workflow-page h1 code { font-size: .75em; }
.workflow-page pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: #f2f6f4; border-radius: 8px; max-width: 100%; }
.workflow-page fieldset { min-width: 0; margin: 20px 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; }
.workflow-page legend { max-width: 100%; padding-inline: 6px; font-weight: 600; }
.workflow-page label:has(input[type=checkbox]), .account-page .checkbox { display: flex; align-items: center; gap: 12px; min-height: 44px; padding-block: 10px; cursor: pointer; }
.workflow-page input[type=checkbox], .account-page input[type=checkbox] { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; }
.workflow-page button, .workflow-page summary, .account-page button, .account-page a { min-height: 44px; }
.workflow-page summary { overflow-wrap: anywhere; cursor: pointer; padding-block: 10px; font-weight: 600; }
.workflow-page a { overflow-wrap: anywhere; }
.workflow-page > a, .workflow-page p > a, .workflow-page .management-list > li > a { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; padding-block: 8px; }
.workflow-page .page-actions { gap: 12px; }
.workflow-page .table-scroll { margin-block: 12px; }
.workflow-page .table-scroll th, .workflow-page .table-scroll td { min-width: 9rem; max-width: 24rem; vertical-align: top; }
.workflow-page .table-scroll th { overflow-wrap: anywhere; }
.workflow-page .table-scroll tbody th { background: var(--surface); color: inherit; font-weight: 600; }
.workflow-page .table-scroll a { display: block; min-height: 44px; max-width: 16rem; padding-block: 8px; }
.workflow-page .workflow-cell-text { display: block; width: 14rem; max-width: 100%; overflow-wrap: anywhere; }
.workflow-page .table-scroll td:has(form) { min-width: 22rem; }
.workflow-page .table-scroll td:has(form) .form-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.workflow-page .table-scroll td:has(form) .card { padding: 12px; margin: 12px 0; overflow-wrap: anywhere; }
.workflow-page .table-scroll td:has(form) button { margin-top: 12px; }
.workflow-page .table-scroll td:has(form) > ul { max-width: 22rem; overflow-wrap: anywhere; }
.workflow-page .table-scroll .numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.workflow-page .pagination { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; margin: 16px 0; white-space: normal; overflow: visible; }
.workflow-page .pagination [aria-current=page] { font-weight: 700; background: #e9f1ee; }
.workflow-page .metric-grid, .workflow-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.workflow-page .metric-grid > div, .workflow-facts > div { min-width: 0; padding: 12px; background: #f2f6f4; border-radius: 8px; }
.workflow-page .metric-grid strong { display: block; font-size: 20px; }
.workflow-facts dt { font-size: 13px; color: var(--muted); }
.workflow-facts dd { margin: 8px 0 0; }
.workflow-page .management-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.workflow-page .management-list > li { min-width: 0; border-top: 1px solid var(--border); padding-top: 16px; }
.workflow-page .management-list h3 { margin: 0 0 12px; font-size: 18px; }
.workflow-page .scope-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.workflow-page .scope-choices label { margin: 0; }
.workflow-page .scope-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.workflow-page .scope-toolbar button { width: auto; }
.workflow-page .scope-danger { color: #b42318; font-weight: 700; }
.workflow-page .scope-danger-text { color: #b42318; font-weight: 700; }
.account-page { min-width: 0; overflow-wrap: anywhere; }
.account-page a { display: inline-flex; align-items: center; max-width: 100%; }
.account-page .secret { white-space: normal; overflow-wrap: anywhere; }
.account-page .recovery-codes { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.account-page .recovery-codes code { display: block; padding: 8px; background: #f2f6f4; border-radius: 6px; }
.account-page .totp-setup { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-block: 8px 4px; }
.account-page .totp-qr { flex: 0 0 auto; width: 192px; max-width: 100%; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; line-height: 0; }
.account-page .totp-qr svg { display: block; width: 100%; height: auto; }
.account-page .totp-manual { flex: 1 1 220px; min-width: 0; }
.account-page .totp-manual p { margin: 8px 0; }
.account-page .totp-manual .secret { font-size: 16px; font-weight: 600; letter-spacing: 1px; }
@media (max-width: 1100px) {
  .workflow-page .module-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .workflow-page .metric-grid, .workflow-facts, .workflow-page .scope-choices { grid-template-columns: minmax(0, 1fr); }
  .workflow-page button, .account-page button { width: 100%; justify-content: center; }
  .workflow-page .form-grid { gap: 4px; }
  .workflow-page .card .card { padding: 12px; }
  .workflow-page .identity details, .workflow-page .identity form { min-width: 0; }
  .account-page .recovery-codes { grid-template-columns: minmax(0, 1fr); }
}

/* Personal home: desktop placement, logical document order on small screens. */
.home-custom-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.home-custom-card { grid-row: var(--home-row); grid-column: var(--home-column) / span var(--home-span); min-width: 0; overflow-wrap: anywhere; }

/* Bounded layout values from HomeCardCatalog; external CSS keeps the strict CSP intact. */
.home-custom-card[data-home-row="1"] { --home-row: 1; }
.home-custom-card[data-home-row="2"] { --home-row: 2; }
.home-custom-card[data-home-row="3"] { --home-row: 3; }
.home-custom-card[data-home-row="4"] { --home-row: 4; }
.home-custom-card[data-home-row="5"] { --home-row: 5; }
.home-custom-card[data-home-row="6"] { --home-row: 6; }
.home-custom-card[data-home-row="7"] { --home-row: 7; }
.home-custom-card[data-home-row="8"] { --home-row: 8; }
.home-custom-card[data-home-row="9"] { --home-row: 9; }
.home-custom-card[data-home-row="10"] { --home-row: 10; }
.home-custom-card[data-home-row="11"] { --home-row: 11; }
.home-custom-card[data-home-row="12"] { --home-row: 12; }
.home-custom-card[data-home-row="13"] { --home-row: 13; }
.home-custom-card[data-home-row="14"] { --home-row: 14; }
.home-custom-card[data-home-row="15"] { --home-row: 15; }
.home-custom-card[data-home-row="16"] { --home-row: 16; }
.home-custom-card[data-home-row="17"] { --home-row: 17; }
.home-custom-card[data-home-row="18"] { --home-row: 18; }
.home-custom-card[data-home-row="19"] { --home-row: 19; }
.home-custom-card[data-home-row="20"] { --home-row: 20; }
.home-custom-card[data-home-row="21"] { --home-row: 21; }
.home-custom-card[data-home-row="22"] { --home-row: 22; }
.home-custom-card[data-home-row="23"] { --home-row: 23; }
.home-custom-card[data-home-row="24"] { --home-row: 24; }
.home-custom-card[data-home-row="25"] { --home-row: 25; }
.home-custom-card[data-home-row="26"] { --home-row: 26; }
.home-custom-card[data-home-row="27"] { --home-row: 27; }
.home-custom-card[data-home-row="28"] { --home-row: 28; }
.home-custom-card[data-home-row="29"] { --home-row: 29; }
.home-custom-card[data-home-row="30"] { --home-row: 30; }
.home-custom-card[data-home-row="31"] { --home-row: 31; }
.home-custom-card[data-home-row="32"] { --home-row: 32; }
.home-custom-card[data-home-row="33"] { --home-row: 33; }
.home-custom-card[data-home-row="34"] { --home-row: 34; }
.home-custom-card[data-home-row="35"] { --home-row: 35; }
.home-custom-card[data-home-row="36"] { --home-row: 36; }
.home-custom-card[data-home-row="37"] { --home-row: 37; }
.home-custom-card[data-home-row="38"] { --home-row: 38; }
.home-custom-card[data-home-row="39"] { --home-row: 39; }
.home-custom-card[data-home-row="40"] { --home-row: 40; }
.home-custom-card[data-home-row="41"] { --home-row: 41; }
.home-custom-card[data-home-row="42"] { --home-row: 42; }
.home-custom-card[data-home-row="43"] { --home-row: 43; }
.home-custom-card[data-home-row="44"] { --home-row: 44; }
.home-custom-card[data-home-row="45"] { --home-row: 45; }
.home-custom-card[data-home-row="46"] { --home-row: 46; }
.home-custom-card[data-home-row="47"] { --home-row: 47; }
.home-custom-card[data-home-row="48"] { --home-row: 48; }
.home-custom-card[data-home-row="49"] { --home-row: 49; }
.home-custom-card[data-home-row="50"] { --home-row: 50; }
.home-custom-card[data-home-column="1"] { --home-column: 1; }
.home-custom-card[data-home-column="2"] { --home-column: 2; }
.home-custom-card[data-home-column="3"] { --home-column: 3; }
.home-custom-card[data-home-span="1"] { --home-span: 1; }
.home-custom-card[data-home-span="2"] { --home-span: 2; }
.home-custom-card[data-home-span="3"] { --home-span: 3; }
.home-custom-card .dashboard-section { margin: 0; padding: 0; border: 0; box-shadow: none; }
.home-custom-card textarea { width: 100%; box-sizing: border-box; white-space: pre-wrap; }
.home-card-choice { margin-bottom: 1rem; min-width: 0; }
.home-reminder { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-block: 1rem; }
@media (max-width: 1000px) { .home-custom-grid { grid-template-columns: 1fr; } .home-custom-card { grid-row: auto; grid-column: 1; } }


/* Guided financial alerts: bounded homepage content, details on demand. */
.financial-alert-card { display: grid; gap: .75rem; min-width: 0; }
.financial-alert-card h2, .financial-alert-card p { margin: 0; }
.financial-alert-card .financial-alert-status { padding: .75rem; background: #edf3f2; border-left: 4px solid #668e84; }
.financial-alert-causes, .financial-alert-employees { display: grid; gap: .75rem; }
.financial-alert-cause { display: grid; gap: .4rem; padding: .75rem; border: 1px solid #d9e2e0; border-radius: .5rem; min-width: 0; }
.financial-alert-cause p { margin: 0; }
.financial-alert-cause .button { justify-self: start; }
.financial-alert-details { margin-top: .25rem; }
.financial-alert-details summary { cursor: pointer; padding: .5rem 0; min-height: 44px; }
.financial-alert-details p, .financial-alert-details li { margin-top: .5rem; }
.financial-alert-cause-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.financial-alert-cause-nav [aria-current="page"] { outline: 2px solid #668e84; outline-offset: 2px; }
.financial-alert-resolution .button, .financial-alert-card .button, .financial-alert-more { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
.financial-alert-task { margin: 1rem 0; }
.financial-alert-more { display: inline-flex; align-items: center; }
@media (max-width: 767px) {
  .financial-alert-cause .button { justify-self: stretch; text-align: center; }
  .financial-alert-cause-nav .button { flex: 1 1 100%; }
}


.record-page pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media print {
 body:has(.commission-print) .sidebar, body:has(.commission-print) .topline, body:has(.commission-print) footer, body:has(.commission-print) .skip-link { display: none; }
 body:has(.commission-print) .shell { display:block; }
 .commission-print table { width:100%; font-size:10pt; border-collapse:collapse; }
 .commission-print thead { display:table-header-group; }
 .commission-print tr { break-inside:avoid; }
 .commission-print th, .commission-print td { padding:5pt; border:1px solid #888; white-space:normal; }
}

@page commission { size: A4 landscape; margin: 12mm; }
@media print { .commission-print { page: commission; } .commission-print .table-scroll { overflow: visible; } }

.commission-print { min-width: 0; overflow-wrap: anywhere; }

.document-metadata dd { margin-left: 0; margin-bottom: .75rem; overflow-wrap: anywhere; }
.document-metadata dt { font-weight: 600; }
.document-transcription { white-space: pre-wrap; overflow-wrap: anywhere; }

/* D08 shared, comparable scales; labels and values remain readable without color. */
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.cotek-bars { list-style: none; padding: 0; }
.cotek-bars li { display: grid; grid-template-columns: minmax(4rem, 7rem) minmax(2rem, 1fr) minmax(6rem, auto); align-items: center; gap: .6rem; margin: .6rem 0; }
.cotek-bars small { grid-column: 3; }
.cotek-bars .bar-track { height: 1rem; background: #e7eeee; border-radius: .2rem; }
.cotek-bars .bar-fill { display: block; height: 100%; background: #36767a; border-radius: .2rem; }
.cotek-populations { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .4rem; }
.cotek-populations dd { margin: 0; }
.cotek-page details { margin-block: .8rem; }
.cotek-digest { overflow-wrap: anywhere; }
.cotek-page li, .cotek-page p { overflow-wrap: anywhere; }
@media (max-width: 480px) { .cotek-bars li { grid-template-columns: 4rem minmax(1rem, 1fr) minmax(5rem, auto); gap: .35rem; } }
