/* Layout F extension, maintained entrypoint only. Presentation, never visibility or routing.
   Keep semantic green/red/amber separate from cobalt selection. Today queue structure is unchanged; shared color leaks are repaired below. */
body.app-theme-f {
  --bg: #eef2f7; --panel: #fff; --panel-2: #f5f7fb; --ink: #202b3c;
  --muted: #596779; --line: #b5c4d8;
  --app-teal: #2359bf; --app-teal-dark: #19469d; --app-teal-soft: #eaf1ff;
  --f-navy: #12233f; --f-cobalt: #2563eb; --f-soft: #eaf1ff;
  --f-red: #a43f39; --f-amber: #8b651c; --f-slate: #596779; --f-green: #246b4d;
}
/* Shared chrome: preserve sidebar order, collapse behavior, and existing mobile dock geometry. */
body.app-theme-f .topbar { border-bottom: 1px solid var(--line); }
body.app-theme-f:not([data-active-view="dashboard"]) .work-area-context {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; box-shadow: 0 2px 8px #12233f06;
}
body.app-theme-f .work-area-breadcrumb { color: var(--f-slate); }
body.app-theme-f .work-area-title h3 { color: var(--f-navy); }
body.app-theme-f .active-client-switcher { border-color: var(--line); background: #fff; border-radius: 12px; }
body.app-theme-f .active-file-context { border-color: var(--line); background: var(--f-soft); border-radius: 12px; }
body.app-theme-f .profile-client-identity { background: var(--f-soft); border-color: var(--line); border-left-color: var(--f-cobalt); color: var(--ink); box-shadow: 0 2px 8px #12233f06; }
body.app-theme-f.mobile-mlo-shell .active-file-context .profile-client-identity { background: var(--f-soft) !important; border-color: var(--line) !important; border-left-color: var(--f-cobalt) !important; }
body.app-theme-f .identity-title-row > strong { color: var(--f-navy); font-size: clamp(20px, 2vw, 28px); }
body.app-theme-f .identity-title-row .eyebrow { color: #2359bf; }
body.app-theme-f .identity-subgrid > span { background: #fff; border-color: var(--line); }
body.app-theme-f .client-switch-button { background: #f8f9fb; border-color: var(--line); color: var(--ink); }
body.app-theme-f .client-switch-button.active { background: var(--f-soft); border-color: var(--f-cobalt); box-shadow: inset 4px 0 var(--f-cobalt); color: var(--ink); }
/* Every remaining route gets bounded surfaces, not the queue's two-column layout. */
body.app-theme-f :is(#clientPortal-view, #followups-view, #partners-view, #propertyHub-view, #intake-view, #profile-view, #settings-view) {
  --area-accent: #2563eb; --area-border: #b5c4d8; --area-soft: #eaf1ff;
  min-width: 0; overflow-wrap: anywhere;
}
body.app-theme-f .view:not(#dashboard-view) :is(.panel, .profile-card, .alert-column, .alert-card, .property-review-section, .settings-workspace-header, .subarea-menu) {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 2px 8px #12233f06; min-width: 0;
}
body.app-theme-f .view:not(#dashboard-view) :is(.panel-heading, .section-subhead, .property-review-section-heading) {
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
body.app-theme-f .view:not(#dashboard-view) :is(h3, h4, legend) { color: var(--f-navy); }
body.app-theme-f .view:not(#dashboard-view) :is(.alert-column > h3, .profile-card > summary) {
  background: #f5f7fb; border-bottom: 1px solid var(--line); padding: 14px; border-radius: 11px 11px 0 0;
}
body.app-theme-f #profile-view .profile-area {
  --area-accent: #2563eb; --area-border: #b5c4d8; --area-soft: #eaf1ff;
  padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f5f7fb;
}
body.app-theme-f #profile-view .profile-area-heading {
  padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--f-cobalt);
  border-radius: 10px; background: var(--f-soft); box-shadow: none; margin-bottom: 18px;
}
body.app-theme-f #profile-view .profile-area-heading > span { color: #2359bf; }
body.app-theme-f #profile-view .profile-area-heading h3 { color: var(--f-navy); font-size: 24px; }
body.app-theme-f .view:not(#dashboard-view) :is(fieldset, .urla-section, .converter-panel, .property-form-subheading) {
  min-width: 0; border-color: var(--line); background: #f8faff; border-radius: 10px;
}
body.app-theme-f .view:not(#dashboard-view) fieldset { padding: 18px; }
body.app-theme-f .view:not(#dashboard-view) legend { font-weight: 750; padding: 0 6px; }
body.app-theme-f .view:not(#dashboard-view) :is(input, select, textarea) { max-width: 100%; min-width: 0; border-radius: 7px; }
body.app-theme-f .view:not(#dashboard-view) :is(input:not([type="checkbox"]):not([type="radio"]), select) { min-height: 42px; }
body.app-theme-f .view:not(#dashboard-view) :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--f-cobalt); }
body.app-theme-f .view:not(#dashboard-view) :is(.primary-button) {
  background: var(--f-cobalt) !important; border-color: var(--f-cobalt); color: #fff !important; -webkit-text-fill-color: #fff !important;
}
body.app-theme-f .view:not(#dashboard-view) :is(.secondary-button, .mini-button) {
  background: #fff; border-color: var(--line); color: #2359bf; white-space: normal;
}
body.app-theme-f .view:not(#dashboard-view) .danger-button { background: #fae9e7; border-color: #d5aaa2; color: var(--f-red); }
body.app-theme-f :is(.subarea-menu-grid, .settings-area-menu) button {
  background: #fff; border-color: var(--line); color: var(--ink); white-space: normal;
}
body.app-theme-f :is(.subarea-menu-grid, .settings-area-menu) button.active {
  background: var(--f-soft); color: #19469d; border-color: var(--f-cobalt); box-shadow: inset 0 -3px var(--f-cobalt);
}
body.app-theme-f :is(.subarea-menu-grid, .settings-area-menu) button.active :is(strong, span) { color: #19469d; }
body.app-theme-f .view:not(#dashboard-view) :is(button, input, select, textarea, summary, a):focus-visible,
body.app-theme-f :is(.client-switch-button, #active-client-search):focus-visible {
  outline: 3px solid var(--f-cobalt); outline-offset: 3px;
}
/* Status is not selection. Preserve text labels and give each existing semantic class its own hue. */
body.app-theme-f .view:not(#dashboard-view) :is(.badge.red, .guardrail-note.danger) { color: var(--f-red); background: #fae9e7; border-color: #d5aaa2; }
body.app-theme-f .view:not(#dashboard-view) :is(.badge.gold, .guardrail-note.warn) { color: var(--f-amber); background: #fff5d8; border-color: #d9c58d; }
body.app-theme-f .view:not(#dashboard-view) :is(.badge.green, .guardrail-note.ok) { color: var(--f-green); background: #e5f4ed; border-color: #a8ccba; }
body.app-theme-f .view:not(#dashboard-view) .subtle-badge { color: var(--f-slate); background: #f1f4f8; border-color: var(--line); }
/* Dedicated phone renderer: change surfaces only; retain fixed dock offsets, collapse, hiding and safe areas. */
body.app-theme-f.mobile-mlo-shell #profile-view.active-view :is(.phone-file-v2-current, .phone-file-v2-panel) {
  border-color: var(--line) !important; border-radius: 10px !important; background: #fff !important;
}
body.app-theme-f.mobile-mlo-shell #profile-view.active-view .phone-file-v2-current {
  background: var(--f-soft) !important; border-left: 4px solid var(--f-cobalt) !important;
}
body.app-theme-f.mobile-mlo-shell #profile-view.active-view .phone-file-v2-sticky {
  background: #eaf1ff !important; border-color: var(--line) !important; box-shadow: 0 -8px 20px #12233f18 !important;
}
body.app-theme-f.mobile-mlo-shell #profile-view.active-view :is(.phone-file-v2-client > strong, .phone-file-v2-current strong, .phone-file-v2-panel h3, .phone-file-v2-row strong, .phone-file-v2-dock-context strong) { color: var(--f-navy) !important; }
body.app-theme-f.mobile-mlo-shell #profile-view.active-view .phone-file-v2-toggle { color: #2359bf !important; border-color: var(--line) !important; }
body.app-theme-f.mobile-mlo-shell #profile-view.active-view .phone-file-v2-row { border-bottom-color: #dce4ef !important; }
body.app-theme-f.mobile-mlo-shell .mobile-work-tabs button.active { color: #19469d !important; background: var(--f-soft) !important; box-shadow: inset 0 3px var(--f-cobalt); }
@media (max-width: 1050px) {
  body.app-theme-f :is(#followup-columns, #partner-columns) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  body.app-theme-f #profile-view .profile-area { padding: 10px; }
  body.app-theme-f .view:not(#dashboard-view) :is(.edit-grid, .property-entry-grid, .criteria-grid, .urla-subgrid) { grid-template-columns: minmax(0, 1fr); }
  body.app-theme-f .view:not(#dashboard-view) .button-row { flex-wrap: wrap; }
  body.app-theme-f .view:not(#dashboard-view) .button-row > button { min-height: 44px; max-width: 100%; }
  body.app-theme-f .view:not(#dashboard-view) :is(input, select, textarea) { font-size: 16px; }
  body.app-theme-f .view:not(#dashboard-view) fieldset { padding: 12px; }
}

/* v3 cascade repairs. Green/red/gold remain semantic; never globally alias --green.
   Background shorthand deliberately removes legacy route gradients. */
body.app-theme-f { --teal: #2359bf; --teal-2: #eaf1ff; --blue: #2359bf; --blue-2: #eaf1ff; --shadow: 0 12px 30px #12233f14; }
body.app-theme-f :is(#dashboard-view, #clientPortal-view, #followups-view, #partners-view, #propertyHub-view, #intake-view, #profile-view, #settings-view).active-view { background: var(--bg); border-color: var(--line); }
body.app-theme-f :is(.app-shell, .main) { background: var(--bg) !important; }
body.app-theme-f.mobile-mlo-shell { background: var(--bg) !important; }
body.app-theme-f :is(.eyebrow, .work-area-breadcrumb strong, .property-type-chip, .action-tools summary, .advanced-assumptions summary, .optional-property-details summary, .help-chip, .mobile-menu-toggle small) { color: var(--app-teal); }
body.app-theme-f :is(.work-area-title p:not(.eyebrow), .work-area-breadcrumb span::after) { color: var(--muted); }
/* Sidebar rules also defeat the legacy dark-preference !important text fill. */
body.app-theme-f .sidebar :is(.nav-button, .nav-submenu button) { background: transparent !important; color: #dce3ed !important; -webkit-text-fill-color: #dce3ed !important; border-color: transparent !important; box-shadow: none; }
body.app-theme-f .sidebar :is(.nav-button, .nav-submenu button):hover { background: #274464 !important; }
body.app-theme-f .sidebar :is(.nav-button.active, .nav-submenu button.active, .nav-button-action) { background: var(--f-cobalt) !important; color: #fff !important; -webkit-text-fill-color: #fff !important; border-color: var(--f-cobalt) !important; box-shadow: none; }
body.app-theme-f .sidebar .nav-button small { color: #c7d2e1; -webkit-text-fill-color: #c7d2e1; }
body.app-theme-f :is(.primary-button, .mobile-next-action-button) { background: var(--f-cobalt) !important; color: #fff !important; -webkit-text-fill-color: #fff !important; border-color: var(--f-cobalt); }
body.app-theme-f :is(.segment.active, .property-client-chip.active, .profile-client-button.active, .demo-file-card.active, .selected-chip, .selected-location-chip, .criteria-choice-grid label:has(input:checked), .review-flow-step.active, .loan-option.selected, .loan-option.suggested) { background: var(--f-soft); border-color: var(--f-cobalt); color: var(--app-teal-dark); box-shadow: none; }
body.app-theme-f :is(.unit-chip:hover, .unit-chip.active, .criteria-choice-grid label:has(input:checked)::after) { background: var(--f-cobalt); color: #fff; }
body.app-theme-f :is(.selected-location-chip button, .review-flow-step em, .range-preview strong, .scenario-path-banner strong, .summary-priority span, .summary-priority strong, .urla-menu-button span) { color: var(--app-teal-dark); }
body.app-theme-f :is(.range-preview, .share-instructions span, .prefill-panel, .loan-path-control, .sandbox-loan-selector, .scenario-path-banner, .summary-priority, .urla-menu-button span, .workflow-panel.create-panel) { background: var(--f-soft); border-color: var(--line); }
body.app-theme-f :is(.progress-bar span, .completion-meter-bar span) { background: var(--f-cobalt); }
body.app-theme-f .completion-meter-bar { background: #dce4ef; }
body.app-theme-f .completion-meter strong { color: var(--app-teal-dark); }
body.app-theme-f input[type="range"] { accent-color: var(--f-cobalt); }
/* Decorative category rails are not readiness/status indicators. */
body.app-theme-f :is(#dashboard-view .panel, #intake-view .panel, #settings-view .panel, #profile-view .client-summary, .card-client, .card-numbers, .card-review, .card-handoff)::before { background: var(--f-cobalt); }
body.app-theme-f .intake-grid fieldset:nth-child(n) { background: #f8faff; box-shadow: inset 4px 0 var(--f-cobalt); }
body.app-theme-f :is(.mlo-command-hero, .action-center, .client-portal-primary-task) { background: linear-gradient(135deg, #fff, #eaf1ff); border-color: var(--line); }
body.app-theme-f :is(.profile-list, .program-menu-item, .urla-section-menu, .mlo-mobile-command-strip, .mobile-active-file-overview, .mobile-file-next, .mobile-docs-overview, .mobile-property-hub-overview, .mobile-client-property-overview, .property-visit-focus, .property-support-snapshot, .scenario-topline, .scenario-field.highlight, .prequal-sendable-box, .import-batch-item, .mlo-calibration-row.profile-field, .mlo-workflow-editor, .document-delivery-box, .verified-lock-panel, .sandbox-adopt-panel, .investor-comparison-section, .loan-option.investor-path, .loan-support-chip:not(.empty), .guideline-evidence-panel, .nonconforming-investor-panel, .contact-event-box) { background: #f5f7fb; border-color: var(--line); box-shadow: none; }
body.app-theme-f .investor-option-header em { background: var(--f-soft); color: var(--app-teal-dark); }
/* Match the accumulated clean-mlo-review specificity, rather than blanket !important. */
body.app-theme-f.clean-mlo-review #profile-view .profile-area :is(.panel, .profile-card, .card-grid, .card-body, .collapsible-card, .mlo-financial-review, .operator-card-tools, .doc-request-editor, .summary-grid, .edit-grid, .mlo-line-review-list, .prequal-scenario-grid, .official-support-grid, .mlo-readiness-strip) { background: #fff; border-color: var(--line); box-shadow: 0 2px 8px #12233f06; }
body.app-theme-f.clean-mlo-review #profile-view .profile-area :is(details.panel > summary, .panel > .panel-heading, .profile-card > h4:first-child, .collapsible-card > summary, .operator-card-tools > summary) { background: #f5f7fb; border-color: var(--line); box-shadow: inset 4px 0 var(--line); }
body.app-theme-f.clean-mlo-review #profile-view .mlo-financial-review > .operator-card-tools > summary::before { color: var(--muted); background: var(--f-soft); }
/* Portal light hero: reset inherited white text from both phone context variants. */
body.app-theme-f :is(#clientPortal-view, #profile-view) .client-portal-hero { background: var(--f-soft); color: var(--ink); border-color: var(--line); }
body.app-theme-f :is(#clientPortal-view, #profile-view) .client-portal-hero :is(h3, h4, strong) { color: var(--f-navy); }
body.app-theme-f :is(#clientPortal-view, #profile-view) .client-portal-hero :is(p, span, small, .subtle-badge) { color: var(--muted); }
body.app-theme-f :is(#clientPortal-view, #profile-view) :is(.client-file-id-card > div, .client-portal-trust-strip > div) { background: #fff; border-color: var(--line); }
/* Phone !important declarations require scoped important counterparts. */
body.app-theme-f.mobile-mlo-shell .active-file-context { background: var(--bg) !important; box-shadow: 0 8px 18px #12233f14 !important; }
body.app-theme-f.mobile-mlo-shell #profile-view.active-view :is(.phone-file-v2-client > span, .phone-file-v2-select > span, .phone-file-v2-dock-context > span, .phone-file-v2-current > span, .phone-file-v2-row > span, .phone-file-v2-client-select > span, .phone-file-v2-dock-context small, .phone-file-v2-client small:first-child) { color: var(--muted) !important; }
body.app-theme-f.mobile-mlo-shell #profile-view.active-view :is(.phone-file-v2-client-select select, .phone-file-v2-client-select input, .phone-file-v2-select select) { color: var(--ink) !important; }
/* Keep semantic alerts visible even under legacy phone/dark important surfaces. */
body.app-theme-f .view :is(.badge.red, .guardrail-note.danger) { color: var(--f-red) !important; background: #fae9e7 !important; border-color: #d5aaa2 !important; }
body.app-theme-f .view :is(.badge.gold, .guardrail-note.warn) { color: var(--f-amber) !important; background: #fff5d8 !important; border-color: #d9c58d !important; }
body.app-theme-f .view :is(.badge.green, .guardrail-note.ok) { color: var(--f-green) !important; background: #e5f4ed !important; border-color: #a8ccba !important; }
body.app-theme-f .view .danger-button { background: #fae9e7 !important; color: var(--f-red) !important; -webkit-text-fill-color: var(--f-red) !important; border-color: #d5aaa2 !important; }
/* Screenshot-confirmed non-status identity/action surfaces, shared across routes. */
body.app-theme-f .action-center::before { background: var(--f-cobalt); }
body.app-theme-f .view :is(.area-chip, .property-type-chip) { color: var(--app-teal-dark); background: var(--f-soft); border-color: var(--line); }

/* Section selectors and nested menu active rails formerly retained green shadows. */
body.app-theme-f #profile-view .profile-area { --area-bg: #f5f7fb; }
body.app-theme-f .subarea-menu button.active { border-color: var(--f-cobalt); box-shadow: inset 4px 0 var(--f-cobalt); }
body.app-theme-f :is(.section-menu button, .urla-section-menu) { background: #f5f7fb; color: var(--ink); }
body.app-theme-f .section-menu button:is(.active, :hover) { background: var(--f-soft); color: var(--app-teal-dark); border-color: var(--line); }

/* APB integration: structural task surfaces; no form/action removal. */
body.app-theme-f .apb-client-header, body.app-theme-f .apb-card,
body.app-theme-f .apb-disclosure, body.app-theme-f .apb-view-guide {
  padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-width: 0;
}
body.app-theme-f .apb-client-header { border-left: 5px solid var(--f-cobalt); margin-bottom: 14px; }
body.app-theme-f .apb-client-header h2 { margin: 6px 0; font-size: 28px; color: var(--f-navy); }
body.app-theme-f .apb-card h3 { margin: 0 0 12px; color: var(--f-navy); }
body.app-theme-f .apb-card p { line-height: 1.55; }
body.app-theme-f .apb-card small { display: block; margin-top: 12px; }
body.app-theme-f .apb-two-column { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); gap: 18px; }
body.app-theme-f .apb-three-column { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
body.app-theme-f .apb-blocker { background: #fffaf0; border-color: #d8bd8c; }
body.app-theme-f .apb-blocker > .eyebrow { color: var(--f-red); }
body.app-theme-f .apb-shortcuts { display: flex; gap: 12px; margin: 0 0 20px; }
body.app-theme-f .apb-shortcuts button { min-width: 120px; padding: 12px 20px; background: #fff; color: var(--f-navy); border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }
body.app-theme-f .apb-shortcuts [aria-current="page"] { background: var(--f-cobalt); border-color: var(--f-cobalt); color: #fff; }
body.app-theme-f .apb-status-strip { display: flex; flex-wrap: wrap; gap: 20px; background: var(--f-soft); padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
body.app-theme-f .apb-table-scroll { overflow-x: auto; }
body.app-theme-f .apb-doc-table { width: 100%; border-collapse: collapse; text-align: left; }
body.app-theme-f .apb-doc-table th, body.app-theme-f .apb-doc-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); }
body.app-theme-f .apb-doc-table thead th { background: var(--f-soft); }
body.app-theme-f .apb-disclosure { margin: 14px 0; }
body.app-theme-f .apb-disclosure > summary { cursor: pointer; font-weight: 700; color: #19469d; padding: 4px; }
body.app-theme-f .apb-disclosure-body { display: grid; gap: 16px; margin-top: 18px; }
body.app-theme-f .apb-amount { display: block; font-size: 28px; color: var(--f-navy); }
body.app-theme-f .apb-value-status { background: var(--f-soft); padding: 8px; border-radius: 6px; }
body.app-theme-f .apb-view-guide { margin-bottom: 16px; }
body.app-theme-f .apb-view-guide[hidden] { display: none; }
body.app-theme-f .sidebar .apb-nav-toggle { width: 100%; text-align: left; border: 0; background: transparent; color: #dce7fb; padding: 6px 12px; font-size: 11px; }
body.app-theme-f .apb-numbers-nav { padding: 0; border: 0; background: transparent; color: #fff; }
body.app-theme-f .apb-numbers-nav summary { padding: 10px 8px; cursor: pointer; font-weight: 700; }
body.app-theme-f .apb-numbers-nav small { display: block; font-size: 10px; color: #c1d4f3; }
body.app-theme-f .apb-numbers-nav button { display: block; width: calc(100% - 12px); margin-left: 12px; }
body.app-theme-f .nav-group > .nav-button-primary::after { content: none; }
body.app-theme-f :is(.apb-shortcuts button,.apb-nav-toggle,.apb-disclosure summary,.apb-numbers-nav summary):focus-visible { outline: 3px solid #f0b84b; outline-offset: 3px; }
@media (min-width: 701px) {
 body.app-theme-f .sidebar { height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; overflow: hidden; }
 body.app-theme-f .sidebar .nav-list { overflow-y: auto; min-height: 0; flex: 1; }
 body.app-theme-f .sidebar .brand, body.app-theme-f .sidebar-note { flex-shrink: 0; }
 body.app-theme-f[data-active-view="profile"] #work-area-context { padding: 10px 16px; }
 body.app-theme-f[data-active-view="profile"] .work-area-title { display: none; }
 body.app-theme-f #profile-view .profile-area-heading { padding: 8px 0; }
 body.app-theme-f #profile-view .profile-area { gap: 18px; }
 body.app-theme-f #followup-columns { grid-template-columns: minmax(0,1fr); }
 body.app-theme-f #followup-columns .alert-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
 body.app-theme-f #followup-columns .alert-column > h3 { grid-column: 1/-1; }
 body.app-theme-f #intake-view .urla-intake-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 900px) {
 body.app-theme-f .apb-two-column, body.app-theme-f .apb-three-column { grid-template-columns: minmax(0,1fr); }
 body.app-theme-f .apb-shortcuts button { min-width: 0; flex: 1; padding: 12px; }
}

/* APB specialized work areas: task/editor first, reference tools second. */
body.app-theme-f .apb-task-entry h4 { margin: 0; color: var(--f-navy); }
body.app-theme-f .apb-review-save { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--f-soft); }
body.app-theme-f .apb-review-save p { margin-top: 0; }
body.app-theme-f .apb-disclosure > summary { min-height: 32px; }
body.app-theme-f .profile-area > .profile-card:not(details) { min-width: 0; }

/* Workflow navigation: label and disclosure share one row. */
body.app-theme-f .sidebar .nav-group { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: stretch; }
body.app-theme-f .sidebar .nav-group > .nav-button { grid-column: 1; grid-row: 1; min-width: 0; }
body.app-theme-f .sidebar .nav-group > .apb-nav-toggle { grid-column: 2; grid-row: 1; width: 40px; min-height: 44px; padding: 0; text-align: center; font-size: 20px; cursor: pointer; }
body.app-theme-f .sidebar .apb-nav-toggle span { display: inline-block; }
body.app-theme-f .sidebar .apb-nav-toggle[aria-expanded="true"] span { transform: rotate(90deg); }
body.app-theme-f .sidebar .nav-group > .nav-submenu { grid-column: 1 / -1; }
body.app-theme-f .sidebar .apb-nav-section-label { color: #aabbd5; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 14px 8px 5px; }

/* Review refinements: compact sidebar and one desktop client identity. */
body.app-theme-f .sidebar .nav-list { align-content: start; grid-auto-rows: max-content; }
body.app-theme-f .sidebar .nav-group { align-content: start; }
body.app-theme-f .sidebar .apb-nav-section-label { color: #fff; background: #253f66; border-left: 3px solid #72a3ff; border-radius: 4px; font-size: 12px; font-weight: 800; letter-spacing: .045em; padding: 8px; margin-top: 10px; text-transform: uppercase; }
body.app-theme-f .active-client-switcher-head { flex-wrap: wrap; gap: 12px; }
body.app-theme-f .apb-floating-area-menu { border-top: 1px solid #b9cce9; padding: 8px 0 0; margin-top: 8px; max-height: 180px; overflow-y: auto; }
body.app-theme-f .apb-floating-area-menu .subarea-menu { margin: 0; padding: 0; }
body.app-theme-f .apb-floating-area-menu .subarea-menu-grid { display: flex; flex-wrap: wrap; gap: 6px; }
body.app-theme-f .apb-floating-area-menu .subarea-menu-grid button { flex: 1 1 135px; padding: 7px 10px; }
body.app-theme-f .apb-floating-area-menu .subarea-menu-grid button span,
body.app-theme-f .apb-floating-area-menu .section-subhead { display: none; }
body.app-theme-f .apb-area-links { display: flex; flex-wrap: wrap; gap: 6px; }
body.app-theme-f .apb-area-links button { padding: 7px 10px; border: 1px solid #b9cce9; border-radius: 6px; color: #12233f; background: #fff; cursor: pointer; }
body.app-theme-f .apb-area-links button[aria-current="page"] { color: #fff; background: #2563eb; }
@media (min-width: 701px) {
 body.app-theme-f:not(.mobile-mlo-shell) #profile-detail > .apb-client-header,
 body.app-theme-f:not(.mobile-mlo-shell) #profile-detail > .apb-shortcuts,
 body.app-theme-f:not(.mobile-mlo-shell)[data-active-view="profile"] #section-menu,
 body.app-theme-f:not(.mobile-mlo-shell)[data-active-view="propertyHub"] #section-menu,
 body.app-theme-f:not(.mobile-mlo-shell) #profile-detail .subarea-menu[aria-label="Qualification work areas"] { display: none; }
}

@media (min-width: 701px) {
 body.app-theme-f:not(.mobile-mlo-shell) #profile-detail .apb-disclosure:has(> .apb-disclosure-body > .subarea-menu[aria-label="Qualification work areas"]:only-child) { display: none; }
}
/* Operator UAT: persistent scoped save; no positive tabindex or hidden-field focus traps. */
body.app-theme-f .operator-save-bar { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; padding:.45rem 0; }
body.app-theme-f .operator-save-bar [role=status] { font-size:.8rem; max-width:42rem; }
body.app-theme-f .operator-rule-editor { border:1px solid var(--border,#d7dce4); padding:1rem; margin:.75rem 0; border-radius:12px; }
body.app-theme-f .operator-rule-editor summary { cursor:pointer; font-weight:700; }
body.app-theme-f .operator-funding { margin:1rem 0; padding:1rem; border:1px solid var(--border,#d7dce4); border-radius:12px; }
body.app-theme-f .operator-partner-directory { grid-column:1/-1; }
body.app-theme-f .line-item-row input[type=date] { min-width:0; width:100%; }
body.app-theme-f .assistance-program-review textarea { width:100%; min-height:6rem; resize:vertical; }
@media(max-width:600px){ body.app-theme-f .operator-save-bar .primary-button{width:100%;} body.app-theme-f .operator-rule-editor .edit-grid{grid-template-columns:1fr;} }
/* UAT completion: compact sticky navigation, explicit section save scope. */
body.app-theme-f .uat-save-guide { font-size:.8rem; max-width:48rem; }
body.app-theme-f .uat-save-guide summary { cursor:pointer; }
body.app-theme-f .uat-save-guide p { max-height:9rem; overflow:auto; }
body.app-theme-f .uat-path-editor { padding:12px; border:1px solid #c9d6eb; border-radius:10px; margin:10px 0; }
body.app-theme-f .uat-path-editor > summary { font-weight:700; cursor:pointer; padding:8px; }
body.app-theme-f .uat-path-output { margin-top:12px; font-size:.9rem; }
body.app-theme-f .property-loan-fit-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr)); align-items:start; }
body.app-theme-f .property-loan-fit-grid > article { align-content:start; }
body.app-theme-f .property-loan-fit-grid .uat-path-output .summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.app-theme-f .property-loan-fit-grid .summary-item { overflow-wrap:normal; word-break:normal; }
body.app-theme-f .property-loan-fit-grid .summary-wide { grid-column:1 / -1; }
body.app-theme-f .subarea-menu button { min-height:40px; padding:8px 12px; }
body.app-theme-f .profile-area { scroll-margin-top:320px; }
body.app-theme-f :is(input,select,textarea,button,summary):focus-visible { outline:3px solid #d18a00; outline-offset:2px; }

/* APB 2026-10-29: shared operator work surfaces, facts distinct from editable inputs. */
body.app-theme-f.clean-mlo-review #profile-view .profile-area .edit-grid, body.app-theme-f.clean-mlo-review #profile-view .profile-area .quick-estimate {padding:16px; border:1px solid #cbd5e1; border-left:4px solid #2563eb; border-radius:10px; background:#f8fbff; gap:16px;}
body.app-theme-f.clean-mlo-review #profile-view .profile-area .summary-grid {gap:12px; margin:12px 0 20px;}
body.app-theme-f.clean-mlo-review #profile-view .profile-area .summary-grid > * {min-width:0; overflow-wrap:normal;}
body.app-theme-f.clean-mlo-review #profile-view .profile-area details > summary {padding:12px 4px; cursor:pointer; line-height:1.45;}
body.app-theme-f.clean-mlo-review #profile-view .profile-area .field-help {line-height:1.6; max-width:88ch;}
body.app-theme-f.clean-mlo-review #profile-assistance-review .operator-assistance-comparison > h4 {margin:24px 0 12px; font-size:1.05rem;}
body.app-theme-f.clean-mlo-review #profile-assistance-review [data-assistance-preview] {padding:18px; border:1px solid #cbd5e1; border-radius:12px; background:#fff;}
body.app-theme-f.clean-mlo-review #profile-assistance-review [data-assistance-preview] .summary-grid {grid-template-columns:repeat(auto-fit,minmax(210px,1fr));}
body.app-theme-f.clean-mlo-review #profile-assistance-review .edit-grid > p {grid-column:1/-1;}
body.app-theme-f.clean-mlo-review #profile-assistance-review input:disabled {background:#edf0f4; color:#64748b;}
@media(max-width:600px){body.app-theme-f.clean-mlo-review #profile-view .profile-area .edit-grid,body.app-theme-f.clean-mlo-review #profile-view .profile-area .quick-estimate {padding:10px;grid-template-columns:1fr;}}
