/*
 * ============================================================================
 * PROJECT: RISE - Responsible Infrastructure for Social Empowerment
 * DEVELOPER: Justin DePaolis-Metz
 * FILE: public/styles.css
 * PURPOSE: Provides shared protected-app layout, controls, responsive behavior, modal, table, dashboard, outreach, and admin styling across RISE pages.
 * LAST REVIEWED: 2026-05-30
 * ============================================================================
 */

/* === Root Variables And Global Reset === */
:root {
  color-scheme: light;
  --rise-blue: #4B53B9;
  --rise-yellow: #F8CD38;
  --rise-text: #212529;
  --muted: #6c757d;
  --line: #dee2e6;
  --page: #f4f6f8;
  --orange:#df6238;
  --card-bg: #fff;
  --surface-1: #f8f9fa;
  --surface-2: #eef1f5;
  --shadow-soft: 0 2px 10px rgba(0,0,0,.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d1b3e;
  --card-bg: #15254e;
  --surface-1: #1a2a56;
  --surface-2: #263868;
  --rise-text: #f8faff;
  --muted: #d9ca8a;
  --muted-strong: #efe0a3;
  --line: #3b4e85;
  --rise-blue-dark: #8b99ff;
  --shadow-soft: none;
}

:root[data-theme="dark"] body {
  background: var(--page);
  color: var(--rise-text);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .notification-tray,
:root[data-theme="dark"] .tray-widget,
:root[data-theme="dark"] .fab-panel {
  background: var(--card-bg) !important;
  color: var(--rise-text);
  border-color: var(--line);
  box-shadow: none;
}

:root[data-theme="dark"] .fab-panel {
  background: #242936 !important;
  border: 1px solid #3f4758;
}

:root[data-theme="dark"] .panel-item {
  color: #f3f5fa;
  border-color: #3a4050;
}

:root[data-theme="dark"] .panel-item:hover,
:root[data-theme="dark"] .panel-item:focus-visible {
  background: #303748;
}

:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .threshold-card,
:root[data-theme="dark"] .content-card,
:root[data-theme="dark"] .profile-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .admin-card,
:root[data-theme="dark"] .panel-card,
:root[data-theme="dark"] .glance-card,
:root[data-theme="dark"] .micro-card,
:root[data-theme="dark"] .widget-expanded,
:root[data-theme="dark"] .notification-card,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .threshold-panel,
:root[data-theme="dark"] .person-card,
:root[data-theme="dark"] .convo-card,
:root[data-theme="dark"] .glance-summary,
:root[data-theme="dark"] .cfs-card,
:root[data-theme="dark"] .content-module-wrapper,
:root[data-theme="dark"] .survey-final-preview-shell,
:root[data-theme="dark"] .schedule-card,
:root[data-theme="dark"] .mobile-record-card,
:root[data-theme="dark"] .search-dropdown,
:root[data-theme="dark"] .edit-menu,
:root[data-theme="dark"] .mobile-cards {
  background: var(--card-bg) !important;
  color: var(--rise-text) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .search-input {
  background: #0d1428 !important;
  color: #f2f5ff !important;
  border-color: #4b5aa0 !important;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #98a5c8 !important;
}

:root[data-theme="dark"] table,
:root[data-theme="dark"] .source-table,
:root[data-theme="dark"] .data-table,
:root[data-theme="dark"] .members-table,
:root[data-theme="dark"] .summary-table {
  background: var(--card-bg) !important;
  color: var(--rise-text) !important;
  border-color: var(--line) !important;
}

:root[data-theme="dark"] thead,
:root[data-theme="dark"] th {
  background: #182345 !important;
  color: #f2f5ff !important;
  border-color: var(--line) !important;
}

:root[data-theme="dark"] td {
  background: #111a33 !important;
  color: #dce4f7 !important;
  border-color: var(--line) !important;
}

:root[data-theme="dark"] tr:nth-child(even) td {
  background: #151f3b !important;
}

:root[data-theme="dark"] .notification-tray {
  background: var(--card-bg) !important;
  border-color: var(--line) !important;
}

:root[data-theme="dark"] .notification-tray .source-table,
:root[data-theme="dark"] .notification-tray table,
:root[data-theme="dark"] .notification-tray th,
:root[data-theme="dark"] .notification-tray td {
  background: #111a33 !important;
  color: #eef2ff !important;
  border-color: #3a466d !important;
}

:root[data-theme="dark"] .notification-tray .widget-badge {
  border-color: #5f6fee;
}

:root[data-theme="dark"] main,
:root[data-theme="dark"] .app-shell,
:root[data-theme="dark"] .page-shell,
:root[data-theme="dark"] .dashboard-shell,
:root[data-theme="dark"] .dashboard-container,
:root[data-theme="dark"] .content-wrap,
:root[data-theme="dark"] .home-shell,
:root[data-theme="dark"] .app-container,
:root[data-theme="dark"] .summary-content,
:root[data-theme="dark"] .outreach-page,
:root[data-theme="dark"] .cfs-section-shell,
:root[data-theme="dark"] .issues-container,
:root[data-theme="dark"] .route-shell {
  background: var(--page) !important;
  color: var(--rise-text);
}

:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .brand-hero,
:root[data-theme="dark"] .dashboard-hero,
:root[data-theme="dark"] .page-hero,
:root[data-theme="dark"] .home-hero,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] footer,
:root[data-theme="dark"] .public-rise-footer {
  background: #0d1833 !important;
  color: var(--rise-text) !important;
  border-color: var(--line) !important;
}

:root[data-theme="dark"] .utility-header,
:root[data-theme="dark"] header.utility-header,
:root[data-theme="dark"] .public-rise-header {
  background: linear-gradient(90deg, #071033 0%, #101b52 58%, #27316f 100%) !important;
}

:root[data-theme="dark"] .btn:not(.primary):not(.danger):not(.success),
:root[data-theme="dark"] .utility-actions .btn,
:root[data-theme="dark"] .ghost-btn,
:root[data-theme="dark"] button.ghost {
  background: rgba(223, 230, 255, .06) !important;
  color: #eef2ff !important;
  border-color: #7f8cff !important;
}

:root[data-theme="dark"] .btn:not(.primary):not(.danger):not(.success):hover,
:root[data-theme="dark"] .utility-actions .btn:hover {
  background: rgba(223, 230, 255, .14) !important;
}

:root[data-theme="dark"] .membership-threshold-label,
:root[data-theme="dark"] .density-threshold-label,
:root[data-theme="dark"] .membership-chart text,
:root[data-theme="dark"] .membership-axis-label {
  color: #ffe680 !important;
  fill: #ffe680 !important;
}

:root[data-theme="dark"] .membership-scroll-cue,
:root[data-theme="dark"] .rise-table-scroll-cue {
  background: #182345 !important;
  color: #f7dd5c !important;
  border-color: #5263c7 !important;
}

:root[data-theme="dark"] .membership-y-axis-layer {
  background: linear-gradient(90deg, #111a33 0%, rgba(17,26,51,.9) 72%, rgba(17,26,51,0) 100%) !important;
}

:root[data-theme="dark"] .coverage-canvas,
:root[data-theme="dark"] .department-coverage-canvas,
:root[data-theme="dark"] .activist-map-canvas,
:root[data-theme="dark"] .map-canvas,
:root[data-theme="dark"] .canvas-panel {
  background-color: #101a35 !important;
  background-image: radial-gradient(rgba(127, 140, 255, .18) 1px, transparent 1px) !important;
  background-size: 18px 18px !important;
  border-color: var(--line) !important;
}

:root[data-theme="dark"] .coverage-node,
:root[data-theme="dark"] .department-card,
:root[data-theme="dark"] .map-node {
  background: #172242 !important;
  color: var(--rise-text) !important;
  border-color: #5263c7 !important;
}

@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar {
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
    padding: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row {
    display: grid !important;
    gap: 5px !important;
    min-width: 0;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row-main {
    grid-template-columns: minmax(78px, 1.4fr) minmax(44px, .7fr) repeat(8, minmax(28px, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row-secondary {
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row-merge {
    grid-template-columns: 1fr !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar button,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .toolbar-select,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-color {
    align-items: center !important;
    border: 1px solid #ced4da !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    font-size: .78rem !important;
    font-weight: 900 !important;
    justify-content: center !important;
    min-height: 32px !important;
    min-width: 0 !important;
    padding: 4px 5px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .toolbar-select {
    background: #fff !important;
    color: #495057 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .toolbar-select.compact {
    padding-left: 3px !important;
    padding-right: 3px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-color {
    background: #fff;
    color: #495057;
    gap: 3px;
    overflow: hidden;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-color input {
    border: 0 !important;
    height: 20px !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: 24px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-merge-select {
    justify-content: flex-start !important;
    min-height: 36px !important;
    text-align: left !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-target-layout {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-active-target-list {
    border-color: #1f6fff !important;
    margin: 0 0 2px !important;
    min-height: 0 !important;
    order: -1;
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-active-target-list .active-target-list-body {
    font-size: .9rem !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-active-target-list .quick-actions {
    gap: 7px !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card {
    margin-bottom: 0 !important;
    padding: 10px 12px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .wizard-grid {
    gap: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .filter-box {
    background: #f8f9fa !important;
    border: 1px solid #ccd3dc !important;
    border-radius: 6px !important;
    max-height: 136px !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .filter-box hr,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .filter-box > div[style*="border-top"] {
    margin: 5px 0 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .check-row {
    display: flex !important;
    gap: 7px !important;
    min-height: 28px !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .check-row input[type="checkbox"] {
    height: 17px !important;
    margin: 0 !important;
    min-height: 0 !important;
    width: 17px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-add-target-btn {
    margin-top: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-tabs {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-tabs button {
    background: #fff !important;
    border: 2px solid #d7daf9 !important;
    border-radius: 7px !important;
    color: var(--rise-blue) !important;
    font-size: .82rem !important;
    font-weight: 900 !important;
    min-height: 40px !important;
    padding: 7px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-tabs button.active {
    background: var(--rise-blue) !important;
    border-color: var(--rise-blue) !important;
    color: #fff !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-panel {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-panel.active {
    display: block !important;
  }
}

/* Phone-only Petition Builder refinement. Keep after earlier Outreach mobile
   blocks so re-rendered builder state inherits the compact treatment. */
@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal {
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-modal .dialog.full {
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: 100vw !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-modal header {
    min-height: 50px !important;
    padding: 8px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-modal header h2 {
    font-size: 1rem !important;
    line-height: 1.15 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-modal .modal-body {
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .mobile-builder-tabs {
    padding: 0 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .mobile-builder-tabs button {
    font-size: .86rem !important;
    min-height: 40px !important;
    padding: 7px 4px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .builder-pane,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-preview-mode .preview-pane {
    padding: 10px 10px 88px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .mobile-builder-accordion {
    border-radius: 7px !important;
    margin-bottom: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .mobile-builder-accordion-toggle {
    font-size: .9rem !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .wizard-grid,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .wizard-grid.three {
    gap: 9px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-label {
    font-size: .68rem !important;
    line-height: 1.15 !important;
    margin-bottom: 4px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .input,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .select,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .textarea {
    border-radius: 6px !important;
    font-size: .92rem !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .letterhead-box {
    border-radius: 7px !important;
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .letterhead-header {
    font-size: .88rem !important;
    line-height: 1.32 !important;
    margin-bottom: 10px !important;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar button {
    font-size: .78rem !important;
    min-height: 32px !important;
    padding: 4px 5px !important;
    white-space: nowrap;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-editor {
    font-size: .95rem !important;
    line-height: 1.42 !important;
    min-height: 138px !important;
    padding: 10px !important;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .pane-head {
    align-items: stretch !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: 1fr !important;
    margin: 14px 0 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .pane-head .muted {
    font-size: .8rem !important;
    line-height: 1.25 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .pane-head .btn,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .target-card .btn {
    min-height: 40px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #fieldManagerList {
    display: grid !important;
    gap: 8px !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-manager-item {
    border-radius: 7px !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    min-height: 46px !important;
    padding: 8px 9px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-label-text {
    font-size: .9rem !important;
    line-height: 1.15 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .required-check {
    font-size: .78rem !important;
    gap: 5px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-pane .wizard-grid {
    gap: 9px !important;
    margin-bottom: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .check-row {
    align-items: center !important;
    font-size: .86rem !important;
    line-height: 1.2 !important;
    min-height: 36px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-card,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #finalPetitionPreview .preview-card {
    border-radius: 7px !important;
    margin: 0 auto 12px !important;
    max-width: 100% !important;
    padding: 16px 12px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-card h3 {
    font-size: 1.03rem !important;
    line-height: 1.18 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-header {
    font-size: 1rem !important;
    line-height: 1.15 !important;
    margin: 16px 0 12px !important;
    padding-bottom: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-input {
    align-items: center !important;
    font-size: .88rem !important;
    gap: 8px !important;
    margin-bottom: 9px !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-input.long {
    min-height: 76px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-btn {
    letter-spacing: .04em !important;
    margin-top: 10px !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petition-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petition-step-finalize {
    padding: 10px 10px 88px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .target-card {
    border-radius: 7px !important;
    margin-bottom: 10px !important;
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .target-title {
    font-size: .82rem !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
    padding-bottom: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .filter-box {
    max-height: 146px !important;
    padding: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .chip {
    line-height: 1.15 !important;
    margin: 4px 4px 0 0 !important;
    max-width: 100%;
    white-space: normal !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #finalPetitionPreview {
    margin-top: 12px !important;
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .safe-note {
    font-size: .86rem !important;
    line-height: 1.32 !important;
    padding: 10px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal footer {
    gap: 6px !important;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal footer .btn {
    font-size: 1rem !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .modal-footer-left,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .modal-footer-right {
    gap: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #targetListModal .dialog.narrow,
  body:has(.outreach-page):not(.public-outreach-page) #targetListModal .dialog {
    height: calc(100dvh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    width: calc(100vw - 16px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #targetListModal .modal-body {
    max-height: none !important;
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #targetListModal .report-table-wrap {
    margin: 0 -2px !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
}

.email-finalize-tabs {
  display: none;
}

.survey-final-tabs {
  display: none;
}

@media(max-width:900px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .row-content,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .column-cell,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-module-placeholder {
    overflow: visible !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-module-placeholder {
    min-height: 176px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button {
    height: 66px !important;
    width: 66px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="text"] {
    transform: translate(-76px, 28px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="image"] {
    transform: translate(-42px, -40px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="button"] {
    transform: translate(42px, -40px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="divider"] {
    transform: translate(76px, 28px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="row"] {
    transform: translate(0, 42px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph {
    color: transparent !important;
    font-size: 0 !important;
    height: 16px !important;
    margin-bottom: 2px !important;
    position: relative !important;
    width: 27px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph::before {
    border: 2px solid #212529 !important;
    border-radius: 5px !important;
    content: "" !important;
    display: block !important;
    height: 12px !important;
    width: 23px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr {
    display: table !important;
    max-width: none !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody {
    display: table-row-group !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr {
    display: table-row !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr > td.column-cell {
    display: table-cell !important;
    max-width: none !important;
    vertical-align: top !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-target .target-layout {
    display: flex !important;
    flex-direction: column !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-target .active-target-list {
    order: -1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-left,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-right {
    display: contents !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="1"] #emailBackBtn {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="1"] #emailSaveDraftBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="1"] #emailNextBtn {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailSaveDraftBtn {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailScheduleBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailBackBtn {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailSendBtn {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs button {
    background: #fff !important;
    border: 2px solid #d7daf9 !important;
    border-radius: 7px !important;
    color: var(--rise-blue) !important;
    font-size: .82rem !important;
    font-weight: 900 !important;
    min-height: 40px !important;
    padding: 7px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs button.active {
    background: var(--rise-blue) !important;
    border-color: var(--rise-blue) !important;
    color: #fff !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .target-layout {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .email-finalize-panel {
    display: none !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .email-finalize-panel.active {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview .mobile-split-control {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table {
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table.mobile-split-row > tbody > tr > td,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table.mobile-split-row > tbody > tr > td,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table.email-row.mobile-split-row > tbody > tr > td,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table.email-row.mobile-split-row > tbody > tr > td {
    display: table-cell !important;
    max-width: none !important;
    vertical-align: top !important;
  }
}

/* Campaign at a Glance layout lock: keep summary centered and issue rows contained. */
#campaign-glance-widget .glance-summary {
  align-items: start !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  justify-items: stretch !important;
}

#campaign-glance-widget .glance-summary .glance-summary-item {
  align-content: start !important;
  display: grid !important;
  gap: 2px !important;
  justify-items: center !important;
  min-width: 0 !important;
  text-align: center !important;
}

#campaign-glance-widget .glance-summary .glance-summary-label,
#campaign-glance-widget .glance-summary .glance-summary-bu .glance-summary-label {
  display: block !important;
  font-size: .82rem !important;
  line-height: 1.02 !important;
  white-space: normal !important;
}

#campaign-glance-widget .glance-summary .glance-summary-bu .glance-summary-label {
  white-space: nowrap !important;
}

#campaign-glance-widget .glance-summary .glance-summary-value {
  display: block !important;
  line-height: 1.05 !important;
}

#campaign-glance-widget .issue-row.issue-detail-row {
  align-items: baseline !important;
  column-gap: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content max-content !important;
  overflow: hidden !important;
  row-gap: 2px !important;
}

#campaign-glance-widget .issue-row.issue-detail-row .issue-title {
  justify-self: start !important;
  min-width: 0 !important;
}

#campaign-glance-widget .issue-row.issue-detail-row .issue-count {
  color: var(--rise-blue) !important;
  font-weight: 900 !important;
  justify-self: end !important;
  white-space: nowrap !important;
}

#campaign-glance-widget .issue-row.issue-detail-row .issue-context {
  color: #495057 !important;
  font-size: .82rem !important;
  font-weight: 400 !important;
  justify-self: end !important;
  min-width: 0 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

@media(max-width:900px) {
  #campaign-glance-widget .issue-row.issue-detail-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #campaign-glance-widget .issue-row.issue-detail-row .issue-context {
    grid-column: 1 / -1 !important;
  }
}

@media(min-width:768px) and (max-width:1700px) {
  #campaign-glance-widget .glance-right .issue-row.issue-detail-row {
    grid-template-columns: minmax(9rem, 1fr) minmax(12rem, 58%) !important;
  }

  #campaign-glance-widget .glance-right .issue-row.issue-detail-row .issue-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #campaign-glance-widget .glance-right .issue-row.issue-detail-row .issue-count {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  #campaign-glance-widget .glance-right .issue-row.issue-detail-row .issue-context {
    grid-column: 2 !important;
    grid-row: 2 !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
}

@media(max-width:767px) {
  #campaign-glance-widget .glance-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #campaign-glance-widget .glance-summary .glance-summary-item {
    display: grid !important;
    gap: 2px !important;
    justify-items: center !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  #campaign-glance-widget .glance-summary .glance-summary-label {
    display: block !important;
    font-size: .82rem !important;
    line-height: 1.02 !important;
    white-space: normal !important;
  }

  #campaign-glance-widget .glance-summary .glance-summary-bu .glance-summary-label {
    font-size: .82rem !important;
    white-space: nowrap !important;
  }

  #campaign-glance-widget .glance-summary .glance-summary-value {
    display: block !important;
    font-size: 1.08rem !important;
    line-height: 1.05 !important;
  }

  #campaign-glance-widget .issue-row.issue-detail-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #campaign-glance-widget .issue-row.issue-detail-row .issue-context {
    grid-column: 1 / -1 !important;
    justify-self: end !important;
    white-space: normal !important;
  }
}

/* Campaign at a Glance final override: keep summary centered and issue rows contained. */
#campaign-glance-widget .glance-summary {
  align-items: start !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  justify-items: stretch !important;
}

#campaign-glance-widget .glance-summary .glance-summary-item {
  align-content: start !important;
  display: grid !important;
  gap: 2px !important;
  justify-items: center !important;
  min-width: 0 !important;
  text-align: center !important;
}

#campaign-glance-widget .glance-summary .glance-summary-label,
#campaign-glance-widget .glance-summary .glance-summary-bu .glance-summary-label {
  display: block !important;
  font-size: .82rem !important;
  line-height: 1.02 !important;
  white-space: normal !important;
}

#campaign-glance-widget .glance-summary .glance-summary-bu .glance-summary-label {
  white-space: nowrap !important;
}

#campaign-glance-widget .glance-summary .glance-summary-value {
  display: block !important;
  line-height: 1.05 !important;
}

#campaign-glance-widget .issue-row.issue-detail-row {
  align-items: baseline !important;
  column-gap: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content max-content !important;
  overflow: hidden !important;
  row-gap: 2px !important;
}

#campaign-glance-widget .issue-row.issue-detail-row .issue-title {
  justify-self: start !important;
  min-width: 0 !important;
}

#campaign-glance-widget .issue-row.issue-detail-row .issue-count {
  color: var(--rise-blue) !important;
  font-weight: 900 !important;
  justify-self: end !important;
  white-space: nowrap !important;
}

#campaign-glance-widget .issue-row.issue-detail-row .issue-context {
  color: #495057 !important;
  font-size: .82rem !important;
  font-weight: 400 !important;
  justify-self: end !important;
  min-width: 0 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

@media(max-width:900px) {
  #campaign-glance-widget .issue-row.issue-detail-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #campaign-glance-widget .issue-row.issue-detail-row .issue-context {
    grid-column: 1 / -1 !important;
    white-space: normal !important;
  }
}

@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar {
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
    padding: 7px !important;
    white-space: normal !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup .petition-toolbar-row,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .petition-toolbar-row {
    display: grid !important;
    gap: 5px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup .petition-toolbar-row-main,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .petition-toolbar-row-main {
    grid-template-columns: minmax(82px, 1.7fr) minmax(58px, 1.05fr) repeat(9, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup .petition-toolbar-row-secondary,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .petition-toolbar-row-secondary {
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup .petition-toolbar-row-merge,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .petition-toolbar-row-merge {
    grid-template-columns: 1fr !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup button,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup .toolbar-select,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petitionToolbar.petition-toolbar-followup .petition-toolbar-color,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar button,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .toolbar-select,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .petition-toolbar-color {
    flex: initial !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    min-height: 32px !important;
    min-width: 0 !important;
    padding: 3px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-manager-item.drop-before {
    box-shadow: 0 -4px 0 var(--rise-yellow), 0 2px 5px rgba(0,0,0,.03) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-manager-item.drop-after {
    box-shadow: 0 4px 0 var(--rise-yellow), 0 2px 5px rgba(0,0,0,.03) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #targetListModal.petition-signatures-modal .dialog {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: calc(100dvh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #targetListModal.petition-signatures-modal .modal-body {
    display: flex !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #targetListModal.petition-signatures-modal .report-table-wrap {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    width: 100% !important;
  }
}

/* Final phone-only Petition Builder overrides. Kept at EOF so interaction
   re-renders do not fall back to broader Outreach mobile styles. */
@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar {
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
    padding: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row {
    display: grid !important;
    gap: 5px !important;
    min-width: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row-main {
    grid-template-columns: minmax(78px, 1.4fr) minmax(44px, .7fr) repeat(9, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row-secondary {
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-row-merge {
    grid-template-columns: 1fr !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar button,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .toolbar-select,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-color {
    align-items: center !important;
    border: 1px solid #ced4da !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    font-size: .76rem !important;
    font-weight: 900 !important;
    justify-content: center !important;
    min-height: 32px !important;
    min-width: 0 !important;
    padding: 4px 4px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-rich-toolbar .toolbar-select {
    background: #fff !important;
    color: #495057 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-toolbar-color input {
    border: 0 !important;
    height: 20px !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: 24px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-merge-select {
    justify-content: flex-start !important;
    min-height: 36px !important;
    text-align: left !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-target-layout {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: 1fr !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-active-target-list {
    border-color: #1f6fff !important;
    margin: 0 !important;
    min-height: 0 !important;
    order: -1 !important;
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card {
    margin-bottom: 0 !important;
    padding: 10px 12px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .filter-box {
    background: #f8f9fa !important;
    border: 1px solid #ccd3dc !important;
    border-radius: 6px !important;
    max-height: 136px !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-filter-card .check-row {
    display: flex !important;
    gap: 7px !important;
    min-height: 28px !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-add-target-btn {
    margin-top: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-tabs {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-tabs button {
    background: #fff !important;
    border: 2px solid #d7daf9 !important;
    border-radius: 7px !important;
    color: var(--rise-blue) !important;
    font-size: .82rem !important;
    font-weight: 900 !important;
    min-height: 40px !important;
    padding: 7px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-tabs button.active {
    background: var(--rise-blue) !important;
    border-color: var(--rise-blue) !important;
    color: #fff !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-panel {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .petition-final-panel.active {
    display: block !important;
  }
}

@media(max-width:767px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .row-content,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .column-cell,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-module-placeholder {
    overflow: visible !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-module-placeholder {
    min-height: 176px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button {
    height: 66px !important;
    width: 66px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="text"] {
    transform: translate(-76px, 28px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="image"] {
    transform: translate(-42px, -40px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="button"] {
    transform: translate(42px, -40px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="divider"] {
    transform: translate(76px, 28px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="row"] {
    transform: translate(0, 42px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph {
    height: 20px;
    width: 32px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph::before {
    background: currentColor;
    border-radius: 999px;
    content: "";
    display: block;
    height: 6px;
    width: 20px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr > td.column-cell {
    max-width: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr > td.column-cell {
    width: auto !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-target .target-layout {
    display: flex !important;
    flex-direction: column;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-target .active-target-list {
    order: -1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer {
    grid-template-columns: 1fr 1fr !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-left,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-right {
    display: contents !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailBackBtn {
    grid-column: 1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailSaveDraftBtn {
    grid-column: 2;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailNextBtn {
    grid-column: 1 / -1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailScheduleBtn {
    grid-column: 2;
    grid-row: 1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailSendBtn {
    grid-column: 2;
    grid-row: 2;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-finalize {
    padding: 10px 10px 96px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-finalize .target-layout {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs {
    background: #fff;
    border: 1px solid #d8dee5;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 10px;
    padding: 6px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs button {
    background: #fff;
    border: 1px solid #c7ccff;
    border-radius: 6px;
    color: var(--rise-blue);
    font-weight: 900;
    min-height: 40px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs button.active {
    background: var(--rise-blue);
    border-color: var(--rise-blue);
    color: #fff;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-panel {
    display: none !important;
    min-width: 0;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-panel.active {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-settings-panel,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-settings-panel .target-card,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-settings-panel textarea,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-settings-panel input {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview .mobile-split-control {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table {
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview td {
    display: table-cell !important;
    vertical-align: top !important;
  }
}

@media(max-width:767px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-add-row-button {
    display: inline-flex !important;
    grid-column: 1 / -1;
    justify-content: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-email-insert-controls {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text.mobile-module-placeholder {
    cursor: pointer;
    min-height: 152px !important;
    position: relative;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text.mobile-module-placeholder .module-icon {
    font-size: 1.35rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text.mobile-module-placeholder .mobile-builder-copy {
    display: block !important;
    font-size: .96rem !important;
    font-weight: 900;
    line-height: 1.15;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker {
    align-items: center;
    display: grid;
    inset: 0;
    justify-items: center;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: scale(.92);
    transition: opacity .16s ease, transform .16s ease;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text.is-picking-module .mobile-inline-module-picker {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text.is-picking-module > .module-icon,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text.is-picking-module > .mobile-builder-copy {
    opacity: .18;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--rise-blue);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    color: #212529;
    display: grid;
    font-size: .66rem;
    font-weight: 900;
    gap: 2px;
    height: 74px;
    justify-items: center;
    line-height: 1.05;
    padding: 6px;
    position: absolute;
    width: 74px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button span {
    font-size: 1.15rem;
    line-height: 1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button strong {
    font-size: .66rem;
    overflow-wrap: normal;
    text-align: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="text"] {
    transform: translate(-90px, 24px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="image"] {
    transform: translate(-46px, -54px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="button"] {
    transform: translate(46px, -54px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="divider"] {
    transform: translate(90px, 24px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker [data-inline-module="row"] {
    transform: translate(0, 34px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph {
    align-items: center;
    border: 2px solid currentColor;
    border-radius: 5px;
    display: inline-flex;
    font-size: .62rem;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    letter-spacing: 0;
    width: 34px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr {
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row {
    display: table !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody {
    display: table-row-group !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr {
    display: table-row !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr > td.column-cell {
    display: table-cell !important;
    vertical-align: top !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr > td.column-cell + td.column-cell {
    border-left: 1px dashed #cfd5e2 !important;
    margin-top: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-split-control {
    background: #f8f9fa;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    display: grid !important;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-split-control label {
    align-items: center;
    color: #495057;
    display: flex;
    font-size: .72rem;
    font-weight: 900;
    justify-content: space-between;
    text-transform: uppercase;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-split-control input {
    accent-color: var(--rise-blue);
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .layout-btn[data-module-type="layout-33-33-33"],
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .layout-btn[data-module-type="layout-25-75"],
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .layout-btn[data-module-type="layout-75-25"] {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-fab {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #masterFabWrapper.mode-right ~ *,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer {
    --email-delete-grid-column: 1;
  }

  body:has(.outreach-page):not(.public-outreach-page):has(#masterFabWrapper.mode-left) #emailModal footer {
    --email-delete-grid-column: 2;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailDeleteBtn {
    grid-column: var(--email-delete-grid-column, 1);
  }
}

.mobile-builder-copy,
.mobile-email-insert-controls,
.mobile-survey-insert-zone,
.mobile-builder-tool-tabs,
.mobile-builder-draft-banner,
.mobile-add-row-button,
.mobile-inline-module-picker,
.mobile-split-control {
  display: none;
}

@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) .desktop-builder-copy {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-copy {
    display: inline !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-draft-banner {
    align-items: center;
    background: #f4f6ff;
    border-bottom: 1px solid #d8def8;
    color: #212529;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-draft-banner strong,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-draft-banner span {
    display: block;
    line-height: 1.2;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-draft-banner strong {
    color: var(--rise-blue);
    font-size: .92rem;
    font-weight: 900;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-draft-banner span {
    color: #6c757d;
    font-size: .76rem;
    font-weight: 800;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-draft-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tool-tabs {
    background: #eef0ff;
    border-bottom: 1px solid #d8def8;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 8px;
    position: sticky;
    top: 48px;
    z-index: 35;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tool-tabs button {
    background: #fff;
    border: 1px solid #c6ccef;
    border-radius: 7px;
    color: var(--rise-blue);
    font-size: .72rem;
    font-weight: 900;
    min-height: 36px;
    padding: 6px 4px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tool-tabs button.active {
    background: var(--rise-blue);
    border-color: var(--rise-blue);
    color: #fff;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-mode-settings .side-section:not(.is-focus):not(#settings-modules) {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-email-insert-controls {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 10px;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-email-insert-controls.module-insert {
    grid-template-columns: 1fr 1fr;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-email-insert-controls button {
    background: #fff;
    border: 1px dashed var(--rise-blue);
    border-radius: 7px;
    color: var(--rise-blue);
    font-size: .72rem;
    font-weight: 900;
    min-height: 34px;
    padding: 6px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block.active > .mobile-email-insert-controls,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .content-module-wrapper.active > .mobile-email-insert-controls {
    background: #f7f8ff;
    border-radius: 8px;
    padding: 6px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-survey-insert-zone {
    align-items: center;
    background: #fff;
    border: 1px dashed var(--rise-blue);
    border-radius: 8px;
    color: var(--rise-blue);
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
    min-height: 40px;
    padding: 8px 10px;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-survey-insert-zone .mobile-builder-fab-icon {
    height: 16px;
    width: 16px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-survey-insert-zone .mobile-builder-fab-icon::before,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-survey-insert-zone .mobile-builder-fab-icon::after {
    background: var(--rise-blue);
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-survey-insert-zone strong {
    font-size: .78rem;
    line-height: 1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #email-step-finalize,
  body:has(.outreach-page):not(.public-outreach-page) #survey-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #survey-step-finalize,
  body:has(.outreach-page):not(.public-outreach-page) #petition-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #petition-step-finalize {
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .compiled-email-body,
  body:has(.outreach-page):not(.public-outreach-page) #finalEmailPreview,
  body:has(.outreach-page):not(.public-outreach-page) #finalSurveyPreview,
  body:has(.outreach-page):not(.public-outreach-page) #finalPetitionPreview {
    max-width: 100%;
    overflow-x: hidden;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar button {
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .rich-toolbar {
    align-items: start;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-group {
    flex-wrap: wrap;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-group.segmented {
    max-width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-select {
    min-height: 34px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .target-card,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal #survey-step-finalize .target-card,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petition-step-finalize .target-card {
    overflow: hidden;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .target-card .btn,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal #survey-step-finalize .target-card .btn,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #petition-step-finalize .target-card .btn {
    min-width: 0;
    text-align: center;
    white-space: normal;
    width: 100%;
  }
}

/* === Protected App Control Modernization === */
:is(body.home-page,
body.individual-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) {
  --rise-protected-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --rise-primary-lift-shadow: 0 9px 20px rgba(75,83,185,.22);
  font-family: var(--rise-protected-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn,
body.individual-page .db-btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  transition:
    background-color .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    color .16s ease,
    transform .16s ease;
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.mini,
body.individual-page .db-btn.mini {
  font-weight: 800 !important;
  padding-left: 12px;
  padding-right: 12px;
}

body.individual-page .utility-header .btn,
body.individual-page .app-container .btn-group .db-btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
}

/* Protected ghost and outline buttons should respond without reading as filled primary controls. */
:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn,
body.individual-page .db-btn {
  --rise-ghost-hover-bg: #f3f6ff;
  --rise-ghost-active-bg: #e9edff;
  --rise-ghost-hover-border: #3f47a5;
  --rise-ghost-hover-color: #343d99;
  --rise-ghost-hover-shadow: 0 4px 10px rgba(75,83,185,.12);
  cursor: pointer;
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.danger,
body.individual-page .db-btn.danger-btn {
  --rise-ghost-hover-bg: #fff1f3;
  --rise-ghost-active-bg: #ffe3e8;
  --rise-ghost-hover-border: #c92a3f;
  --rise-ghost-hover-color: #b42338;
  --rise-ghost-hover-shadow: 0 4px 10px rgba(217,54,79,.12);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.success {
  --rise-ghost-hover-bg: #edf8f1;
  --rise-ghost-active-bg: #dff3e7;
  --rise-ghost-hover-border: #157347;
  --rise-ghost-hover-color: #146c43;
  --rise-ghost-hover-shadow: 0 4px 10px rgba(25,135,84,.12);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn:not(.primary):not(.warn):not(.disabled):hover:not(:disabled),
:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn:not(.primary):not(.warn):not(.disabled):focus-visible:not(:disabled),
body.individual-page .db-btn:not(.primary-action):not(.disabled):hover:not(:disabled),
body.individual-page .db-btn:not(.primary-action):not(.disabled):focus-visible:not(:disabled) {
  background: var(--rise-ghost-hover-bg) !important;
  border-color: var(--rise-ghost-hover-border) !important;
  box-shadow: var(--rise-ghost-hover-shadow);
  color: var(--rise-ghost-hover-color) !important;
  transform: translateY(-1px);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn:not(.primary):not(.warn):not(.disabled):active:not(:disabled),
body.individual-page .db-btn:not(.primary-action):not(.disabled):active:not(:disabled) {
  background: var(--rise-ghost-active-bg) !important;
  box-shadow: inset 0 1px 2px rgba(33,37,41,.08);
  transform: translateY(0);
}

body:has(.outreach-page):not(.public-outreach-page) :is(.rich-toolbar, .survey-toolbar) button:not(.active):not(:disabled):hover,
body:has(.outreach-page):not(.public-outreach-page) :is(.rich-toolbar, .survey-toolbar) button:not(.active):not(:disabled):focus-visible {
  background: #f3f6ff !important;
  border-color: #b8c0f2 !important;
  box-shadow: 0 0 0 3px rgba(75,83,185,.12);
  color: var(--rise-blue) !important;
  outline: 0;
}

body:has(.outreach-page):not(.public-outreach-page) :is(.rich-toolbar, .survey-toolbar) button:not(.active):not(:disabled):active {
  background: #e9edff !important;
  box-shadow: inset 0 1px 2px rgba(33,37,41,.08);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.primary,
body.individual-page .db-btn.primary-action {
  background: var(--rise-blue);
  border-color: var(--rise-blue);
  color: #fff;
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.primary:hover:not(:disabled),
:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.primary:focus-visible:not(:disabled),
body.individual-page .db-btn.primary-action:hover:not(:disabled),
body.individual-page .db-btn.primary-action:focus-visible:not(:disabled) {
  box-shadow: var(--rise-primary-lift-shadow);
  transform: translateY(-1px);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn:focus-visible,
body.individual-page .db-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(75,83,185,.18);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.primary:focus-visible:not(:disabled),
body.individual-page .db-btn.primary-action:focus-visible:not(:disabled) {
  box-shadow: 0 0 0 3px rgba(75,83,185,.18), var(--rise-primary-lift-shadow);
}

:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) .btn.disabled,
:is(body.home-page,
body.member-summary-page,
body.correction-portal-page,
body.reports-body,
body:has(.admin-page),
body:has(.outreach-page):not(.public-outreach-page)) button:disabled,
body.individual-page .db-btn:disabled {
  transform: none;
  box-shadow: none;
}

body.home-page .quick-search-box .search-box,
body.individual-page .table-search,
body.member-summary-page .member-search,
body.correction-portal-page .portal-input {
  border-radius: 999px;
  font-family: var(--rise-protected-font);
  font-weight: 800;
}

body.home-page .qs-results-dropdown,
body.individual-page .search-dropdown,
body.member-summary-page .member-dropdown,
body.correction-portal-page .member-dropdown {
  border-radius: 12px;
  overflow: auto;
}

body.reports-body .subfilter-menu,
body.individual-page .edit-menu,
body:has(.admin-page) .admin-function-focus-menu {
  border-radius: 12px;
}

body.reports-body .report-select,
body.correction-portal-page .portal-select,
body:has(.admin-page) .admin-select,
body:has(.outreach-page):not(.public-outreach-page) .select,
body:has(.outreach-page):not(.public-outreach-page) .toolbar-select {
  border-radius: 7px;
}

body.home-page .qs-grid small {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0 .28em;
}

body.home-page .qs-grid small span,
body.home-page .qs-grid small b {
  display: inline;
}

/* ==========================================================================
   ACTIVIST MAPPING FINAL OVERRIDES - MUST STAY LAST
   ========================================================================== */
.map-person-card {
  width: 600px;
}

.map-colleague-card {
  width: 540px;
}

.map-person-actions .map-primary-action,
.map-person-actions .map-secondary-action,
.map-person-actions .map-record-action,
.map-person-actions .map-resource-action {
  height: 42px !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
}

.map-person-actions .map-resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d0db !important;
  border-radius: 6px;
  background: #fff !important;
  color: #5f6874 !important;
  text-decoration: none;
}

@media(max-width:640px) {
  .activist-map-canvas {
    transform: scale(.95);
    transform-origin: top left;
    width: 105.263%;
  }

  .person-column {
    min-width: 348px;
  }

  .map-person-card,
  .map-colleague-card {
    width: 340px;
  }

  .map-person-actions .map-primary-action,
  .map-person-actions .map-secondary-action,
  .map-person-actions .map-record-action,
  .map-person-actions .map-resource-action {
    height: 34px !important;
    min-height: 34px !important;
    padding: 6px 7px !important;
  }
}

/* Protected control polish follow-up: keep late page/mobile overrides from
   pulling app actions back into rectangular buttons. */
body.home-page .btn,
body.home-page .quick-search-trigger,
body.home-page .threshold-actions .btn,
body.home-page .glance-nav .btn,
body.home-page .source-modal .btn,
body.home-page .schedule-alert-box .btn,
body.home-page .activist-map-actions .btn,
body.home-page .activist-modal-actions .btn,
body.home-page .map-person-actions .btn,
body.home-page .map-wide-btn,
body.home-page .map-resource-action,
body.home-page .map-record-action,
body.home-page .map-secondary-action,
body.home-page .map-primary-action,
body:has(.outreach-page):not(.public-outreach-page) .tab-btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body:has(.outreach-page):not(.public-outreach-page) .tab-btn {
  border: 1px solid transparent !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

body:has(.outreach-page):not(.public-outreach-page) .tab-btn:not(.active) {
  border-color: transparent !important;
}

/* Home dashboard ghost buttons have late page overrides, so keep their interaction
   states beside those overrides to preserve the protected-app cascade. */
body.home-page :is(
  .utility-header .btn,
  .quick-search-trigger,
  .threshold-actions .btn,
  .glance-nav .btn,
  .source-modal .btn,
  .schedule-alert-box .btn,
  .activist-map-actions .btn,
  .activist-modal-actions .btn,
  .map-wide-btn,
  .map-resource-action,
  .map-record-action,
  .map-secondary-action,
  .map-primary-action
):not(.primary):not(.warn):not(.disabled):not(:disabled):hover,
body.home-page :is(
  .utility-header .btn,
  .quick-search-trigger,
  .threshold-actions .btn,
  .glance-nav .btn,
  .source-modal .btn,
  .schedule-alert-box .btn,
  .activist-map-actions .btn,
  .activist-modal-actions .btn,
  .map-wide-btn,
  .map-resource-action,
  .map-record-action,
  .map-secondary-action,
  .map-primary-action
):not(.primary):not(.warn):not(.disabled):not(:disabled):focus-visible {
  background: var(--rise-ghost-hover-bg, #f3f6ff) !important;
  border-color: var(--rise-ghost-hover-border, #3f47a5) !important;
  box-shadow: var(--rise-ghost-hover-shadow, 0 4px 10px rgba(75,83,185,.12)) !important;
  color: var(--rise-ghost-hover-color, #343d99) !important;
  outline: 0;
  transform: translateY(-1px);
}

body.home-page :is(
  .utility-header .btn,
  .quick-search-trigger,
  .threshold-actions .btn,
  .glance-nav .btn,
  .source-modal .btn,
  .schedule-alert-box .btn,
  .activist-map-actions .btn,
  .activist-modal-actions .btn,
  .map-wide-btn,
  .map-resource-action,
  .map-record-action,
  .map-secondary-action,
  .map-primary-action
):not(.primary):not(.warn):not(.disabled):not(:disabled):active {
  background: var(--rise-ghost-active-bg, #e9edff) !important;
  box-shadow: inset 0 1px 2px rgba(33,37,41,.08) !important;
  transform: translateY(0);
}

body.home-page .qs-grid small {
  align-items: baseline !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 .28em !important;
}

body.home-page .qs-grid small span,
body.home-page .qs-grid small b {
  display: inline !important;
  margin-top: 0 !important;
}

/* Subtle table overflow affordances. Classes are applied only when JS detects
   hidden horizontal table content in the requested protected-app areas. */
.rise-table-scroll-indicator {
  position: relative;
  scrollbar-gutter: stable;
}

.rise-table-scroll-cue {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(75, 83, 185, .16);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(33, 37, 41, .14);
  color: var(--rise-blue, #4B53B9);
  display: none !important;
  font-size: 1.45rem;
  font-weight: 800;
  height: 34px;
  isolation: isolate;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  width: 34px;
  z-index: 40;
}

.rise-table-scroll-shade {
  display: none !important;
  height: 100px;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 76px;
  z-index: 35;
}

.rise-table-scroll-shade.left {
  background: linear-gradient(90deg, rgba(75, 83, 185, .2), rgba(255, 255, 255, 0));
}

.rise-table-scroll-shade.right {
  background: linear-gradient(270deg, rgba(75, 83, 185, .2), rgba(255, 255, 255, 0));
}

:root[data-theme="dark"] .rise-table-scroll-shade.left {
  background: linear-gradient(90deg, rgba(23, 34, 66, .9), rgba(17, 26, 51, 0)) !important;
}

:root[data-theme="dark"] .rise-table-scroll-shade.right {
  background: linear-gradient(270deg, rgba(23, 34, 66, .9), rgba(17, 26, 51, 0)) !important;
}

.rise-table-scroll-cue::before,
.rise-table-scroll-cue::after {
  content: "";
  display: none !important;
  height: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 86px;
  z-index: 0;
}

.rise-table-scroll-cue.left {
  left: 8px;
}

.rise-table-scroll-cue.left::after {
  background: none;
  display: none !important;
  left: -8px;
}

.rise-table-scroll-cue.right {
  right: 8px;
}

.rise-table-scroll-cue.right::before {
  background: none;
  display: none !important;
  right: -8px;
}

.rise-table-scroll-indicator.rise-scroll-more-left > .rise-table-scroll-cue.left,
.rise-table-scroll-indicator.rise-scroll-more-right > .rise-table-scroll-cue.right {
  display: inline-flex !important;
}

.rise-table-scroll-indicator.rise-scroll-more-left > .rise-table-scroll-shade.left,
.rise-table-scroll-indicator.rise-scroll-more-right > .rise-table-scroll-shade.right {
  display: block !important;
}

.rise-table-scroll-indicator.rise-scroll-more-left {
  box-shadow: 0 1px 5px rgba(0, 0, 0, .04) !important;
}

.rise-table-scroll-indicator.rise-scroll-more-right {
  box-shadow: 0 1px 5px rgba(0, 0, 0, .04) !important;
}

.rise-table-scroll-indicator.rise-scroll-more-left.rise-scroll-more-right {
  box-shadow: 0 1px 5px rgba(0, 0, 0, .04) !important;
}

.activist-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media(max-width:640px) {
  .map-person-head {
    grid-template-columns: minmax(0, 1fr) 82px !important;
  }

  .map-person-card .schedule-assess-box {
    justify-self: start;
    min-width: 82px !important;
    max-width: 82px;
    transform: translateX(-12px);
  }

  .map-person-card .schedule-assess-box span {
    white-space: normal;
    overflow-wrap: normal;
    line-height: .9;
  }

  .activist-map-actions {
    justify-content: stretch;
  }

  .activist-map-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* === Activist Mapping Mobile Header Override === */
@media(max-width:640px) {
  .map-person-head {
    position: relative !important;
    display: block !important;
    min-height: 104px;
    padding-right: 112px !important;
  }

  .map-person-meta {
    display: grid !important;
    gap: 1px;
  }

  .map-person-meta span {
    display: block !important;
  }

  .map-person-card .schedule-assess-box {
    position: absolute !important;
    top: 0;
    right: 26px;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    transform: none !important;
    text-align: center;
  }

  .map-person-card .schedule-assess-box span {
    display: block;
    white-space: normal !important;
    overflow-wrap: normal !important;
    line-height: .92;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING MOBILE SQUARE BADGE + PINCH ZOOM - MUST STAY LAST
   ========================================================================== */
@media(max-width:640px) {
  .activist-map-frame {
    touch-action: pan-x pan-y;
  }

  .map-person-head {
    min-height: 104px !important;
    padding-right: 106px !important;
    border-bottom: 0 !important;
  }

  .map-person-card .schedule-assess-box {
    right: 14px !important;
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    height: 84px !important;
    min-height: 84px !important;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px !important;
  }

  .map-person-card .schedule-assess-box span {
    font-size: .49rem !important;
    letter-spacing: .015em;
    line-height: .92 !important;
    text-align: center;
  }

  .map-person-card .schedule-assess-box strong {
    font-size: 1.42rem !important;
    line-height: .92 !important;
    text-align: center;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING MOBILE HEADER HARD OVERRIDE - MUST STAY LAST
   ========================================================================== */
@media(max-width:640px) {
  .map-person-head {
    position: relative !important;
    display: block !important;
    min-height: 104px;
    padding-right: 112px;
  }

  .map-person-meta {
    display: grid !important;
    gap: 1px;
  }

  .map-person-meta span {
    display: block !important;
  }

  .map-person-card .schedule-assess-box {
    position: absolute;
    top: 0;
    right: 26px;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    transform: none !important;
    text-align: center;
  }

  .map-person-card .schedule-assess-box span {
    display: block;
    white-space: normal !important;
    overflow-wrap: normal !important;
    line-height: .92;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING EXPORT + MOBILE ASSESSMENT PIN - MUST STAY LAST
   ========================================================================== */
.activist-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media(max-width:640px) {
  .map-person-head {
    grid-template-columns: minmax(0, 1fr) 82px !important;
  }

  .map-person-card .schedule-assess-box {
    justify-self: start;
    min-width: 82px !important;
    max-width: 82px;
    transform: translateX(-12px);
  }

  .map-person-card .schedule-assess-box span {
    white-space: normal;
    overflow-wrap: normal;
    line-height: .9;
  }

  .activist-map-actions {
    justify-content: stretch;
  }

  .activist-map-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING EXPORT + MOBILE ASSESSMENT PIN
   ========================================================================== */
.activist-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media(max-width:640px) {
  .map-person-head {
    grid-template-columns: minmax(0, 1fr) 82px !important;
  }

  .map-person-card .schedule-assess-box {
    justify-self: start;
    min-width: 82px !important;
    max-width: 82px;
    transform: translateX(-12px);
  }

  .map-person-card .schedule-assess-box span {
    white-space: normal;
    overflow-wrap: normal;
    line-height: .9;
  }

  .activist-map-actions {
    justify-content: stretch;
  }

  .activist-map-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING MOBILE META WRAP
   ========================================================================== */
.map-person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

@media(max-width:640px) {
  .map-person-meta {
    display: grid;
    gap: 1px;
  }

  .map-person-head {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .map-person-card .schedule-assess-box {
    min-width: 76px;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING BUTTON + MOBILE SCALE TUNE
   ========================================================================== */
.map-person-card {
  width: 600px;
}

.map-colleague-card {
  width: 540px;
}

.map-person-actions .map-primary-action,
.map-person-actions .map-secondary-action,
.map-person-actions .map-record-action,
.map-person-actions .map-resource-action {
  height: 42px !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
}

.map-person-actions .map-resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d0db !important;
  border-radius: 6px;
  background: #fff !important;
  color: #5f6874 !important;
  text-decoration: none;
}

@media(max-width:640px) {
  .activist-map-canvas {
    transform: scale(.95);
    transform-origin: top left;
    width: 105.263%;
  }

  .person-column {
    min-width: 348px;
  }

  .map-person-card,
  .map-colleague-card {
    width: 340px;
  }

  .map-person-actions .map-primary-action,
  .map-person-actions .map-secondary-action,
  .map-person-actions .map-record-action,
  .map-person-actions .map-resource-action {
    height: 34px !important;
    min-height: 34px !important;
    padding: 6px 7px !important;
  }
}

/* ==========================================================================
   20. OUTREACH PHONE BUILDER EXPERIENCE
   ========================================================================== */
@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-builder-modal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-modal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-builder-modal .dialog.full {
    border-radius: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: 100vw;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-modal header {
    background: var(--rise-blue);
    border-bottom: 0;
    color: #fff;
    min-height: 54px;
    padding: 10px 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-modal header h2 {
    color: #fff !important;
    font-size: 1.08rem !important;
    text-align: center;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-modal .modal-close-x {
    color: #fff;
    font-size: 1.8rem;
    height: 42px;
    min-width: 42px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-tabs {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    padding: 0 10px;
    position: sticky;
    top: 0;
    z-index: 25;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #495057;
    font-weight: 900;
    min-height: 44px;
    padding: 8px 6px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-tabs button.active {
    background: var(--rise-blue);
    border-color: var(--rise-blue);
    color: #fff;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-tabs span {
    color: #6c757d;
    font-weight: 900;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-accordion {
    border: 1px solid #d8dee5;
    border-radius: 8px;
    margin: 0 0 12px;
    overflow: hidden;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-accordion-toggle {
    align-items: center;
    background: var(--rise-blue);
    border: 0;
    color: #fff;
    display: flex;
    font: inherit;
    font-weight: 900;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-accordion-toggle small {
    color: rgba(255,255,255,.8);
    font-size: .72rem;
    font-weight: 900;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-accordion-caret::before {
    content: "⌃";
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-accordion.is-mobile-collapsed .mobile-accordion-caret::before {
    content: "⌄";
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-accordion.is-mobile-collapsed > :not(.mobile-builder-accordion-toggle) {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-header-card,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-card,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-card,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-body-card {
    border-radius: 8px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-header-card > :not(.mobile-builder-accordion-toggle),
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-card > :not(.mobile-builder-accordion-toggle) {
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-card > :not(.mobile-builder-accordion-toggle),
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-body-card > :not(.mobile-builder-accordion-toggle) {
    margin: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-work,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-work {
    padding: 12px 12px 120px !important;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .builder-pane {
    padding: 12px 12px 92px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .builder-layout {
    display: block !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-edit-mode .preview-pane {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-preview-mode .builder-pane {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal.mobile-builder-preview-mode .preview-pane {
    display: block !important;
    padding: 14px 12px 92px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .preview-pane .wizard-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-preview-panel {
    display: none;
    padding: 12px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-builder-preview-mode .email-builder,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-builder-preview-mode .survey-builder {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-builder-preview-mode .mobile-builder-preview-panel,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-builder-preview-mode .mobile-builder-preview-panel {
    display: block;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-preview-card {
    background: #fff;
    border: 1px solid #d8dee5;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-preview-card h3,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-preview-card p {
    margin: 0 0 10px;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .compiled-email-body,
  body:has(.outreach-page):not(.public-outreach-page) #email-mobile-preview .compiled-email-body {
    border: 1px solid #d8dee5;
    border-radius: 8px;
    padding: 14px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-side,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-side {
    background: #fff;
    border: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -14px 32px rgba(0,0,0,.28);
    display: block !important;
    left: 0;
    max-height: 74dvh;
    overflow-y: auto;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    position: fixed !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    transform: translateY(calc(100% + 24px));
    transition: transform .18s ease;
    width: 100vw !important;
    z-index: 1305;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-open .email-side,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-open .survey-side {
    transform: translateY(0);
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-sheet-backdrop {
    background: rgba(0,0,0,.42);
    border: 0;
    display: none;
    inset: 0;
    position: fixed;
    z-index: 1300;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-sheet-open .mobile-builder-sheet-backdrop {
    display: block;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-sheet-bar {
    align-items: center;
    background: var(--rise-blue);
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-sheet-bar button {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.55rem;
    font-weight: 900;
    height: 36px;
    width: 36px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-fab {
    align-items: center;
    background: #ffcc2f;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(0,0,0,.24);
    color: #212529;
    display: flex;
    font-size: 2rem;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    line-height: 1;
    position: fixed;
    right: 18px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 58px;
    z-index: 1200;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-preview-mode .mobile-builder-fab,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-sheet-open .mobile-builder-fab,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-modal:not(.mobile-builder-step-active) .mobile-builder-fab {
    display: none;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .settings-stack,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .settings-stack {
    display: block !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .side-section,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .side-section {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    margin: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .side-section .inner,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .side-section .inner {
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .module-grid,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .module-card,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-card {
    min-height: 74px !important;
    padding: 8px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .module-card .module-icon,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-card .module-icon {
    font-size: 1.15rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .module-card span:last-child,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-card span:last-child {
    font-size: .72rem !important;
    line-height: 1.05;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-side-copy,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .email-side-copy {
    font-size: .9rem !important;
    line-height: 1.25 !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-canvas,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas {
    border-radius: 0 0 8px 8px;
    min-height: calc(100dvh - 285px) !important;
    padding-bottom: 130px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-empty-state h3,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state h3 {
    font-size: 1.1rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-empty-state p,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state p {
    font-size: .86rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas-fab {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .letterhead-box,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal #fieldManagerList {
    padding: 12px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-manager-item {
    grid-template-columns: auto minmax(0,1fr);
    gap: 8px 10px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .required-check {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--rise-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: 80px;
}

/* ==========================================================================
   2. UTILITY HEADER & NOTIFICATIONS
   ========================================================================== */
.utility-header {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #fff;
  border-bottom: 2px solid var(--rise-blue);
}

.utility-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rise-blue);
  font-size: .82rem;
  font-weight: 900;
}

.tiny-logo {
  color: var(--rise-blue);
  font-weight: 900;
  font-size: .75rem;
}

.utility-brand span:last-child {
  background: var(--rise-yellow);
  padding: 4px 10px;
  border-radius: 3px;
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bell {
  color: #d9364f;
  font-size: 1rem;
}

.notification-bell {
  position: relative;
  border: 0;
  background: transparent;
  color: #d9364f;
  font-size: 1rem;
  font-weight: 900;
  padding: 4px 8px;
  cursor: pointer;
}

.notification-bell span {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #d9364f;
  color: #fff;
  font-size: .65rem;
  line-height: 17px;
  text-align: center;
}

.notification-tray {
  position: absolute;
  right: 18px;
  top: 42px;
  z-index: 10;
  width: min(92vw, 420px);
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  padding: 14px;
}

.notification-tray.open {
  display: block;
}

.notification-title {
  color: var(--rise-blue);
  font-size: .85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--rise-yellow);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.notification-card {
  border-left: 4px solid var(--rise-blue);
  background: #f8f9fa;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.notification-card strong {
  display: block;
  color: #212529;
  font-size: .9rem;
}

.notification-card span {
  display: block;
  color: var(--rise-blue);
  font-size: .8rem;
  font-weight: 900;
  margin-top: 2px;
}

.notification-card p {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
  margin: 6px 0 0;
}

/* ==========================================================================
   3. TOPBAR & BRANDING
   ========================================================================== */
.pulse-header {
  text-align: center;
  padding: 20px 0 8px;
}

.rise-lockup {
  color: var(--rise-blue);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.08em;
}

.rise-strip {
  display: inline-block;
  margin-top: 4px;
  background: var(--rise-yellow);
  color: var(--rise-blue);
  font-size: .45rem;
  font-weight: 900;
  letter-spacing: .06em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.pulse-header h2 {
  margin: 4px 0 0;
  color: var(--rise-blue);
  font-size: 1.35rem;
  font-weight: 900;
}

.pulse-header p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px 24px;
  color: #fff;
  border-bottom: 6px solid var(--rise-yellow);
  background: linear-gradient(90deg, var(--rise-blue), #cfd3fb);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.8);
  font-weight: 900;
  letter-spacing: .06em;
}

.role-label {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.tagline {
  margin-top: 2px;
  color: rgba(255,255,255,.92);
  font-weight: 600;
}

.environment-pill {
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
}

/* ==========================================================================
   4. NAVIGATION
   ========================================================================== */
.nav-rail {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(244,246,248,.96);
}

.nav-rail a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--rise-blue);
  background: #fff;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-rail a.active,
.nav-rail a:hover {
  color: #fff;
  background: var(--rise-blue);
  border-color: var(--rise-blue);
}

/* ==========================================================================
   5. APP CONTAINERS & LAYOUT
   ========================================================================== */
.app-container {
  margin: 20px 40px;
  background: #fff;
  padding: 34px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
  border-radius: 8px;
  min-height: 80vh;
}

.dashboard-container {
  margin: 14px 30px;
  padding: 20px;
}

/* ==========================================================================
   6. TYPOGRAPHY
   ========================================================================== */
.page-title {
  color: var(--rise-blue);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -.5px;
  margin: 0 0 12px;
  line-height: 1;
}

.page-kicker {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-header {
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
  margin: 50px 0 22px;
  color: var(--rise-blue);
  font-size: 1.35rem;
  font-weight: 900;
}

.subsection-title {
  margin: 18px 0 8px;
  color: var(--rise-blue);
  font-size: .86rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.text-end { text-align: right; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-4 { margin-bottom: 18px; }
.py-5 { padding-top: 42px; padding-bottom: 42px; }
.small { font-size: .86rem; }
.red { color: #dc3545; }
.blue { color: var(--rise-blue); }
.muted { color: var(--muted); }

/* ==========================================================================
   7. BUTTONS & UI ELEMENTS
   ========================================================================== */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-row.compact { margin-bottom: 24px; }

.btn {
  border: 1px solid var(--rise-blue);
  border-radius: 5px;
  padding: 8px 13px;
  color: var(--rise-blue);
  background: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
}

.btn.primary { color: #fff; background: var(--rise-blue); }
.btn.mini { padding: 5px 10px; font-size: .78rem; }
.btn.danger { border-color: #d9364f; color: #d9364f; }

.btn.disabled, button:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: #eef1f5;
  cursor: not-allowed;
}

.demo-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--rise-blue);
  font-size: .85rem;
  font-weight: 900;
  text-decoration: none;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  background: var(--rise-blue);
  font-size: .78rem;
  font-weight: 900;
}

.pill.gray { background: var(--muted); }
.pill.green { background: #188b52; }

/* ==========================================================================
   8. CARDS & DASHBOARDS
   ========================================================================== */
.card, .dashboard-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  padding: 20px;
}

.dashboard-card {
  margin-bottom: 38px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.card-header {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 9px;
  margin-bottom: 15px;
}

.section-caption {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.35;
}

#campaign-glance-widget .section-caption {
  margin-bottom: 34px;
}

.card-header.small {
  font-size: .76rem;
  text-align: center;
}

.callout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f9fa;
  padding: 12px;
}

.callout-row span {
  background: #6c757d;
  color: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 900;
}

/* ==========================================================================
   9. DATA VISUALIZATION: CHARTS & HEATMAPS
   ========================================================================== */
.chart-shell {
  position: relative;
  height: 360px;
  margin: 6px 0 18px;
  border-radius: 8px;
  background: linear-gradient(#fff, #fffaf0);
  overflow: hidden;
}

.line-chart { width: 100%; height: 100%; }
.gridlines line { stroke: #e9ecef; }
.axis-labels text { fill: #6c757d; font-size: 11px; font-weight: 700; }

.chart-tooltip {
  position: fixed;
  display: none;
  max-width: 320px;
  padding: 12px 14px;
  color: #212529;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  z-index: 2000;
  pointer-events: none;
}

.tooltip-title {
  margin-bottom: 8px;
  color: var(--rise-blue);
  font-weight: 900;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 3px 0;
  color: #495057;
  font-size: .82rem;
}

.tooltip-row strong,
.tooltip-row b,
.tooltip-row .blue {
  color: var(--rise-blue);
}

.tooltip-row.strong {
  border-top: 1px solid #eef1f5;
  margin-top: 5px;
  padding-top: 7px;
}

.tooltip-section {
  margin-top: 8px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.tooltip-divider {
  border-top: 1px solid #eef1f5;
  margin-top: 6px;
  padding-top: 7px;
}

.tooltip-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  font-style: italic;
}

.tooltip-drill-button {
  display: none;
}

.chart-tooltip-static {
  position: absolute;
  top: 55px;
  left: 21%;
  z-index: 1;
  background: #eee;
  border: 1px solid #bbb;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  padding: 8px 12px;
  font-weight: 800;
  color: #55;
}

.density-line {
  position: absolute;
  left: 48%;
  right: 4%;
  border-top: 1px dashed #bfc5cc;
  color: #9aa1aa;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}
.density-75 { top: 82px; }
.density-50 { top: 134px; }

.insight-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 3fr;
  gap: 10px;
  align-items: stretch;
}

.metric {
  text-align: center;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric strong {
  display: block;
  color: var(--rise-blue);
  font-size: 1.8rem;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.glance-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.glance-title, .bar-label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.density-note {
  display: block;
  color: var(--rise-blue);
  font-size: .82rem;
  margin-bottom: 8px;
}

.heatmap-instruction {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 900;
  text-align: center;
}

.mobile-heatmap-copy {
  display: none;
}

.heatmap {
  height: 250px;
  display: grid;
  grid-template-columns: 2fr 1.35fr 1fr .55fr;
  grid-template-rows: 1fr .8fr;
  background: #fff;
  border: 1px solid #fff;
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
}

.heatmap .heat { background: var(--orange); border: 1px solid #fff; padding: 8px; overflow: hidden; }
.heatmap .large { grid-row: 1/3; }
.heatmap .mid { grid-row: 1/3; }
.heatmap .small { background: #da5f38; }
.heatmap .tiny { background: #d95140; }
.heatmap .small2 { background: #df6238; }
.heatmap .tiny2 { background: #db6b43; }
.heatmap .wide { background: #c85532; }
.heatmap .wide2 { background: #b94c2f; }

.density-key {
  text-align: right;
  color: #6c757d;
  font-weight: 900;
  font-size: .75rem;
  margin-top: 8px;
}

.glance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
  color: #6c757d;
}

.glance-summary-item {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.glance-summary-value {
  display: block;
}

.glance-summary-label {
  white-space: nowrap;
}

.stacked-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: #e9ecef;
  margin: 6px 0 18px;
}
.stacked-bar i { display: block; }
.stacked-bar.glance-assessment-spread i {
  filter: saturate(1.18) contrast(1.04);
  opacity: 1;
}
.stacked-bar .a { width: 6%; background: #358b54; }
.stacked-bar .b { width: 48%; background: #5bc0de; }
.stacked-bar .c { width: 30%; background: #f8cd38; }
.stacked-bar .d { width: 9%; background: #d9364f; }
.stacked-bar .e { width: 7%; background: #6c757d; }

.jobs .a { width: 15%; background: #4B53B9; }
.jobs .b { width: 14%; background: #d54890; }
.jobs .c { width: 16%; background: #f8cd38; }
.jobs .d { width: 41%; background: #358b54; }
.jobs .e { width: 14%; background: #fd7e14; }

/* ==========================================================================
   10. GRIDS, TABLES, & LISTS
   ========================================================================== */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 62vh;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #495057;
  background: #f8f9fa;
  font-size: .76rem;
  text-transform: uppercase;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

td { font-size: .92rem; }

.issue-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.issue-list li {
  border-left: 4px solid var(--rise-blue);
  background: #f8f9fa;
  padding: 10px 12px;
}

.issue-list strong { display: block; color: #495057; }
.issue-list span { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; font-weight: 800; }

/* ==========================================================================
   11. MEMBER DIRECTORY & INDIVIDUAL DISPLAY
   ========================================================================== */
.member-card {
  border-left: 5px solid var(--rise-blue);
  background: #f9fafc;
  border-radius: 8px;
  padding: 14px;
}

.member-card h3 { margin: 0 0 6px; }

.alpha-nav {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.alpha-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--rise-blue);
  font-weight: 900;
  font-size: .8rem;
}

.search-box {
  width: min(100%, 560px);
  border: 1px solid var(--rise-blue);
  border-radius: 6px;
  padding: 13px 14px;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 2px 7px rgba(0,0,0,.08);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.tab {
  border: 0;
  border-radius: 6px;
  padding: 12px 20px;
  color: var(--muted);
  background: #eef1f5;
  font-weight: 900;
}

.tab.active { color: #fff; background: var(--rise-blue); }

.individual-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.individual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   12. SUMMARY DASHBOARD COMPONENTS
   ========================================================================== */
.summary-container { max-width: 1200px; margin-left: auto; margin-right: auto; }

.data-label {
  font-size: .75rem;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.data-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--rise-text);
  margin-bottom: 22px;
  min-height: 22px;
}

.data-value.strong, .strong { font-weight: 900; }

.summary-search-row { display: flex; align-items: end; gap: 14px; margin: 4px 0 36px; }
.summary-search-row .search-box { width: min(100%, 720px); }

.summary-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
  margin: 8px 0 24px;
}

.summary-topline h2 { color: var(--rise-blue); font-size: 1.35rem; font-weight: 900; margin: 0; }
.summary-topline span { display: block; color: var(--muted); font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.summary-topline strong { color: var(--rise-blue); font-size: .9rem; }

#summary-data-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas: "name member assess" "contact member assess";
}
.grid-name { grid-area: name; }
.grid-contact { grid-area: contact; }
.grid-member { grid-area: member; }
.grid-assess { grid-area: assess; }

.val-name-large { font-size: 1.6rem; font-weight: 900; color: #000; margin-bottom: 6px; }
.val-pref-large { font-size: 1.15rem; font-weight: 700; color: #495057; margin-bottom: 24px; }

.highlight-card {
  background: #fafbfc;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 24px;
  height: fit-content;
}

.assessment-value { font-size: 2.4rem; font-weight: 900; line-height: 1; color: #111; margin: 2px 0 18px; }

.summary-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }

.schedule-alert-box {
  background: #e3f2fd;
  border-left: 5px solid var(--rise-blue);
  border-radius: 6px;
  padding: 18px;
  margin-top: 20px;
}

.schedule-alert-text {
  display: block;
  color: var(--rise-blue);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.schedule-alert-link {
  border: 0;
  background: none;
  color: #0d6efd;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: underline;
  padding: 0;
}

/* ==========================================================================
   13. COMMUNICATION & CONVERSATION LOGS
   ========================================================================== */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.trigger-btn {
  text-align: left;
  font-weight: 900;
  color: #0d6efd;
  padding: 0;
  margin-bottom: 15px;
  cursor: not-allowed;
  text-decoration: none;
  border: 0;
  background: none;
}

.convo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

.convo-header {
  background: var(--rise-blue);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.convo-header h3 { font-size: 1.05rem; margin: 0; }
.convo-header span { color: rgba(255,255,255,.85); font-size: .8rem; font-weight: 900; }

.data-group {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f3f5;
}

.cat-title {
  font-size: .75rem;
  font-weight: 900;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.safe-text { white-space: pre-wrap; word-wrap: break-word; }

/* ==========================================================================
   14. MODALS & QUICK SEARCH
   ========================================================================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1100; }
.source-modal { position: fixed; inset: 0; z-index: 1110; display: grid; place-items: center; padding: 26px; }
.source-modal[hidden], .modal-backdrop[hidden] { display: none; }

.modal-content {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,.35);
}

.modal-wide { width: min(980px, 100%); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
}

.modal-header h2 { margin: 0; color: var(--rise-blue); font-weight: 900; font-size: 1.35rem; }
.modal-body { padding: 24px; overflow: auto; max-height: calc(90vh - 78px); }

.quick-search-modal-content,
.quick-search-modal-content .modal-body {
  overflow: visible;
}

.quick-search-box { position: relative; margin-bottom: 22px; z-index: 2; }
.quick-search-box .search-box { width: 100%; font-size: 1.1rem; border: 0; background: #f8f9fa; }
.quick-search-box > span { position: absolute; right: 15px; top: 14px; color: #adb5bd; pointer-events: none; }

.qs-results-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1120;
  max-height: 260px;
  overflow: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.qs-results-dropdown li {
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f5;
  font-weight: 800;
  cursor: pointer;
}

.qs-results-dropdown li:hover { background: #f8f9fa; color: var(--rise-blue); }

.qs-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
}

.qs-main { border-right: 1px solid var(--line); padding-right: 24px; }
.qs-main h3 { font-size: 1.75rem; margin: 0; color: #212529; }
.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.qs-grid span { margin-top: 14px; }
.qs-grid small { display: block; color: var(--muted); font-weight: 700; margin: 3px 0; }

.qs-side {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  height: max-content;
}

.qs-side strong { display: block; font-size: 2.4rem; line-height: 1; margin: 6px 0; color: #212529; }
.qs-side small, .qs-side b { display: block; color: var(--muted); margin-bottom: 8px; }

/* ==========================================================================
   15. FAB (FLOATING ACTION BUTTON) & FOOTER
   ========================================================================== */
.fab {
  position: fixed;
  left: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--rise-blue);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  font-size: 1.4rem;
  font-weight: 900;
  text-decoration: none;
}

.fab-wrapper {
  position: fixed;
  bottom: 40px;
  z-index: 1030;
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  transition: left .4s, right .4s, opacity .25s, filter .25s;
  pointer-events: none;
}

.fab-wrapper.fab-idle {
  opacity: .42;
  filter: saturate(.82);
}

.fab-wrapper.fab-idle:hover,
.fab-wrapper:focus-within {
  opacity: 1;
  filter: none;
}

.fab-group { display: flex; flex-direction: column; align-items: flex-start; position: relative; pointer-events: none; }
.mode-right { left: 30px; right: auto; align-items: flex-start; }
.mode-left { right: 30px; left: auto; align-items: flex-end; }

.fab-btn {
  width: 60px;
  height: 60px;
  background: var(--rise-blue);
  border: 0;
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 4px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  transition: transform .2s;
}

.fab-btn:hover { transform: scale(1.05); }
.fab-btn span { display: block; width: 28px; height: 4px; background: var(--rise-yellow); border-radius: 999px; }

.fab-panel {
  display: none;
  position: absolute;
  bottom: 70px;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  padding: 8px;
  pointer-events: auto;
}

.mode-right .fab-panel { left: 0; }
.mode-left .fab-panel { right: 0; }
.fab-panel.active { display: block; animation: fabFade .2s ease-out; }

@keyframes fabFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header { font-size: .7rem; font-weight: 900; color: #adb5bd; text-transform: uppercase; padding: 8px 16px 4px; letter-spacing: .5px; }
.panel-item { display: flex; align-items: center; padding: 10px 16px; color: var(--rise-blue); font-weight: 900; font-size: .9rem; border-radius: 8px; cursor: pointer; }
.panel-item:hover { background: #f8f9fa; }
.panel-item.danger { color: #dc3545; }
.panel-item.quick-log-link { color: #008069; display: flex !important; }
.panel-item.disabled { color: #9aa1aa; cursor: not-allowed; }
.panel-divider { height: 1px; background: #e9ecef; margin: 8px 0; }

.footer {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 5px solid var(--rise-yellow);
  color: var(--muted);
  text-align: center;
  font-size: .85rem;
}

/* ==========================================================================
   16. MEDIA QUERIES (MOBILE RESPONSIVENESS)
   ========================================================================== */
@media(max-width:1000px) {
  .insight-bottom, .glance-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .app-container { margin: 10px; padding: 18px 12px; }
  .chart-shell { height: 260px; }
  .page-title { font-size: 2rem; }
  .utility-brand span:last-child { display: none; }
  .individual-header, .individual-toolbar, .summary-search-row, .summary-topline { align-items: stretch; flex-direction: column; }
  .search-box, .summary-search-row .search-box { width: 100%; }
  .table-wrap { display: none; }
  .mobile-card-list { display: block; }
  .nav-rail { padding: 8px 10px; }
  .dashboard-container { margin: 10px; padding: 14px; }

  #summary-data-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "assess" "member" "contact";
  }

  .work-grid { grid-template-columns: 1fr 1fr; }
  .assessment-value { font-size: 2rem; }

  .source-home { padding: 22px 12px; }
  .source-insights, .glance-live, .qs-details { grid-template-columns: 1fr; }
  .glance-right, .qs-main { border-left: 0; border-right: 0; padding-left: 0; padding-right: 0; }
  #campaign-glance-widget .section-caption {
    margin-bottom: 18px;
  }
  .glance-summary b.blue {
    text-align: center;
  }
  .glance-summary b.blue .glance-summary-label {
    font-size: .82em;
    line-height: 1;
  }
  .desktop-heatmap-copy {
    display: none;
  }
  .mobile-heatmap-copy {
    display: inline;
  }
  .treemap-container { height: 300px; }
  .chart-tooltip.mobile-treemap-tooltip {
    max-width: calc(100vw - 20px);
    pointer-events: auto;
  }
  .mobile-treemap-tooltip .tooltip-note {
    display: none;
  }
  .mobile-treemap-tooltip .tooltip-drill-button {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #b71c1c;
    border-radius: 6px;
    background: #c62828;
    color: #fff;
    font-size: .96rem;
    font-weight: 900;
    text-align: center;
  }
  .source-tray.notification-tray { width: 100vw; }
  .person-grid, .qs-grid { grid-template-columns: 1fr; }
  .density-legend { margin-left: 0; }
  .fab-wrapper { bottom: 24px; }
  .mode-right { left: 15px; }
  .mode-left { right: 15px; }
  .fab-panel {
    bottom: 70px !important;
    height: auto !important;
    min-width: min(360px, calc(100vw - 24px));
    max-height: none !important;
    overflow: visible !important;
    padding: 10px 12px !important;
  }
  .fab-panel.active {
    display: block !important;
    height: auto !important;
    min-height: max-content !important;
    max-height: none !important;
    overflow: visible !important;
    position: absolute;
    top: auto !important;
    bottom: 70px !important;
    width: min(360px, calc(100vw - 24px));
  }
  .mode-right .fab-panel.active {
    left: 0 !important;
    right: auto !important;
  }
  .mode-left .fab-panel.active {
    right: 0 !important;
    left: auto !important;
  }
  .panel-header {
    padding: 6px 16px 4px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: .04em;
  }
  .panel-item {
    justify-content: flex-start;
    min-height: 36px !important;
    padding: 6px 16px !important;
    font-size: 18px !important;
    line-height: 1.08 !important;
    text-align: left;
  }
  .panel-divider {
    margin: 6px 0 !important;
  }
  .fab-panel .demo-only:not([hidden]) {
    display: block !important;
  }
}

@media(max-width:900px) {
  .schedule-header, .schedule-mini-grid { grid-template-columns: 1fr; }
  .schedule-header { display: block; }
  .schedule-assess-box { text-align: left; margin-top: 12px; }
  .schedule-mini-grid { display: grid; }
}

/* ==========================================================================
   17. APPS SCRIPT CHECKPOINTS & REFINEMENTS
   ========================================================================== */
.source-home { padding: 40px; }
.source-home .mb-5 { margin-bottom: 38px; }

.quick-search-trigger { box-shadow: 0 2px 7px rgba(0,0,0,.08); font-size: .92rem; }
.quick-search-trigger::before { content: "\2315 "; font-weight: 900; }

.membership-card {
  overflow: hidden;
}

.rise-chart-wrapper { width: 100%; height: 390px; position: relative; margin-bottom: 22px; overflow: hidden; }
.membership-chart-scroll {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.membership-chart-scroll svg { display: block; height: 100%; }
.membership-y-axis-layer {
  background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 72%, rgba(255,255,255,0) 100%);
  display: block;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  z-index: 4;
}
.membership-y-axis-layer .domain {
  display: none;
}
.membership-y-axis-layer text {
  fill: #6c757d;
  font-weight: 700;
  font-size: 12px;
}
.membership-chart-point {
  cursor: pointer;
  outline: none;
}
.membership-chart-point circle {
  transition: r .12s ease, stroke-width .12s ease, filter .12s ease;
}
.membership-chart-point.active circle:not(.membership-chart-hit),
.membership-chart-point:focus-visible circle:not(.membership-chart-hit) {
  filter: drop-shadow(0 3px 7px rgba(75,83,185,.32));
  r: 7;
  stroke-width: 4;
}
.membership-chart-hit {
  fill: transparent;
  pointer-events: all;
}
.membership-scroll-shade {
  display: none;
  height: 100%;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 68px;
  z-index: 5;
}
.membership-scroll-shade.left {
  background: linear-gradient(90deg, rgba(75,83,185,.2), rgba(255,255,255,0));
  left: 0;
}
.membership-scroll-shade.right {
  background: linear-gradient(270deg, rgba(75,83,185,.2), rgba(255,255,255,0));
  right: 0;
}
.membership-scroll-cue {
  align-items: center;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(75,83,185,.18);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(33,37,41,.14);
  color: var(--rise-blue);
  display: none;
  font-size: 1.35rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  top: calc(50% - 17px);
  width: 34px;
  z-index: 6;
}
.membership-scroll-cue.left { left: 42px; }
.membership-scroll-cue.right { right: 8px; }
.rise-chart-wrapper.more-left .membership-scroll-shade.left,
.rise-chart-wrapper.more-right .membership-scroll-shade.right {
  display: block;
}
.rise-chart-wrapper.more-left .membership-scroll-cue.left,
.rise-chart-wrapper.more-right .membership-scroll-cue.right {
  display: inline-flex;
}
.source-insights { grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(360px, 3fr); }
.source-insights .metric { min-height: 104px; }

.threshold-panel {
  min-width: 0;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.threshold-panel .card-header.small {
  background: transparent;
  color: var(--muted);
}

.threshold-control {
  display: grid;
  grid-template-columns: max-content minmax(220px, 1fr) 58px;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}

.threshold-control label {
  color: #495057;
  font-weight: 800;
  white-space: nowrap;
}

.threshold-control input[type="range"] {
  width: 100%;
  min-width: 0;
}

.threshold-number {
  width: 58px;
}

.threshold-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.grid-line line { stroke: #e9ecef; stroke-opacity: .75; }
.grid-line path, .domain { display: none; }
.tick text { fill: #6c757d; font-weight: 700; font-size: 12px; }

.glance-card-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.glance-card-header > div:first-child { flex: 1; }
.glance-nav { display: none; white-space: nowrap; }

.glance-loading { display: grid; place-items: center; text-align: center; min-height: 260px; padding: 50px; }
.glance-loading h3 { color: var(--muted); font-size: 1.1rem; margin: 12px 0 4px; }

.spinner-dot {
  width: 32px;
  height: 32px;
  border: 4px solid #dde2ee;
  border-top-color: var(--rise-blue);
  border-radius: 50%;
  animation: riseSpin .8s linear infinite;
}

@keyframes riseSpin {
  to { transform: rotate(360deg); }
}

.glance-live { display: none; grid-template-columns: minmax(0, 1.38fr) minmax(360px, 1fr); gap: 26px; }
.glance-right { border-left: 1px solid var(--line); padding-left: 26px; }

.treemap-container {
  width: 100%;
  height: 360px;
  background: #f8f9fa;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.treemap-node { cursor: pointer; }
.treemap-node:hover { opacity: .84; }
.treemap-node text { pointer-events: none; }

.density-legend { width: 230px; margin: 10px 0 0 auto; }
.density-legend div { display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; font-weight: 900; }
.density-legend i {
  display: block;
  height: 12px;
  background: linear-gradient(to right, #28A745 0%, #FFC107 25%, #F06F3A 50%, #DC3545 75%, #8B0000 100%) !important;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.density-legend b { display: block; text-align: center; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }

.scale-row { display: flex; justify-content: space-between; color: var(--muted); font-size: .68rem; font-weight: 900; margin: -12px 0 22px; }
.hover-note { text-align: center; color: var(--muted); font-weight: 800; font-size: .72rem; font-style: italic; margin: -10px 0 22px; }

.callout-box {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  margin-bottom: 20px;
  max-height: 170px;
  overflow: auto;
}

.issue-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eef1f5; padding: 7px 0; font-size: .86rem; }
.issue-row:last-child { border-bottom: 0; }
.issue-row strong { color: #495057; }
.issue-row span { color: var(--rise-blue); font-weight: 900; }

.issue-row.issue-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 2px;
  overflow: hidden;
}
.issue-row.issue-detail-row .issue-title {
  min-width: 0;
}
.issue-row.issue-detail-row .issue-count {
  color: var(--rise-blue);
  font-weight: 900;
  justify-self: end;
  white-space: nowrap;
}
.issue-row.issue-detail-row .issue-context {
  color: #495057;
  font-size: .82rem;
  font-weight: 400;
  justify-self: end;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

@media(max-width:900px) {
  .issue-row.issue-detail-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .issue-row.issue-detail-row .issue-context {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

@media(min-width:768px) and (max-width:1700px) {
  #campaign-glance-widget .glance-right .issue-row.issue-detail-row {
    grid-template-columns: minmax(9rem, 1fr) minmax(12rem, 58%) !important;
  }

  #campaign-glance-widget .glance-right .issue-row.issue-detail-row .issue-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #campaign-glance-widget .glance-right .issue-row.issue-detail-row .issue-count {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  #campaign-glance-widget .glance-right .issue-row.issue-detail-row .issue-context {
    grid-column: 2 !important;
    grid-row: 2 !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
}

.source-table-wrap { max-height: 410px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.source-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: .86rem; }
.source-table th, .source-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.source-table th { position: sticky; top: 0; background: #f8f9fa; color: #495057; text-transform: none; }

.interactive-row { cursor: pointer; }
.interactive-row:hover { background: #f8f9fa; }

.micro-title { font-size: 1.35rem; margin: 0 0 16px; color: #212529; }

.person-card { background: #f8f9fa; border: 1px solid var(--line); border-radius: 10px; padding: 24px; margin-bottom: 16px; }
.person-card h3 { color: var(--rise-blue); font-size: 1.7rem; margin: 0 0 8px; }

.person-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.person-grid span, .qs-grid span, .qs-side span { display: block; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.person-grid strong, .qs-grid strong { display: block; color: #212529; }
.person-grid .wide { grid-column: 1/-1; background: transparent !important; padding: 0 !important; }

.target-box { background: #f8f9fa; border: 1px solid var(--line); border-left: 5px solid var(--rise-blue); border-radius: 8px; padding: 12px; margin-bottom: 12px; max-height: 120px; overflow: auto; font-size: .86rem; }
.border-success { border-left-color: #198754; }
.border-danger { border-left-color: #dc3545; }
.border-secondary { border-left-color: #6c757d; }

.timeline-container { position: relative; border-left: 2px solid #dee2e6; padding-left: 20px; }
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before { content: ""; position: absolute; left: -26px; top: 3px; width: 10px; height: 10px; background: var(--rise-blue); border-radius: 50%; }
.timeline-item b { color: var(--rise-blue); }
.timeline-item p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }

.notification-tray-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1040; display: none; opacity: 0; transition: opacity .25s; }
.notification-tray-backdrop.open { display: block; opacity: 1; }

.source-tray.notification-tray {
  position: fixed !important;
  top: 0 !important;
  right: -100%;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  display: flex !important;
  flex-direction: column;
  background: #f4f6f8;
  border: 0;
  border-radius: 0;
  box-shadow: -4px 0 25px rgba(0,0,0,.16);
  padding: 0;
  z-index: 1050;
  transition: right .3s cubic-bezier(.4,0,.2,1);
}

.source-tray.notification-tray.open { right: 0; }
.source-tray .tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 8px;
}
.source-tray .tray-header h5 { font-size: 1.15rem; margin: 0; }
.source-tray .tray-header .btn { flex: 0 0 auto; }
.source-tray .tray-content { padding: 8px 18px 16px; }
.source-tray .tray-widget { border-top-width: 4px; margin-bottom: 22px; }
.source-tray .widget-collapsed { padding: 13px 15px; }
.source-tray .widget-collapsed span { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .84rem; }
.source-tray .widget-collapsed b { font-size: .72rem; color: #6c757d; }
.source-tray .widget-expanded { padding: 0 13px 12px; }
.source-tray .widget-expanded h3 { font-size: 1.62rem; margin: 0; }
.source-tray .widget-expanded p { margin: 1px 0 6px; }

.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 11px 0 9px; }
.widget-head strong { color: #6c757d; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }

.widget-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f9fa;
  color: #212529;
  padding: 3px 8px;
  font-size: .68rem;
  font-weight: 900;
  white-space: nowrap;
}

.widget-badge.healthy { background: #198754; color: #fff; border-color: #198754; }
.widget-badge.danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.widget-badge.live { background: var(--rise-yellow); color: #212529; border-color: var(--rise-yellow); }
.verified-text { color: #198754; font-size: .78rem; font-weight: 900; }

.widget-table-wrap { max-height: 130px; overflow: auto; border: 1px solid #eef1f5; border-radius: 8px; }

.source-tray .source-table { font-size: .78rem; }
.source-tray .source-table th, .source-tray .source-table td { padding: 7px 8px; vertical-align: middle; }
.source-tray .source-table th { text-transform: none; }
.source-tray .source-table input[type=checkbox] { width: 18px; height: 18px; }

.field-assignment-widget {
  background: transparent;
  border-top-color: transparent;
  box-shadow: none;
}

.field-assignment-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin: 9px 0 16px;
}

.field-assignment-head strong {
  display: block;
  color: #5c636a;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.field-assignment-head a {
  display: inline-block;
  margin-top: 6px;
  color: var(--rise-blue);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.field-assignment-status {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.field-car-icon {
  width: 24px;
  height: 18px;
  color: #2dbd5a;
  background: currentColor;
  border-radius: 5px 5px 3px 3px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath fill='black' d='M4 15.5V18H2v-8l2.3-7A3 3 0 0 1 7.15 1h9.7a3 3 0 0 1 2.85 2L22 10v8h-2v-2.5H4ZM6.2 4 4.8 8.5h14.4L17.8 4H6.2ZM6 14a1.7 1.7 0 1 0 0-3.4A1.7 1.7 0 0 0 6 14Zm12 0a1.7 1.7 0 1 0 0-3.4A1.7 1.7 0 0 0 18 14Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath fill='black' d='M4 15.5V18H2v-8l2.3-7A3 3 0 0 1 7.15 1h9.7a3 3 0 0 1 2.85 2L22 10v8h-2v-2.5H4ZM6.2 4 4.8 8.5h14.4L17.8 4H6.2ZM6 14a1.7 1.7 0 1 0 0-3.4A1.7 1.7 0 0 0 6 14Zm12 0a1.7 1.7 0 1 0 0-3.4A1.7 1.7 0 0 0 18 14Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field-assignment-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field-assignment-metrics div {
  min-height: 68px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  background: #f8f9fa;
}

.field-assignment-metrics span {
  color: #5c636a;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.field-assignment-metrics strong {
  color: #212529;
  font-size: 1.52rem;
  font-weight: 900;
  line-height: 1.05;
}

.field-assignment-metrics em {
  color: #6c757d;
  font-style: normal;
  font-weight: 700;
}

.field-assignment-metrics .reach { color: #198754; }
.field-assignment-metrics .miss { color: #dc3545; }
.field-assignment-metrics .done { color: #0d6efd; }

.field-route-link {
  display: block;
  margin: 14px 2px 0 auto;
  color: var(--rise-blue);
  font-weight: 900;
  text-align: right;
  text-decoration: none;
}

/* ==========================================================================
   18. ACTIVIST MAPPING
   ========================================================================== */
.activist-mapping-card {
  overflow: hidden;
}

.activist-map-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 16px;
}

.activist-map-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.activist-map-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.activist-map-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f9fa;
  padding: 7px 10px;
  color: #5c636a;
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.activist-map-summary strong {
  color: var(--rise-blue);
  font-size: 1rem;
}

.activist-map-frame {
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: auto;
  border: 2px solid #d9dee5;
  border-radius: 8px;
  background:
    linear-gradient(#fdfdfd, #fdfdfd) padding-box,
    repeating-linear-gradient(90deg, rgba(75,83,185,.08) 0, rgba(75,83,185,.08) 1px, transparent 1px, transparent 80px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
  -webkit-overflow-scrolling: touch;
}

.activist-map-canvas {
  min-width: 1180px;
  min-height: 100%;
  padding: 34px;
}

.activist-tree-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 82px;
  align-items: start;
}

.activist-tree-column {
  position: relative;
  display: grid;
  gap: 26px;
  min-width: 300px;
}

.branch-column::before,
.person-column::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 28px;
  bottom: 28px;
  width: 4px;
  border-radius: 999px;
  background: #555;
}

.map-branch-group {
  position: relative;
  display: grid;
  gap: 12px;
}

.map-branch-group::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 44px;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #555;
}

.map-branch-group::after,
.map-node-card::before,
.map-person-card::before {
  content: "";
  position: absolute;
  left: -52px;
  top: 36px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #555;
}

.root-column .map-node-card::before {
  display: none;
}

.map-branch-label {
  width: max-content;
  max-width: 320px;
  border-radius: 999px;
  background: #eef1f5;
  color: #5c636a;
  padding: 5px 11px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.map-branch-stack {
  display: grid;
  gap: 20px;
}

.map-node-card,
.map-person-card {
  position: relative;
  width: 360px;
  border: 4px solid #111;
  border-radius: 24px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 5px 16px rgba(0,0,0,.06);
}

.map-node-large {
  width: 380px;
}

.map-node-card.is-compact {
  padding: 13px 15px;
  border-radius: 22px;
}

.map-node-title {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  border-bottom: 4px solid #555;
  padding-bottom: 8px;
}

.map-node-card.is-compact .map-node-title {
  border-bottom: 0;
  padding-bottom: 0;
}

.map-node-title h3 {
  min-width: 0;
  margin: 0;
  color: var(--rise-blue);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.map-icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--rise-blue);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.map-icon-btn.branch {
  border: 2px solid #111;
  color: #111;
  font-size: 1.7rem;
}

.map-icon-btn:hover {
  background: #eef1f5;
}

.map-node-stats {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.map-node-stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4f5358;
  font-size: 1rem;
  font-weight: 900;
}

.map-node-stats span {
  color: #4f5358;
}

.map-node-stats strong {
  color: #212529;
}

.map-compact-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.map-compact-metrics span {
  border-radius: 999px;
  background: #f1f3f5;
  padding: 4px 8px;
  color: #5c636a;
  font-size: .68rem;
  font-weight: 900;
}

.map-activist-line {
  display: grid;
  grid-template-columns: max-content 74px max-content;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #4f5358;
  font-weight: 900;
}

.map-activist-line input {
  width: 74px;
  border: 1px solid #cfd4da;
  border-radius: 8px;
  padding: 7px 8px;
  color: #dc3545;
  font-size: 1rem;
  font-weight: 900;
}

.map-activist-line button {
  border: 0;
  background: transparent;
  color: var(--rise-blue);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: underline;
}

.map-wide-btn {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.map-person-card {
  width: 690px;
  border-radius: 22px;
  padding: 16px;
}

.map-colleague-card {
  width: 620px;
}

.map-person-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 2px solid #eef1f5;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.map-person-head h3 {
  margin: 0;
  color: var(--rise-blue);
  font-size: 1.45rem;
  font-weight: 900;
}

.map-person-head p {
  margin: 4px 0 0;
  color: #6c757d;
  font-size: .8rem;
  font-weight: 700;
}

.map-schedule-alert {
  width: min(310px, 100%);
  padding: 10px 12px;
  margin: 12px 0;
}

.map-schedule-alert .schedule-alert-text,
.map-schedule-alert .schedule-alert-link {
  font-size: .78rem;
}

.map-person-actions,
.activist-map-actions,
.activist-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.map-person-actions {
  align-items: center;
  margin-top: 10px;
}

.activist-map-actions {
  margin-top: 16px;
}

.map-empty-branch {
  width: 320px;
  border: 2px dashed #cfd4da;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  color: #6c757d;
  font-weight: 900;
  text-align: center;
}

.activist-breakdown-content {
  border: 4px solid #111;
  border-radius: 22px;
}

.activist-breakdown-content .modal-header {
  background: #fff;
  border-bottom: 0;
  padding-bottom: 4px;
}

.activist-breakdown-content .modal-header h2,
.activist-assign-content .modal-header h2 {
  color: var(--rise-blue);
  font-size: 2.4rem;
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: #555;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

.activist-assign-content {
  border: 4px solid #111;
  border-radius: 18px;
}

.activist-assign-content .modal-header {
  background: #fff;
  border-bottom: 0;
}

.activist-picker-wrap {
  max-height: 48vh;
}

.activist-picker-table {
  min-width: 760px;
}

.activist-picker-table input[type="checkbox"] {
  width: 28px;
  height: 28px;
  accent-color: var(--rise-blue);
}

.activist-modal-actions {
  margin-top: 22px;
  justify-content: space-between;
}

/* ==========================================================================
   19. SCHEDULE MODALS & SCORE PILLS
   ========================================================================== */
.schedule-modal-content { width: min(900px, 100%); }
.schedule-modal-card { background: #fff; border-top: 5px solid var(--rise-blue); border-radius: 8px; padding: 20px; }

.schedule-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 2px solid #eef1f5;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.schedule-header h3 { margin: 0; color: var(--rise-blue); font-size: 1.8rem; font-weight: 900; }
.schedule-header p { margin: 5px 0 0; font-size: .86rem; }

.schedule-assess-box {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: right;
  min-width: 130px;
}

.schedule-assess-box span { display: block; color: var(--rise-blue); font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.schedule-assess-box strong { display: block; color: var(--rise-blue); font-size: 1.25rem; line-height: 1.1; }

.schedule-mini-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.schedule-mini-grid div { background: #fdfdfd; border: 1px solid #eef1f5; border-radius: 4px; padding: 7px; }
.schedule-mini-grid span { display: block; color: #8a939d; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.schedule-mini-grid strong { display: block; color: #212529; font-size: .86rem; }

.schedule-section-title { margin: 15px 0 8px; color: var(--rise-blue); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.schedule-table-wrap { max-height: 360px; }
.schedule-table { min-width: 680px; }
.schedule-table th { background: var(--rise-blue); color: #fff; }

.score-row td:first-child { border-left: 6px solid #fff; }
.score-row.score-1 td:first-child { border-left-color: #cfe2f3; }
.score-row.score-2 td:first-child { border-left-color: #d9ead3; }
.score-row.score-3 td:first-child { border-left-color: #ffe599; }
.score-row.score-4 td:first-child { border-left-color: #f4cccc; }

.score-pill {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #212529;
  background: #fff;
  border: 1px solid #dee2e6;
  font-weight: 900;
}

.score-pill.score-1 { background: #cfe2f3; border-color: #9fc5e8; }
.score-pill.score-2 { background: #d9ead3; border-color: #b6d7a8; }
.score-pill.score-3 { background: #ffe599; border-color: #f1c232; }
.score-pill.score-4 { background: #f4cccc; border-color: #e6b8af; }
.score-pill.score-5, .score-pill.score-99 { color: #6c757d; background: #fff; border-color: #dee2e6; }

/* ==========================================================================
   19. OUTREACH PHONE P0 CONTAINMENT
   ========================================================================== */
@media (max-width: 767px) {
  body:has(.outreach-page) {
    overflow-x: hidden;
  }

  body:has(.outreach-page):not(.public-outreach-page) .outreach-page {
    box-sizing: border-box;
    margin: 10px;
    max-width: none;
    padding: 18px 12px 72px;
    width: auto;
  }

  body:has(.outreach-page) .page-title {
    font-size: 2rem;
    line-height: 1.02;
    margin-bottom: 16px;
  }

  body:has(.outreach-page) .outreach-tabs,
  body:has(.outreach-page) .riseBtns,
  body:has(.outreach-page) .petition-dash-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body:has(.outreach-page) .outreach-modal {
    align-items: center;
    justify-items: center;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body:has(.outreach-page) .outreach-modal .dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 20px);
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
  }

  body:has(.outreach-page) .outreach-modal .dialog:not(.full) {
    display: flex;
    flex-direction: column;
    max-height: min(86dvh, 760px);
  }

  body:has(.outreach-page) .outreach-modal .dialog:not(.full) .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:has(.outreach-page) .outreach-modal .dialog header,
  body:has(.outreach-page) .outreach-modal .dialog footer {
    padding: 10px 12px;
    gap: 8px;
  }

  body:has(.outreach-page) .outreach-modal .dialog header h2 {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.15;
  }

  body:has(.outreach-page) .outreach-modal .modal-body {
    max-width: 100%;
    padding: 12px;
    overflow-x: hidden;
  }

  body:has(.outreach-page) .outreach-modal .pane-head,
  body:has(.outreach-page) .outreach-modal .riseTop,
  body:has(.outreach-page) .outreach-modal .live,
  body:has(.outreach-page) .outreach-modal .petition-live-body,
  body:has(.outreach-page) .outreach-modal .email-dashboard-layout,
  body:has(.outreach-page) .outreach-modal .widgets,
  body:has(.outreach-page) .outreach-modal .petition-dashboard-widgets,
  body:has(.outreach-page) .outreach-modal .email-metric-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body:has(.outreach-page) .outreach-modal .pane-head h1,
  body:has(.outreach-page) .outreach-modal .riseTop h1 {
    font-size: 1.25rem !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page) .outreach-modal .riseProg {
    width: auto !important;
    max-width: 100%;
  }

  body:has(.outreach-page) .outreach-modal .liveText,
  body:has(.outreach-page) .outreach-modal .liveForm,
  body:has(.outreach-page) .outreach-modal .petition-doc-frame,
  body:has(.outreach-page) .outreach-modal .petition-live-form,
  body:has(.outreach-page) .outreach-modal .email-dashboard-preview,
  body:has(.outreach-page) .outreach-modal .campaign-card,
  body:has(.outreach-page) .outreach-modal .widget {
    min-width: 0;
    padding: 14px !important;
    box-sizing: border-box;
  }

  body:has(.outreach-page) .outreach-modal .liveForm {
    border-left: 0 !important;
    border-top: 1px solid var(--line);
  }

  body:has(.outreach-page) .outreach-modal .email-dashboard-iframe {
    width: 100%;
    min-height: 420px;
  }

  body:has(.outreach-page) .outreach-modal .chart svg,
  body:has(.outreach-page) .outreach-modal .signature-chart {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    overflow: visible;
  }

  body:has(.outreach-page) .outreach-modal .report-table-wrap {
    max-height: min(62dvh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    border: 0;
  }

  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table,
  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table thead,
  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table tbody,
  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table tr,
  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table th,
  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table thead {
    display: none;
  }

  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table td {
    display: grid;
    grid-template-columns: minmax(84px, 34%) minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #eef1f5;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page) .outreach-modal .report-table-wrap .source-table td:last-child {
    border-bottom: 0;
  }

  body:has(.outreach-page):not(.public-outreach-page) .send-receive-email {
    display: grid;
    gap: 4px;
    margin: 18px 0 18px;
    padding: 14px 16px;
    background: #f4f6fb;
    border: 1px solid #dde2f2;
    border-left: 5px solid var(--rise-blue);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  }

  body:has(.outreach-page):not(.public-outreach-page) .send-receive-email-label {
    color: var(--rise-blue);
    font-weight: 900;
  }

  body:has(.outreach-page):not(.public-outreach-page) .send-receive-email-link {
    color: var(--rise-blue);
    font-weight: 900;
    line-height: 1.2;
  }

  body:has(.outreach-page):not(.public-outreach-page) .campaign-email-info-link {
    justify-self: start;
    margin-top: 4px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #tab-email .pane-head .btn,
  body:has(.outreach-page):not(.public-outreach-page) #tab-petitions .pane-head .btn,
  body:has(.outreach-page):not(.public-outreach-page) #tab-surveys .pane-head .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) .campaign-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .campaign-card h3 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.08;
  }

  body:has(.outreach-page):not(.public-outreach-page) .campaign-card .meta {
    margin: 0;
    font-size: .92rem;
    line-height: 1.18;
  }

  body:has(.outreach-page):not(.public-outreach-page) .campaign-card p.muted {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
  }

  body:has(.outreach-page):not(.public-outreach-page) .card-actions-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 2px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .card-primary-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .card-primary-actions .badge {
    justify-self: start;
    white-space: nowrap;
  }

  body:has(.outreach-page):not(.public-outreach-page) .card-primary-actions .btn {
    min-height: 42px;
    justify-content: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) .card-icon-actions {
    justify-content: flex-start;
    margin-top: 0;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #petitionDashboardModal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #emailDashboardModal .dialog.full,
  body:has(.outreach-page):not(.public-outreach-page) #surveyDashboardModal .dialog.full {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    width: calc(100vw - 16px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #petitionDashboardModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #emailDashboardModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #surveyDashboardModal .modal-body {
    flex: 1 1 auto;
    max-height: none !important;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .modal-body {
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .modal-footer-left,
  body:has(.outreach-page):not(.public-outreach-page) .modal-footer-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal footer,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .builder-layout,
  body:has(.outreach-page):not(.public-outreach-page) .email-builder,
  body:has(.outreach-page):not(.public-outreach-page) .survey-builder,
  body:has(.outreach-page):not(.public-outreach-page) .target-layout,
  body:has(.outreach-page):not(.public-outreach-page) .survey-finalize-layout,
  body:has(.outreach-page):not(.public-outreach-page) .survey-dashboard-layout,
  body:has(.outreach-page):not(.public-outreach-page) .survey-dashboard-action-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .builder-pane,
  body:has(.outreach-page):not(.public-outreach-page) .preview-pane,
  body:has(.outreach-page):not(.public-outreach-page) .email-work,
  body:has(.outreach-page):not(.public-outreach-page) .email-side,
  body:has(.outreach-page):not(.public-outreach-page) .survey-work,
  body:has(.outreach-page):not(.public-outreach-page) .survey-side {
    border-left: 0 !important;
    border-right: 0 !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-side,
  body:has(.outreach-page):not(.public-outreach-page) .survey-side {
    border-bottom: 1px solid #dee2e6 !important;
    border-top: 1px solid #dee2e6 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .wizard-grid,
  body:has(.outreach-page):not(.public-outreach-page) .wizard-grid.three,
  body:has(.outreach-page):not(.public-outreach-page) .prop-grid,
  body:has(.outreach-page):not(.public-outreach-page) .survey-style-row,
  body:has(.outreach-page):not(.public-outreach-page) .survey-color-picker-row,
  body:has(.outreach-page):not(.public-outreach-page) .layout-save-row,
  body:has(.outreach-page):not(.public-outreach-page) .survey-url-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .module-grid,
  body:has(.outreach-page):not(.public-outreach-page) .survey-side .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .module-card {
    min-height: 74px !important;
    padding: 10px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-header-card,
  body:has(.outreach-page):not(.public-outreach-page) .email-body-card,
  body:has(.outreach-page):not(.public-outreach-page) .survey-header-card,
  body:has(.outreach-page):not(.public-outreach-page) .survey-body-card,
  body:has(.outreach-page):not(.public-outreach-page) .target-card,
  body:has(.outreach-page):not(.public-outreach-page) .letterhead-box,
  body:has(.outreach-page):not(.public-outreach-page) .preview-card,
  body:has(.outreach-page):not(.public-outreach-page) .active-target-list {
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    box-sizing: border-box;
  }

  body:has(.outreach-page):not(.public-outreach-page) .active-target-list {
    min-height: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .filter-box {
    max-height: 170px !important;
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .quick-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding-top: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .quick-actions .btn,
  body:has(.outreach-page):not(.public-outreach-page) .target-card .btn,
  body:has(.outreach-page):not(.public-outreach-page) .custom-upload-card .input {
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-body-head,
  body:has(.outreach-page):not(.public-outreach-page) .survey-body-head {
    align-items: stretch !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 12px !important;
    position: static !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-body-head .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-body-head .actions select {
    grid-column: 1 / -1;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-toolbar-wrap {
    position: sticky !important;
    top: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-toolbar-wrap .rich-toolbar,
  body:has(.outreach-page):not(.public-outreach-page) .rich-toolbar {
    flex-wrap: nowrap !important;
    max-width: 100%;
    overflow-x: auto;
    padding: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .toolbar-group,
  body:has(.outreach-page):not(.public-outreach-page) .toolbar-select {
    flex: 0 0 auto;
  }

  body:has(.outreach-page):not(.public-outreach-page) .email-canvas,
  body:has(.outreach-page):not(.public-outreach-page) .survey-canvas {
    min-height: 420px !important;
    overflow: visible !important;
    padding: 16px 10px 28vh !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-row,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-row tbody,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-row tr,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-row td,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .column-cell {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .column-cell + .column-cell {
    margin-top: 10px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .builder-block,
  body:has(.outreach-page):not(.public-outreach-page) .content-module-wrapper {
    cursor: default;
    margin-bottom: 14px !important;
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .builder-block .drag-handle,
  body:has(.outreach-page):not(.public-outreach-page) .content-module-wrapper .module-drag-handle,
  body:has(.outreach-page):not(.public-outreach-page) .block-controls,
  body:has(.outreach-page):not(.public-outreach-page) .module-controls {
    display: inline-flex !important;
    position: static !important;
    inset: auto !important;
    margin: 0 6px 8px 0;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    min-height: 34px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .block-controls,
  body:has(.outreach-page):not(.public-outreach-page) .module-controls {
    background: #fff;
    padding: 3px 5px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-card {
    cursor: default;
    margin: 14px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-inner {
    padding: 16px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-actions-top {
    align-items: flex-start !important;
    display: grid !important;
    gap: 8px !important;
    position: static !important;
    margin: 0 0 12px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-type-head {
    margin: 0 0 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-main,
  body:has(.outreach-page):not(.public-outreach-page) .survey-branch-row,
  body:has(.outreach-page):not(.public-outreach-page) .survey-responder-answer,
  body:has(.outreach-page):not(.public-outreach-page) .survey-answer-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-right: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-title,
  body:has(.outreach-page):not(.public-outreach-page) .survey-question-help {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-question-footer,
  body:has(.outreach-page):not(.public-outreach-page) .survey-branch-toggle-row {
    justify-content: flex-start !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-branching {
    margin: 0 16px 16px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-dashboard-preview,
  body:has(.outreach-page):not(.public-outreach-page) .survey-final-preview-shell {
    max-height: none !important;
    min-height: 0 !important;
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-public-form {
    max-width: 100% !important;
    padding: 18px 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-dashboard-actions,
  body:has(.outreach-page):not(.public-outreach-page) .survey-dashboard-top-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-grid-wrap,
  body:has(.outreach-page):not(.public-outreach-page) .survey-public-grid-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  body:has(.outreach-page):not(.public-outreach-page) .survey-canvas-fab {
    bottom: 12px !important;
    right: 10px !important;
    transform: scale(.82);
    transform-origin: bottom right;
  }

  body:has(.outreach-page):not(.public-outreach-page) .safe-toast {
    bottom: 86px !important;
    max-width: calc(100vw - 32px);
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 767px) {
  body.home-page .source-home .page-title,
  body.individual-page .page-title,
  body.member-summary-page .page-title,
  body.correction-portal-page .page-title,
  body.reports-body .page-title,
  body:has(.admin-page) .page-title,
  body:has(.outreach-page):not(.public-outreach-page) .outreach-page > .page-title {
    font-size: 1.55rem !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  body.individual-page .app-container,
  body.member-summary-page .summary-page,
  body.correction-portal-page .portal-page,
  body.reports-body .reports-page,
  body:has(.admin-page) .admin-page,
  body:has(.outreach-page):not(.public-outreach-page) .outreach-page {
    margin-top: 16px !important;
    padding-top: 28px !important;
  }

  body.individual-page .top-row,
  body.member-summary-page .page-title,
  body.correction-portal-page .page-title,
  body.reports-body .page-title,
  body:has(.admin-page) .page-title,
  body:has(.outreach-page):not(.public-outreach-page) .page-title {
    margin-bottom: 18px !important;
  }

  body.individual-page .search-dropdown li,
  body.member-summary-page .member-dropdown li,
  body.correction-portal-page .member-dropdown li {
    display: block !important;
    min-height: 44px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(75,83,185,.14) !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }

  body.individual-page .search-dropdown li *,
  body.member-summary-page .member-dropdown li *,
  body.correction-portal-page .member-dropdown li * {
    pointer-events: none !important;
  }
}

/* ==========================================================================
   OUTREACH PHONE BUILDER CLEANUP
   ========================================================================== */
@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-card,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-body-card {
    min-height: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-canvas,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas {
    min-height: 280px !important;
    padding: 12px 10px 104px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-empty-state,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state.full {
    min-height: 220px !important;
    padding: 26px 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-fab {
    display: grid !important;
    font-size: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
    place-items: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-fab .mobile-builder-fab-icon {
    height: 30px;
    width: 30px;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-fab .mobile-builder-fab-icon::before,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-fab .mobile-builder-fab-icon::after {
    background: #212529;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-preview-mode .mobile-builder-fab,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-sheet-open .mobile-builder-fab,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-modal:not(.mobile-builder-step-active) .mobile-builder-fab {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-sheet-backdrop,
  body:has(.outreach-page):not(.public-outreach-page) .mobile-sheet-open .mobile-builder-sheet-backdrop {
    display: none !important;
    pointer-events: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-side,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-side {
    max-height: 54dvh !important;
    overflow-y: auto !important;
    padding: 0 max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-mode-settings .email-side {
    max-height: 38dvh !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #settings-modules,
  body:has(.outreach-page):not(.public-outreach-page) #survey-settings-modules {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-mode-modules .side-section:not(#settings-modules),
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-mode-modules .side-section:not(#survey-settings-modules),
  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-mode-settings #settings-modules {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) .mobile-builder-sheet-bar {
    border-radius: 14px 14px 0 0;
    position: sticky;
    top: 0;
    z-index: 40;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap {
    position: sticky !important;
    top: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .rich-toolbar,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 8px !important;
    white-space: normal !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-group,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-select,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar button,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar select {
    flex: 0 1 auto !important;
    min-width: 0;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-select {
    max-width: calc(50vw - 22px);
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-group.segmented {
    flex: 1 1 148px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .rich-toolbar button,
  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar button {
    min-height: 34px !important;
    min-width: 34px !important;
    padding: 5px 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-color {
    width: 28px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .text-module,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .content-module-wrapper,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .column-cell {
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .row-content {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row > tbody,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row > tbody > tr,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row > tbody > tr > td.column-cell {
    display: block !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row > tbody > tr > td.column-cell {
    padding: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row > tbody > tr > td.column-cell + td.column-cell {
    margin-top: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .placeholder-text {
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    text-align: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-manager-item {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 8px !important;
    min-height: 52px;
    padding: 10px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-label-text {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .required-check {
    grid-column: auto !important;
    justify-self: end !important;
    white-space: nowrap;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .required-check input {
    flex: 0 0 auto;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-card {
    cursor: grab !important;
    margin: 16px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-inner {
    padding: 22px 16px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-actions-top {
    align-items: flex-end !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    position: absolute !important;
    right: 12px !important;
    top: 14px !important;
    z-index: 4 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-card-buttons {
    display: flex !important;
    gap: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-photo-button.large {
    height: 64px;
    width: 64px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-type-head {
    align-items: baseline !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 90px 18px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-type-head strong {
    font-size: 1.12rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    padding-right: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-footer {
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-toolbar {
    margin-right: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-side,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-side {
    pointer-events: none;
    visibility: hidden;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-open .email-side,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-open .survey-side {
    pointer-events: auto;
    visibility: visible;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-fab,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-builder-fab {
    bottom: calc(116px + env(safe-area-inset-bottom)) !important;
    height: 54px !important;
    right: 20px !important;
    width: 54px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .rich-toolbar button {
    min-width: 0 !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .field-manager-item {
    align-items: center !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #petitionModal .required-check {
    align-items: center !important;
    display: inline-flex !important;
    grid-column: auto !important;
  }
}

/* Phone-only Survey Builder refinement. Scoped to #surveyModal so the rest of
   Outreach keeps its current mobile treatment, and desktop/tablet are untouched. */
@media (max-width: 767px) {
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal {
    overflow-x: hidden !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .dialog.full {
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: 100vw !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal header {
    min-height: 48px !important;
    padding: 8px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal header h2 {
    font-size: 1rem !important;
    line-height: 1.15 !important;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .modal-body {
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-builder-tabs {
    gap: 6px !important;
    padding: 0 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-builder-tabs button {
    font-size: .84rem !important;
    line-height: 1.1 !important;
    min-height: 38px !important;
    padding: 7px 4px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-builder {
    gap: 0 !important;
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-builder-fab,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas-fab {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-work {
    padding: 10px 10px 110px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-card,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-body-card {
    border-radius: 7px !important;
    margin-bottom: 9px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-card > :not(.mobile-builder-accordion-toggle) {
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-builder-accordion-toggle {
    font-size: .88rem !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .section-label,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .target-title,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .field-label {
    letter-spacing: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .field-label {
    font-size: .68rem !important;
    line-height: 1.15 !important;
    margin-bottom: 4px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .input,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .select,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .textarea {
    border-radius: 6px !important;
    font-size: .92rem !important;
    line-height: 1.25 !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal textarea.textarea,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal textarea.input {
    min-height: 84px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-body-head {
    gap: 7px !important;
    padding: 9px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-body-head .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-mobile-builder-actions {
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-mobile-builder-actions .btn {
    font-size: 1rem !important;
    min-height: 38px !important;
    padding: 7px 6px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas {
    border-radius: 0 0 7px 7px !important;
    min-height: 260px !important;
    padding: 10px 8px 96px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-open .survey-canvas {
    padding-bottom: calc(58dvh + 170px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state.full {
    min-height: 190px !important;
    padding: 22px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-empty-state h3 {
    font-size: 1.18rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas-header-block {
    background: #fff !important;
    border: 2px solid var(--rise-blue) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    display: block !important;
    margin: 0 auto 12px !important;
    max-width: 100% !important;
    padding: 42px 12px 14px !important;
    position: relative !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-placeholder {
    cursor: pointer;
    min-height: 148px !important;
    text-align: center;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-block-controls {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    left: 10px;
    position: absolute;
    right: 10px;
    top: 10px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-block-controls span {
    display: inline-flex;
    gap: 7px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-header-insert-copy {
    align-items: center;
    border: 2px dashed #bfc2ee;
    color: var(--rise-blue);
    display: grid;
    font-size: 1rem;
    font-weight: 900;
    gap: 6px;
    justify-items: center;
    line-height: 1.1;
    min-height: 96px;
    padding: 18px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-canvas-header-block img {
    border-radius: 4px;
    max-height: 190px !important;
    object-fit: cover;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-section {
    margin-bottom: 16px !important;
    max-width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-section-title {
    border-radius: 6px 6px 0 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-section-title input {
    font-size: .95rem !important;
    min-height: 30px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-section-title-actions {
    align-items: center;
    display: inline-flex;
    gap: 6px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-section-title-actions .control-btn {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.32) !important;
    color: #fff !important;
    min-height: 32px !important;
    min-width: 32px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-survey-insert-zone {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-card {
    border-left-width: 6px !important;
    border-radius: 7px !important;
    box-shadow: 0 2px 7px rgba(0,0,0,.16) !important;
    margin: 14px 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-inner {
    padding: 20px 18px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-actions-top {
    align-items: flex-end !important;
    background: transparent !important;
    border-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    right: 18px !important;
    top: 18px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-card-buttons {
    display: flex !important;
    gap: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .control-btn {
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 1.05rem !important;
    min-height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-photo-button.large {
    border: 1px solid #ced4da !important;
    border-radius: 5px !important;
    font-size: 1.05rem !important;
    height: 74px !important;
    margin-top: 5px !important;
    width: 74px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-type-head {
    align-items: baseline !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 104px 16px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-type-head .module-icon {
    font-size: 1.35rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-type-head strong {
    font-size: 1.18rem !important;
    line-height: 1.15 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-type-head .survey-change-type {
    display: block !important;
    flex-basis: 100% !important;
    font-size: .95rem !important;
    line-height: 1.15 !important;
    width: fit-content !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-main {
    display: block !important;
    padding-right: 104px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-title {
    font-size: 1rem !important;
    min-height: 54px !important;
    padding: 14px 18px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-help {
    font-size: .88rem !important;
    margin-top: 7px !important;
    min-height: 30px !important;
    padding: 6px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-answer-preview {
    gap: 8px !important;
    margin: 18px 104px 24px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-answer-line {
    gap: 8px !important;
    min-width: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-answer-line > .input {
    min-width: 0 !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-answer-icon {
    height: 18px !important;
    width: 18px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-answer-preview .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-answer-preview .btn,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-branch-toggle-row .check-row {
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table {
    min-width: 0 !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table thead,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table tbody,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table tr,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table th,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table td {
    display: block !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table th,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-wrap .source-table td {
    border-bottom: 1px solid #e8ebef !important;
    padding: 6px !important;
    text-align: left !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-grid-label-input {
    min-height: 34px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-branch-toggle-row {
    display: flex !important;
    justify-content: flex-end !important;
    margin: 8px 0 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-branch-toggle-row .check-row {
    width: auto !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-question-footer {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: space-between !important;
    padding: 14px 0 16px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-toolbar {
    display: grid !important;
    grid-template-columns: repeat(4, 38px) !important;
    justify-content: start !important;
    margin-right: auto !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-toolbar button {
    min-height: 36px !important;
    min-width: 36px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-required-toggle {
    justify-content: flex-end !important;
    min-height: 38px !important;
    width: auto !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-branching {
    margin: 0 10px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-branch-row {
    gap: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-side {
    max-height: 58dvh !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-mode-modules .survey-add-section-primary {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-mode-settings #survey-settings-modules {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal.mobile-sheet-mode-settings .survey-side .side-section:not(#survey-customize-form):not(#survey-section-settings) {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .mobile-builder-sheet-bar {
    min-height: 42px !important;
    padding: 8px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .side-section h4 {
    font-size: .9rem !important;
    min-height: 38px !important;
    padding: 9px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .side-section .inner {
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-card {
    min-height: 58px !important;
    padding: 7px 5px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-card .module-icon {
    font-size: 1rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .module-card span:last-child {
    font-size: .72rem !important;
    line-height: 1.1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-swatch-row {
    gap: 7px !important;
    margin-bottom: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-swatch {
    height: 30px !important;
    width: 30px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal #survey-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal #survey-step-finalize {
    padding: 10px 10px 92px !important;
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .target-layout,
  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-finalize-layout {
    display: block !important;
    gap: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-final-tabs {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-final-tabs button {
    background: #fff !important;
    border: 2px solid #d7daf9 !important;
    border-radius: 7px !important;
    color: var(--rise-blue) !important;
    font-size: .8rem !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    min-height: 40px !important;
    padding: 7px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-final-tabs button.active {
    background: var(--rise-blue) !important;
    border-color: var(--rise-blue) !important;
    color: #fff !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-final-panel {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-final-panel.active {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .active-target-list {
    order: -1;
    padding: 11px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .target-card {
    border-radius: 7px !important;
    margin-bottom: 10px !important;
    padding: 11px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .target-title {
    font-size: .86rem !important;
    line-height: 1.15 !important;
    margin-bottom: 9px !important;
    padding-bottom: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .filter-box {
    max-height: 132px !important;
    padding: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .check-row {
    align-items: flex-start !important;
    display: flex !important;
    font-size: .88rem !important;
    gap: 7px !important;
    line-height: 1.18 !important;
    margin: 0 0 7px !important;
    min-height: 30px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .check-row input {
    flex: 0 0 auto !important;
    margin-top: 1px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .active-target-list-body {
    font-size: .9rem !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .quick-actions {
    gap: 7px !important;
    margin-top: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-final-preview-shell {
    border-radius: 7px !important;
    padding: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-public-form {
    border-radius: 7px !important;
    padding: 14px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-public-form .preview-header {
    font-size: 1.12rem !important;
    line-height: 1.15 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-publish-settings h2 {
    font-size: 1.1rem !important;
    line-height: 1.15 !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal .survey-url-row {
    gap: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal footer {
    padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyModal footer .btn {
    font-size: 1rem !important;
    min-height: 40px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyTypeModal .dialog.narrow,
  body:has(.outreach-page):not(.public-outreach-page) #targetListModal .dialog {
    max-height: calc(100dvh - 16px) !important;
    width: calc(100vw - 16px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyTypeModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #targetListModal .modal-body {
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyTypeModal .survey-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #surveyTypeModal .survey-type-choice {
    font-size: .8rem !important;
    min-height: 72px !important;
    padding: 8px 6px !important;
  }
}

@media(max-width:1000px) {
  .activist-map-header {
    display: grid;
    gap: 12px;
  }

  .activist-map-summary {
    justify-content: flex-start;
  }

  .activist-map-frame {
    height: 68vh;
    min-height: 480px;
  }

  .activist-map-canvas {
    min-width: 1040px;
    padding: 24px;
  }

  .activist-tree-grid {
    gap: 62px;
  }

  .map-node-card {
    width: 315px;
  }

  .map-node-large {
    width: 330px;
  }

  .map-person-card {
    width: 560px;
  }

  .map-colleague-card {
    width: 520px;
  }

  .map-person-head,
  .map-person-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .map-person-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media(max-width:640px) {
  .activist-map-frame {
    height: 72vh;
    min-height: 440px;
  }

  .activist-map-canvas {
    min-width: 860px;
    padding: 18px;
  }

  .activist-tree-grid {
    gap: 50px;
  }

  .activist-tree-column {
    min-width: 270px;
  }

  .map-node-card,
  .map-node-large {
    width: 270px;
    border-width: 3px;
    border-radius: 18px;
    padding: 14px;
  }

  .map-node-title {
    grid-template-columns: 30px minmax(0, 1fr) 34px;
    gap: 5px;
  }

  .map-node-title h3 {
    font-size: 1.5rem;
  }

  .map-icon-btn {
    width: 30px;
    height: 30px;
    font-size: 1.5rem;
  }

  .map-icon-btn.branch {
    font-size: 1.25rem;
  }

  .map-node-stats div {
    font-size: .88rem;
  }

  .map-activist-line {
    grid-template-columns: 1fr 70px;
  }

  .map-activist-line button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .map-person-card,
  .map-colleague-card {
    width: 420px;
    border-width: 3px;
  }

  .map-person-card .schedule-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activist-breakdown-content .modal-header h2,
  .activist-assign-content .modal-header h2 {
    font-size: 1.75rem;
  }

  .activist-picker-table {
    min-width: 620px;
  }
}

/* === Activist Mapping Polish Pass === */
.activist-mapping-card {
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.activist-map-header {
  align-items: flex-start;
  border-bottom: 1px solid #e7ebf1;
  padding-bottom: 12px;
}

.activist-map-header .card-header {
  background: transparent;
  border: 0;
  padding: 0;
}

.activist-map-subtitle {
  max-width: 560px;
  color: #6f7782;
  font-size: .84rem;
}

.activist-map-summary button {
  min-height: 42px;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  border: 1px solid #d9dee5;
  border-radius: 7px;
  background: #f8f9fb;
  color: #505761;
  padding: 8px 12px;
  font: inherit;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(20, 24, 35, .04);
}

.activist-map-summary button:hover {
  border-color: var(--rise-blue);
  background: #fff;
}

.activist-map-summary strong {
  font-size: 1.18rem;
  line-height: 1;
}

.activist-map-frame {
  height: min(70vh, 700px);
  min-height: 500px;
  border: 1px solid #dfe4ec;
  border-radius: 7px;
  background:
    radial-gradient(circle at 1px 1px, rgba(75, 83, 185, .10) 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(180deg, #f3f5f9 0%, #eef2f7 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.activist-map-canvas {
  min-width: 980px;
  padding: 28px;
}

.activist-tree-grid {
  gap: 58px;
}

.activist-tree-column {
  gap: 18px;
  min-width: 230px;
}

.branch-column::before,
.person-column::before {
  left: -30px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: #b8c0cc;
}

.map-branch-group::before {
  left: -30px;
  top: 34px;
  width: 30px;
  height: 2px;
  background: #b8c0cc;
}

.map-branch-group::after,
.map-node-card::before,
.map-person-card::before {
  left: -36px;
  top: 29px;
  width: 12px;
  height: 12px;
  border: 2px solid #eef2f7;
  border-radius: 4px;
  background: #8b95a4;
  box-shadow: 0 1px 2px rgba(20,24,35,.14);
}

.map-branch-label {
  background: #e2e7ef;
  color: #6a727e;
  padding: 4px 10px;
  font-size: .62rem;
}

.map-branch-stack {
  gap: 14px;
}

.map-node-card,
.map-person-card {
  border: 1px solid #d9dee7;
  border-top: 4px solid var(--rise-blue);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 22px rgba(32, 38, 52, .10);
}

.map-node-card {
  width: 260px;
  padding: 13px;
}

.map-node-large {
  width: 280px;
}

.map-node-card.is-compact {
  min-height: 76px;
  padding: 11px 12px;
  border-radius: 8px;
}

.map-node-title {
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  gap: 7px;
  border-bottom: 1px solid #edf0f5;
  padding-bottom: 8px;
}

.map-node-card.is-compact .map-node-title {
  border-bottom: 0;
}

.map-node-title h3 {
  font-size: 1.16rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.map-icon-btn {
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  font-size: 1.08rem;
}

.map-icon-btn.branch {
  width: 30px;
  height: 30px;
  border: 1px solid #c9d0db;
  color: var(--rise-blue);
  background: #fff;
  font-size: 1rem;
}

.map-icon-btn:hover,
.map-icon-btn.branch:hover {
  border-color: var(--rise-blue);
  background: #eef1ff;
}

.map-node-stats {
  gap: 5px;
  margin-top: 10px;
}

.map-node-stats div {
  font-size: .82rem;
}

.map-compact-metrics {
  margin-top: 8px;
}

.map-compact-metrics span {
  background: #eef1f5;
  color: #68707b;
  font-size: .62rem;
}

.map-activist-line {
  grid-template-columns: max-content 58px max-content;
  margin-top: 12px;
  font-size: .82rem;
}

.map-activist-line input {
  width: 58px;
  padding: 5px 7px;
  font-size: .86rem;
}

.map-activist-line button {
  font-size: .84rem;
}

.map-wide-btn {
  min-height: 32px;
  margin-top: 10px;
}

.map-person-card {
  width: 560px;
  padding: 14px;
  border-top-color: #6f77d2;
}

.map-colleague-card {
  width: 500px;
}

.map-person-head {
  border-bottom: 1px solid #edf0f5;
  margin-bottom: 10px;
  padding-bottom: 9px;
}

.map-person-head h3 {
  font-size: 1.3rem;
  line-height: 1.05;
}

.map-person-head p {
  font-size: .74rem;
}

.map-person-card .schedule-assess-box {
  min-width: 106px;
  padding: 7px 9px;
}

.map-person-card .schedule-assess-box strong {
  font-size: 1.08rem;
}

.map-person-card .schedule-mini-grid {
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.map-person-card .schedule-mini-grid div {
  min-height: 54px;
  padding: 6px 7px;
}

.map-person-card .schedule-mini-grid strong {
  font-size: .78rem;
  overflow-wrap: anywhere;
}

.map-schedule-alert {
  width: min(280px, 100%);
  margin: 10px 0 0;
  padding: 9px 11px;
  background: #e9f4ff;
}

.map-schedule-link {
  margin-top: 8px;
}

.map-person-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}

.map-person-actions.colleague-actions {
  grid-template-columns: minmax(120px, 1fr) auto;
}

.map-person-actions .btn {
  min-height: 34px;
  justify-content: center;
  white-space: nowrap;
}

.map-record-action {
  justify-self: start;
  color: var(--rise-blue) !important;
  background: #fff !important;
  border-color: #c9d0db !important;
}

.map-primary-action {
  color: #fff !important;
  background: var(--rise-blue) !important;
  border-color: var(--rise-blue) !important;
}

.map-secondary-action {
  background: #f8f9fb !important;
  border-color: #c9d0db !important;
}

.map-resource-action {
  color: #5f6874 !important;
  background: transparent !important;
  border-color: transparent !important;
  text-decoration: underline;
}

.map-empty-branch {
  width: 260px;
  border: 1px dashed #b8c0cc;
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  padding: 14px;
  font-size: .84rem;
}

.activist-breakdown-content,
.activist-assign-content {
  border: 0;
  border-radius: 10px;
}

.activist-breakdown-content .modal-header,
.activist-assign-content .modal-header {
  background: #f8f9fb;
  border-bottom: 1px solid #e7ebf1;
}

.activist-breakdown-content .modal-header h2,
.activist-assign-content .modal-header h2 {
  color: var(--rise-blue);
  font-size: 1.45rem;
  line-height: 1.15;
  text-decoration: none;
}

.mapping-coverage-content .source-table td {
  vertical-align: middle;
}

@media(max-width:1000px) {
  .activist-map-canvas {
    min-width: 900px;
    padding: 22px;
  }

  .activist-tree-grid {
    gap: 50px;
  }

  .map-node-card,
  .map-node-large {
    width: 245px;
  }

  .map-person-card {
    width: 500px;
  }

  .map-colleague-card {
    width: 460px;
  }

  .map-person-actions,
  .map-person-actions.colleague-actions {
    grid-template-columns: 1fr 1fr;
  }

  .map-record-action {
    justify-self: stretch;
  }
}

@media(max-width:640px) {
  .activist-map-frame {
    min-height: 440px;
    background:
      radial-gradient(circle at 1px 1px, rgba(75, 83, 185, .11) 1px, transparent 0) 0 0 / 22px 22px,
      linear-gradient(180deg, #f3f5f9 0%, #eef2f7 100%);
  }

  .activist-map-canvas {
    min-width: 760px;
    padding: 16px;
  }

  .activist-tree-grid {
    gap: 42px;
  }

  .activist-tree-column {
    min-width: 220px;
  }

  .map-node-card,
  .map-node-large {
    width: 220px;
    padding: 11px;
  }

  .map-node-title {
    grid-template-columns: 24px minmax(0, 1fr) 28px;
  }

  .map-node-title h3 {
    font-size: 1.02rem;
  }

  .map-person-card,
  .map-colleague-card {
    width: 390px;
    padding: 12px;
  }

  .map-person-head {
    display: grid;
  }

  .map-person-card .schedule-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-person-actions,
  .map-person-actions.colleague-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING FINAL POLISH PASS
   ========================================================================== */
.activist-mapping-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.activist-map-frame {
  border: 1px solid #d9e0ea;
  background:
    radial-gradient(circle at 1px 1px, rgba(75,83,185,.12) 1px, transparent 0) 0 0 / 24px 24px,
    linear-gradient(135deg, #f7f9fc 0%, #eef3f8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 14px 34px rgba(25,35,60,.08);
}

.activist-map-summary button {
  border: 1px solid #d9dee7;
  border-radius: 7px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 5px 14px rgba(25,35,60,.06);
}

.activist-tree-grid {
  gap: 74px;
}

.branch-column::before,
.person-column::before {
  left: -38px;
  top: 34px;
  bottom: 34px;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--map-line, #b9c4d1) 8%, var(--map-line, #b9c4d1) 92%, transparent 100%);
  box-shadow: none;
  opacity: .9;
}

.map-branch-group::before {
  left: -38px;
  top: 32px;
  width: 38px;
  height: 24px;
  border-top: 2px solid var(--map-line, #b9c4d1);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 18px 0 0;
  background: transparent;
  opacity: .95;
}

.map-branch-group::after,
.map-node-card::before,
.map-person-card::before {
  display: none;
}

.map-branch-label {
  margin-left: -4px;
  border: 1px solid color-mix(in srgb, var(--map-accent, #4B53B9) 28%, #d8dee8);
  background: color-mix(in srgb, var(--map-accent-soft, #eef0ff) 78%, #fff);
  color: color-mix(in srgb, var(--map-accent, #4B53B9) 72%, #4f5967);
  box-shadow: 0 8px 18px rgba(25,35,60,.08);
  padding: 6px 14px;
  font-size: .72rem;
  letter-spacing: .075em;
}

.map-node-card,
.map-person-card {
  border: 1px solid #dfe5ee;
  border-top: 4px solid var(--map-accent, var(--rise-blue));
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(25,35,60,.08), 0 1px 0 rgba(255,255,255,.9) inset;
}

.map-node-card::after,
.map-person-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.map-node-title {
  border-bottom: 1px solid #e8ecf2;
}

.map-node-title h3,
.map-person-head h3 {
  color: var(--map-accent, var(--rise-blue));
}

.map-icon-btn {
  color: var(--map-accent, var(--rise-blue));
}

.map-icon-btn.branch {
  border-color: #cbd3df;
  color: var(--map-accent, var(--rise-blue));
  background: #fff;
}

.map-icon-btn.branch:hover,
.map-icon-btn:hover {
  background: var(--map-accent-soft, #eef0ff);
}

.map-stat-assigned strong {
  color: #198754 !important;
}

.map-stat-unassigned strong {
  color: #dc3545 !important;
}

.map-compact-metrics span:last-child {
  color: #dc3545;
  background: #fff1f2;
}

.map-activist-line input {
  color: #212529;
}

.map-person-card {
  overflow: hidden;
}

.map-person-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.map-person-card .schedule-assess-box.score-1 {
  background: #e3f2fd;
  border-color: #9fc5e8;
}

.map-person-card .schedule-assess-box.score-1 span,
.map-person-card .schedule-assess-box.score-1 strong {
  color: #2f6fa9;
}

.map-person-card .schedule-assess-box.score-2 {
  background: #ecf7e8;
  border-color: #b6d7a8;
}

.map-person-card .schedule-assess-box.score-2 span,
.map-person-card .schedule-assess-box.score-2 strong {
  color: #3f7f33;
}

.map-person-card .schedule-assess-box.score-3 {
  background: #fff7d6;
  border-color: #f1c232;
}

.map-person-card .schedule-assess-box.score-3 span,
.map-person-card .schedule-assess-box.score-3 strong {
  color: #8a6500;
}

.map-person-card .schedule-assess-box.score-4 {
  background: #fff0f0;
  border-color: #e6b8af;
}

.map-person-card .schedule-assess-box.score-4 span,
.map-person-card .schedule-assess-box.score-4 strong {
  color: #a43d35;
}

.map-person-card .schedule-assess-box.score-5 {
  background: #f4f6f8;
  border-color: #d9dee7;
}

.map-person-card .schedule-assess-box.score-5 span,
.map-person-card .schedule-assess-box.score-5 strong {
  color: #6c757d;
}

.map-person-card .schedule-mini-grid {
  grid-template-columns: repeat(5, minmax(88px, 1fr));
}

.map-person-card .schedule-mini-grid div {
  min-width: 0;
  overflow: visible;
}

.map-person-card .schedule-mini-grid strong {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.08;
}

.map-schedule-alert {
  border-left-color: var(--map-accent, var(--rise-blue));
  background: color-mix(in srgb, var(--map-accent-soft, #e9f4ff) 84%, #fff);
}

.map-schedule-alert.schedule-only {
  width: max-content;
  max-width: 100%;
  padding: 8px 11px;
}

.map-person-actions {
  display: grid;
  grid-template-columns: minmax(122px, 1fr) auto auto;
  grid-template-areas:
    "record resource primary"
    "record secondary primary";
  align-items: end;
}

.map-person-actions.colleague-actions {
  grid-template-columns: minmax(122px, 1fr) auto;
  grid-template-areas: "record secondary";
}

.map-record-action {
  grid-area: record;
  align-self: end;
  justify-self: start;
}

.map-resource-action {
  grid-area: resource;
}

.map-secondary-action {
  grid-area: secondary;
}

.map-primary-action {
  grid-area: primary;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}

.map-person-actions .btn {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  line-height: 1.1;
}

body.home-page .source-modal {
  place-items: center;
  align-items: center;
  padding: 18px;
}

body.home-page #scheduleModal .modal-content,
body.home-page .activist-map-modal .modal-content {
  width: min(940px, calc(100vw - 36px));
  max-height: 88vh;
  margin: auto;
  border-radius: 10px;
}

@media(max-width:1000px) {
  .map-person-actions,
  .map-person-actions.colleague-actions {
    grid-template-columns: minmax(122px, 1fr) auto auto;
  }

  .map-person-actions {
    grid-template-areas:
      "record resource primary"
      "record secondary primary";
  }

  .map-person-actions.colleague-actions {
    grid-template-columns: minmax(122px, 1fr) auto;
    grid-template-areas: "record secondary";
  }
}

@media(max-width:640px) {
  .activist-map-canvas {
    min-width: 980px;
  }

  .activist-tree-grid {
    gap: 54px;
  }

  .map-person-card,
  .map-colleague-card {
    width: 500px;
  }

  .map-person-head {
    display: flex;
  }

  .map-person-card .schedule-mini-grid {
    grid-template-columns: repeat(5, minmax(74px, 1fr));
  }

  .map-person-actions,
  .map-person-actions.colleague-actions {
    grid-template-columns: minmax(112px, 1fr) auto auto;
  }

  .map-person-actions {
    grid-template-areas:
      "record resource primary"
      "record secondary primary";
  }

  .map-person-actions.colleague-actions {
    grid-template-columns: minmax(112px, 1fr) auto;
    grid-template-areas: "record secondary";
  }

  body.home-page .source-modal {
    padding: 12px;
  }

  body.home-page #scheduleModal .modal-content,
  body.home-page .activist-map-modal .modal-content {
    width: calc(100vw - 24px);
    max-height: 84vh;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING REFINEMENT PASS
   ========================================================================== */
.map-primary-action {
  align-self: end;
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.map-person-actions .map-primary-action,
.map-person-actions .map-secondary-action,
.map-person-actions .map-record-action {
  height: 34px;
}

.map-resource-action {
  min-height: 30px !important;
}

.mapping-coverage-content .activist-picker-table {
  min-width: 980px;
  table-layout: fixed;
}

.mapping-coverage-content .activist-picker-table th,
.mapping-coverage-content .activist-picker-table td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.mapping-coverage-content .activist-picker-table th:nth-child(1),
.mapping-coverage-content .activist-picker-table td:nth-child(1) { width: 230px; }
.mapping-coverage-content .activist-picker-table th:nth-child(2),
.mapping-coverage-content .activist-picker-table td:nth-child(2) { width: 245px; }
.mapping-coverage-content .activist-picker-table th:nth-child(3),
.mapping-coverage-content .activist-picker-table td:nth-child(3) { width: 160px; }
.mapping-coverage-content .activist-picker-table th:nth-child(4),
.mapping-coverage-content .activist-picker-table td:nth-child(4) { width: 190px; }
.mapping-coverage-content .activist-picker-table th:nth-child(5),
.mapping-coverage-content .activist-picker-table td:nth-child(5) { width: 84px; text-align: center; }
.mapping-coverage-content .activist-picker-table th:nth-child(6),
.mapping-coverage-content .activist-picker-table td:nth-child(6) { width: 88px; text-align: center; }

.mapping-coverage-content .activist-picker-table .btn {
  min-width: 58px;
  height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}

.score-pill.score-5,
.score-pill.score-99 {
  min-width: 26px;
  width: 26px;
  color: #6c757d;
  font-size: .78rem;
}

@media(max-width:640px) {
  .activist-map-header {
    gap: 12px;
  }

  .activist-map-summary {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .activist-map-summary button {
    min-width: 0;
    justify-content: center;
    gap: 4px;
    padding: 8px 7px;
    font-size: .58rem;
    letter-spacing: .04em;
  }

  .activist-map-summary strong {
    font-size: 1rem;
  }

  .activist-picker-wrap {
    max-height: 58vh;
  }

  .activist-picker-table {
    min-width: 860px;
  }

  .mapping-coverage-content .activist-picker-table {
    min-width: 980px;
  }

  .activist-map-canvas {
    min-width: 760px;
  }

  .activist-tree-grid {
    gap: 46px;
  }

  .person-column {
    min-width: 342px;
  }

  .map-person-card,
  .map-colleague-card {
    width: 332px;
    padding: 11px;
  }

  .map-person-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .map-person-head h3 {
    font-size: 1.12rem;
    line-height: 1.04;
  }

  .map-person-head p {
    font-size: .66rem;
    line-height: 1.18;
  }

  .map-person-card .schedule-assess-box {
    min-width: 78px;
    padding: 6px 7px;
    text-align: center;
  }

  .map-person-card .schedule-assess-box span {
    font-size: .5rem;
    line-height: .95;
  }

  .map-person-card .schedule-assess-box strong {
    font-size: 1.25rem;
  }

  .map-person-card .schedule-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .map-person-card .schedule-mini-grid div {
    min-height: 42px;
    padding: 6px;
  }

  .map-person-card .schedule-mini-grid div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .map-person-card .schedule-mini-grid span {
    font-size: .5rem;
  }

  .map-person-card .schedule-mini-grid strong {
    font-size: .7rem;
    line-height: 1.08;
  }

  .map-schedule-alert {
    width: 100%;
    margin-top: 8px;
    padding: 8px 9px;
  }

  .map-schedule-alert .schedule-alert-text,
  .map-schedule-alert .schedule-alert-link {
    font-size: .67rem;
  }

  .map-person-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "record primary"
      "secondary resource";
    gap: 6px;
    margin-top: 8px;
  }

  .map-person-actions.colleague-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "record secondary";
  }

  .map-person-actions .btn {
    height: 30px;
    min-height: 30px;
    padding: 5px 7px;
    font-size: .62rem;
  }

  .map-primary-action {
    height: 30px !important;
    min-height: 30px !important;
    align-self: end;
  }

  .map-resource-action {
    justify-self: stretch;
    height: 30px !important;
    min-height: 30px !important;
    padding: 5px 7px !important;
    text-align: center;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING MICRO REFINEMENTS
   ========================================================================== */
.map-person-actions {
  grid-template-columns: minmax(122px, 1fr) auto auto auto;
  grid-template-areas: "record resource secondary primary";
  align-items: end;
}

.map-primary-action {
  align-self: end !important;
}

.map-person-actions .map-primary-action,
.map-person-actions .map-secondary-action,
.map-person-actions .map-record-action {
  height: 34px !important;
  min-height: 34px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

@media(max-width:640px) {
  .activist-map-frame {
    height: min(78vh, 620px);
    min-height: 500px;
  }

  .activist-map-summary {
    gap: 6px;
  }

  .activist-map-summary button {
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 7px 4px;
    font-size: .5rem;
    line-height: 1;
    letter-spacing: .035em;
  }

  .activist-map-summary strong {
    font-size: .98rem;
    line-height: 1;
  }

  .person-column {
    min-width: 318px;
  }

  .map-person-card,
  .map-colleague-card {
    width: 310px;
    padding: 9px;
  }

  .map-person-head {
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 8px;
  }

  .map-person-head h3 {
    font-size: 1rem;
  }

  .map-person-head p {
    font-size: .58rem;
  }

  .map-person-card .schedule-assess-box {
    min-width: 68px;
    padding: 5px 6px;
  }

  .map-person-card .schedule-assess-box span {
    font-size: .45rem;
  }

  .map-person-card .schedule-assess-box strong {
    font-size: 1.08rem;
  }

  .map-person-card .schedule-mini-grid div {
    min-height: 36px;
    padding: 5px;
  }

  .map-person-card .schedule-mini-grid span {
    font-size: .46rem;
  }

  .map-person-card .schedule-mini-grid strong {
    font-size: .64rem;
  }

  .map-schedule-alert {
    padding: 7px 8px;
  }

  .map-schedule-alert .schedule-alert-text,
  .map-schedule-alert .schedule-alert-link {
    font-size: .62rem;
  }

  .map-person-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "record primary"
      "secondary resource";
  }

  .map-person-actions .btn,
  .map-person-actions .map-primary-action,
  .map-person-actions .map-secondary-action,
  .map-person-actions .map-record-action,
  .map-person-actions .map-resource-action {
    height: 28px !important;
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: .58rem;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING FINAL OVERRIDES - MUST STAY LAST
   ========================================================================== */
.map-person-card {
  width: 600px;
}

.map-colleague-card {
  width: 540px;
}

.map-person-actions .map-primary-action,
.map-person-actions .map-secondary-action,
.map-person-actions .map-record-action,
.map-person-actions .map-resource-action {
  height: 42px !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
}

.map-person-actions .map-resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d0db !important;
  border-radius: 6px;
  background: #fff !important;
  color: #5f6874 !important;
  text-decoration: none;
}

.activist-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media(max-width:640px) {
  .activist-map-canvas {
    transform: scale(.95);
    transform-origin: top left;
    width: 105.263%;
  }

  .person-column {
    min-width: 348px;
  }

  .map-person-card,
  .map-colleague-card {
    width: 340px;
  }

  .map-person-head {
    grid-template-columns: minmax(0, 1fr) 82px !important;
  }

  .map-person-card .schedule-assess-box {
    justify-self: start;
    min-width: 82px !important;
    max-width: 82px;
    transform: translateX(-12px);
  }

  .map-person-card .schedule-assess-box span {
    white-space: normal;
    overflow-wrap: normal;
    line-height: .9;
  }

  .map-person-actions .map-primary-action,
  .map-person-actions .map-secondary-action,
  .map-person-actions .map-record-action,
  .map-person-actions .map-resource-action {
    height: 34px !important;
    min-height: 34px !important;
    padding: 6px 7px !important;
  }

  .activist-map-actions {
    justify-content: stretch;
  }

  .activist-map-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING MOBILE HEADER HARD OVERRIDE - ABSOLUTE LAST
   ========================================================================== */
@media(max-width:640px) {
  .map-person-head {
    position: relative !important;
    display: block !important;
    min-height: 104px;
    padding-right: 112px !important;
  }

  .map-person-meta {
    display: grid !important;
    gap: 1px;
  }

  .map-person-meta span {
    display: block !important;
  }

  .map-person-card .schedule-assess-box {
    position: absolute !important;
    top: 0;
    right: 26px;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    transform: none !important;
    text-align: center;
  }

  .map-person-card .schedule-assess-box span {
    display: block;
    white-space: normal !important;
    overflow-wrap: normal !important;
    line-height: .92;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING MOBILE SQUARE BADGE + PINCH ZOOM - TRUE EOF
   ========================================================================== */
@media(max-width:640px) {
  .activist-map-frame {
    touch-action: pan-x pan-y;
  }

  .map-person-head {
    min-height: 104px !important;
    padding-right: 106px !important;
  }

  .map-person-card .schedule-assess-box {
    right: 14px !important;
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    height: 84px !important;
    min-height: 84px !important;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px !important;
  }

  .map-person-card .schedule-assess-box span {
    font-size: .49rem !important;
    letter-spacing: .015em;
    line-height: .92 !important;
    text-align: center;
  }

  .map-person-card .schedule-assess-box strong {
    font-size: 1.42rem !important;
    line-height: .92 !important;
    text-align: center;
  }
}

/* ==========================================================================
   ACTIVIST MAPPING SECTION HEADER LAYOUT - TRUE EOF
   ========================================================================== */
.activist-map-header {
  display: block !important;
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #e7ebf1 !important;
}

.activist-map-header .card-header {
  margin: 0 !important;
}

.activist-map-summary {
  margin: 0 0 14px !important;
  justify-content: flex-end;
}

@media(max-width:640px) {
  .activist-map-header {
    margin-bottom: 12px !important;
  }

  .activist-map-summary {
    margin-bottom: 14px !important;
  }
}

/* ==========================================================================
   OUTREACH EMAIL BUILDER - PHONE ONLY COMPACT PASS
   ========================================================================== */
@media(max-width:767px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal * {
    max-width: 100%;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal {
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .dialog.full {
    overflow: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-body {
    height: calc(100dvh - 118px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    padding: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-builder,
  body:has(.outreach-page):not(.public-outreach-page) #email-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #email-step-finalize {
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tabs {
    padding: 0 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tabs button {
    font-size: .83rem !important;
    min-height: 40px !important;
    padding: 7px 5px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-builder {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-work {
    padding: 10px 10px 106px !important;
    overflow: visible !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-accordion {
    border-radius: 6px !important;
    margin-bottom: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-accordion-toggle {
    min-height: 42px !important;
    padding: 8px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-accordion-toggle small {
    display: block;
    font-size: .66rem !important;
    margin-top: 1px;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-header-card > :not(.mobile-builder-accordion-toggle) {
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-header-card .wizard-grid {
    gap: 9px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .field-label,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .section-label,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .target-title {
    letter-spacing: .035em !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .input,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .select,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal textarea {
    font-size: .95rem !important;
    min-height: 42px !important;
    padding: 9px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .muted[id$="-count"] {
    font-size: .74rem !important;
    margin-top: 3px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-head {
    align-items: stretch !important;
    display: grid !important;
    gap: 8px !important;
    padding: 10px !important;
    position: static !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-head .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-head .actions .btn,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-body-head .actions select {
    font-size: .78rem !important;
    min-height: 38px !important;
    padding: 7px 8px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #saved-layout-select {
    grid-column: 1 / -1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .rich-toolbar {
    gap: 5px !important;
    padding: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-group {
    gap: 3px !important;
    padding: 2px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .toolbar-select {
    font-size: .78rem !important;
    min-height: 32px !important;
    padding: 4px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-toolbar-wrap .rich-toolbar button {
    font-size: .82rem !important;
    min-height: 32px !important;
    min-width: 32px !important;
    padding: 4px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-canvas {
    min-height: 236px !important;
    overflow-x: hidden !important;
    padding: 10px 8px 90px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-empty-state {
    border-radius: 6px !important;
    min-height: 198px !important;
    padding: 22px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .empty-state-icon-large {
    font-size: 1.35rem !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block {
    border-radius: 6px !important;
    padding: 26px 8px 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block .drag-handle {
    font-size: .66rem !important;
    left: 8px !important;
    top: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .block-controls {
    right: 6px !important;
    top: 5px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .block-controls .control-btn {
    height: 28px !important;
    width: 28px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-email-insert-controls {
    gap: 6px !important;
    margin-top: 8px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-email-insert-controls button {
    font-size: .72rem !important;
    min-height: 36px !important;
    padding: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-side {
    max-height: min(58dvh, 520px) !important;
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal.mobile-sheet-mode-settings .email-side {
    max-height: min(52dvh, 480px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-sheet-bar {
    min-height: 42px !important;
    padding: 8px 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tool-tabs {
    gap: 4px !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    padding: 7px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-builder-tool-tabs button {
    font-size: .68rem !important;
    min-height: 34px !important;
    padding: 5px 3px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .side-section h4 {
    font-size: .82rem !important;
    min-height: 38px !important;
    padding: 9px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .side-accordion summary {
    font-size: .82rem !important;
    min-height: 38px !important;
    padding: 9px 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .side-accordion-body {
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .module-grid {
    gap: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .module-card {
    min-height: 66px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .layout-stack {
    gap: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .layout-btn {
    min-height: 38px !important;
    padding: 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .prop-grid,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .wizard-grid,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .wizard-grid.three {
    grid-template-columns: 1fr !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .prop-grid {
    gap: 7px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #email-step-target,
  body:has(.outreach-page):not(.public-outreach-page) #email-step-finalize {
    padding: 10px 10px 106px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .target-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    min-height: 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .target-card,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .active-target-list {
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    padding: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .filter-box {
    max-height: 168px !important;
    min-height: 118px !important;
    padding: 9px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .check-row {
    font-size: .86rem !important;
    line-height: 1.2 !important;
    margin: 7px 0 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .quick-actions {
    display: grid !important;
    gap: 8px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .quick-actions .btn,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .btn {
    min-height: 40px !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .custom-upload-card {
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody .preview-card {
    border-radius: 6px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview *,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody * {
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table {
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize aside h2 {
    font-size: 1.12rem !important;
    margin-bottom: 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-test-addresses {
    min-height: 96px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer {
    align-items: stretch !important;
    background: #fff !important;
    border-top: 1px solid #dee2e6 !important;
    bottom: 0;
    box-shadow: 0 -7px 18px rgba(0,0,0,.12);
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr !important;
    left: 0;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
    position: sticky !important;
    right: 0;
    z-index: 80;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-left,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-right {
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-right {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-right .btn:only-child,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal #emailNextBtn {
    grid-column: 1 / -1;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer .btn {
    font-size: 1rem !important;
    min-height: 42px !important;
    padding: 8px 9px !important;
    white-space: normal !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailScheduleModal .dialog,
  body:has(.outreach-page):not(.public-outreach-page) #emailSendConfirmModal .dialog,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal .dialog {
    border-radius: 8px !important;
    max-height: calc(100dvh - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    width: calc(100vw - 20px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailScheduleModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #emailSendConfirmModal .modal-body,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal .modal-body {
    max-height: calc(100dvh - 150px) !important;
    overflow: auto !important;
    padding: 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailScheduleModal footer,
  body:has(.outreach-page):not(.public-outreach-page) #emailSendConfirmModal footer,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal footer {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: 1fr 1fr !important;
    padding: 10px 14px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailScheduleModal footer .btn,
  body:has(.outreach-page):not(.public-outreach-page) #emailSendConfirmModal footer .btn,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal footer .btn {
    font-size: 1rem !important;
    min-height: 42px !important;
    width: 100% !important;
  }

}

/* Final phone-only Email Builder overrides. Kept at EOF so interaction re-renders do not
   fall back to broader Outreach mobile styles. */
.email-finalize-tabs {
  display: none;
}

@media(max-width:767px) {
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .builder-block,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .row-content,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .column-cell,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-module-placeholder {
    overflow: visible !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-module-placeholder {
    min-height: 176px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button {
    height: 66px !important;
    width: 66px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="text"] {
    transform: translate(-76px, 28px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="image"] {
    transform: translate(-42px, -40px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="button"] {
    transform: translate(42px, -40px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="divider"] {
    transform: translate(76px, 28px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker button[data-inline-module="row"] {
    transform: translate(0, 42px) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph {
    color: transparent !important;
    font-size: 0 !important;
    height: 16px !important;
    margin-bottom: 2px !important;
    position: relative !important;
    width: 27px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .mobile-inline-module-picker .mobile-button-glyph::before {
    border: 2px solid #212529 !important;
    border-radius: 5px !important;
    content: "" !important;
    display: block !important;
    height: 12px !important;
    width: 23px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr {
    max-width: none !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row {
    display: table !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody {
    display: table-row-group !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr {
    display: table-row !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal table.email-row.mobile-split-row > tbody > tr > td.column-cell {
    display: table-cell !important;
    max-width: none !important;
    vertical-align: top !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-target .target-layout {
    display: flex !important;
    flex-direction: column !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-target .active-target-list {
    order: -1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal footer {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-left,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal .modal-footer-right {
    display: contents !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="1"] #emailBackBtn {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="1"] #emailSaveDraftBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="1"] #emailNextBtn {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailSaveDraftBtn {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailScheduleBtn {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailBackBtn {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal[data-email-step="2"] #emailSendBtn {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs {
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 0 10px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs button {
    background: #fff !important;
    border: 2px solid #d7daf9 !important;
    border-radius: 7px !important;
    color: var(--rise-blue) !important;
    font-size: .82rem !important;
    font-weight: 900 !important;
    min-height: 40px !important;
    padding: 7px 6px !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal .email-finalize-tabs button.active {
    background: var(--rise-blue) !important;
    border-color: var(--rise-blue) !important;
    color: #fff !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .target-layout {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .email-finalize-panel {
    display: none !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #email-step-finalize .email-finalize-panel.active {
    display: block !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview .mobile-split-control {
    display: none !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table {
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table.mobile-split-row > tbody > tr > td,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table.mobile-split-row > tbody > tr > td,
  body:has(.outreach-page):not(.public-outreach-page) #emailModal #finalEmailPreview table.email-row.mobile-split-row > tbody > tr > td,
  body:has(.outreach-page):not(.public-outreach-page) #emailPreviewModal #emailPreviewBody table.email-row.mobile-split-row > tbody > tr > td {
    display: table-cell !important;
    max-width: none !important;
    vertical-align: top !important;
  }
}

input[type="date"] {
  min-width: 0;
  max-width: 100%;
}

/* D8 Targeted Overrides */
/* 1. Home hero / brand date block */
:root[data-theme="dark"] body.home-page .pulse-header { background: #0c1a3b !important; border-bottom: 1px solid var(--line) !important; }
:root[data-theme="dark"] body.home-page .pulse-header h2 { color: var(--rise-text) !important; }

/* 2. Department Coverage / Map Nodes */
:root[data-theme="dark"] .map-node-card,
:root[data-theme="dark"] .map-node-large { background: var(--surface-1) !important; color: var(--rise-text) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] .map-node-stats div { border-color: var(--line) !important; }
:root[data-theme="dark"] .map-node-stats span { color: var(--muted) !important; }
:root[data-theme="dark"] .map-node-stats strong { color: var(--rise-text) !important; }
:root[data-theme="dark"] .activist-map-summary span,
:root[data-theme="dark"] .activist-map-summary button { background: var(--card-bg) !important; color: var(--rise-text) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] .activist-map-summary button:hover { background: var(--surface-1) !important; }
:root[data-theme="dark"] .activist-map-summary strong { color: #f2f5ff !important; }
:root[data-theme="dark"] .callout-box,
:root[data-theme="dark"] .metric { background: var(--surface-1) !important; color: var(--rise-text) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] .metric strong { color: var(--rise-text) !important; }
:root[data-theme="dark"] .metric span { color: var(--muted) !important; }

/* 5. Dropdowns global search */
:root[data-theme="dark"] .search-dropdown small { color: var(--muted) !important; }

/* 7. Empty placeholders */
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .placeholder,
:root[data-theme="dark"] .no-data,
:root[data-theme="dark"] .results-empty,
:root[data-theme="dark"] .preview-empty,
:root[data-theme="dark"] .correction-empty { background: var(--surface-1) !important; color: var(--rise-text) !important; border-color: var(--line) !important; }

/* 8. Notification bell */
:root[data-theme="dark"] .bell { color: #ff5f7a !important; }

/* D9 Targeted Overrides */
/* Dark-mode text refinements */
:root[data-theme="dark"] .rise-blue,
:root[data-theme="dark"] a.rise-link,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] .quick-search-trigger strong,
:root[data-theme="dark"] .glance-summary-bu .glance-summary-value { color: var(--rise-blue-dark) !important; }

/* FAB Panel */
:root[data-theme="dark"] .fab-panel { background: var(--surface-1) !important; border-color: var(--line) !important; }

/* Department Coverage deep layers */
:root[data-theme="dark"] .member-card { background: var(--surface-1) !important; color: var(--rise-text) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] .member-card h3 { color: var(--rise-blue-dark) !important; }

/* Campaign at a Glance data cards */
:root[data-theme="dark"] .issue-row { border-bottom-color: var(--line) !important; }
:root[data-theme="dark"] .issue-row strong { color: var(--rise-text) !important; }
:root[data-theme="dark"] .issue-row span,
:root[data-theme="dark"] .issue-row .issue-count { color: var(--rise-blue-dark) !important; }
:root[data-theme="dark"] .issue-row .issue-context { color: var(--muted) !important; }

/* Modals */
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .modal-body,
:root[data-theme="dark"] .modal-section,
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .admin-modal-content,
:root[data-theme="dark"] .summary-dialog,
:root[data-theme="dark"] .quick-log-dialog,
:root[data-theme="dark"] .rise-quick-log-dialog,
:root[data-theme="dark"] .function-modal { background: var(--card-bg) !important; border-color: var(--line) !important; color: var(--rise-text) !important; }
:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .modal-tabs,
:root[data-theme="dark"] .admin-modal-header { background: var(--surface-1) !important; border-color: var(--line) !important; color: var(--rise-text) !important; }

/* Dropdowns */
:root[data-theme="dark"] .member-dropdown { background: var(--card-bg) !important; border-color: var(--line) !important; color: var(--rise-text) !important; }
:root[data-theme="dark"] .member-dropdown li { border-bottom-color: var(--line) !important; color: var(--rise-text) !important; }
:root[data-theme="dark"] .member-dropdown li:hover,
:root[data-theme="dark"] .member-dropdown li.active { background: var(--surface-1) !important; color: var(--rise-blue-dark) !important; }
:root[data-theme="dark"] .member-dropdown small { color: var(--muted) !important; }

/* Placeholders Correction Portal / Reports */
:root[data-theme="dark"] #emptyState,
:root[data-theme="dark"] .correction-empty,
:root[data-theme="dark"] .preview-empty,
:root[data-theme="dark"] .no-data { background: var(--surface-1) !important; border-color: var(--line) !important; color: var(--muted) !important; }

/* D11 Map and Dashboard Modal Framing */
:root[data-theme="dark"] .activist-map-layout .map-container { border-color: var(--line) !important; }

/* D11 Sitewide Muted Text & Text Contrast */
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .text-muted,
:root[data-theme="dark"] .meta,
:root[data-theme="dark"] .metadata,
:root[data-theme="dark"] .helper-text,
:root[data-theme="dark"] .subtext,
:root[data-theme="dark"] .small,
:root[data-theme="dark"] small,
:root[data-theme="dark"] .section-subtitle,
:root[data-theme="dark"] .card-subtitle,
:root[data-theme="dark"] .field-label,
:root[data-theme="dark"] .record-label,
:root[data-theme="dark"] .detail-label { color: var(--muted) !important; }

/* D11 Dark Mode Blue Variants */
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] .rise-blue,
:root[data-theme="dark"] .rise-link,
:root[data-theme="dark"] a:not(.btn):not(.danger),
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .card-title,
:root[data-theme="dark"] .metric strong,
:root[data-theme="dark"] .issue-row strong { color: var(--rise-blue-dark) !important; }

/* D11 Assessment Score Variants */
:root[data-theme="dark"] .score-1 { background: #1e3a5f !important; color: #a3c2f0 !important; border-color: #3b5a82 !important; }
:root[data-theme="dark"] .score-2 { background: #1b452f !important; color: #9fd3b4 !important; border-color: #2d6347 !important; }
:root[data-theme="dark"] .score-3 { background: #5a4b1d !important; color: #e8cd7b !important; border-color: #7d6b2c !important; }
:root[data-theme="dark"] .score-4 { background: #5f2424 !important; color: #f29a9a !important; border-color: #823838 !important; }
:root[data-theme="dark"] .score-5,
:root[data-theme="dark"] .score-99,
:root[data-theme="dark"] .score-u,
:root[data-theme="dark"] .assess-pill { background: var(--surface-1) !important; color: var(--muted) !important; border-color: var(--line) !important; }

/* Score row left borders */
:root[data-theme="dark"] .score-row.score-1 td:first-child { border-left-color: #3b5a82 !important; }
:root[data-theme="dark"] .score-row.score-2 td:first-child { border-left-color: #2d6347 !important; }
:root[data-theme="dark"] .score-row.score-3 td:first-child { border-left-color: #7d6b2c !important; }
:root[data-theme="dark"] .score-row.score-4 td:first-child { border-left-color: #823838 !important; }
:root[data-theme="dark"] .score-row td:first-child { border-left-color: var(--surface-1) !important; }

/* D11 Destructive Buttons */
:root[data-theme="dark"] .danger-btn,
:root[data-theme="dark"] .btn-danger,
:root[data-theme="dark"] button.danger,
:root[data-theme="dark"] .btn.delete,
:root[data-theme="dark"] .btn.purge,
:root[data-theme="dark"] .btn.reset,
:root[data-theme="dark"] .btn.clear { background: rgba(255, 95, 122, .12) !important; border-color: #ff5f7a !important; color: #ff9aac !important; }
:root[data-theme="dark"] .danger-btn:hover,
:root[data-theme="dark"] .btn-danger:hover,
:root[data-theme="dark"] button.danger:hover,
:root[data-theme="dark"] .btn.delete:hover,
:root[data-theme="dark"] .btn.purge:hover,
:root[data-theme="dark"] .btn.reset:hover,
:root[data-theme="dark"] .btn.clear:hover { background: rgba(255, 95, 122, .22) !important; }

/* D11 Quick Search */
:root[data-theme="dark"] .quick-search-box .search-box { background: var(--surface-1) !important; color: var(--rise-text) !important; border: 1px solid var(--line) !important; }
:root[data-theme="dark"] .qs-results-dropdown { background: var(--surface-1) !important; border-color: var(--line) !important; color: var(--rise-text) !important; }
:root[data-theme="dark"] .qs-results-dropdown li { border-bottom-color: var(--line) !important; }
:root[data-theme="dark"] .qs-results-dropdown li:hover { background: var(--surface-2) !important; color: var(--rise-blue-dark) !important; }
:root[data-theme="dark"] .qs-details,
:root[data-theme="dark"] .qs-details-card { background: transparent !important; }

/* D11 Micro generated cards & Member Cards */
:root[data-theme="dark"] .member-card,
:root[data-theme="dark"] .info-box,
:root[data-theme="dark"] .glance-summary,
:root[data-theme="dark"] .callout-box { background: var(--surface-1) !important; border-color: var(--line) !important; color: var(--rise-text) !important; }
:root[data-theme="dark"] .target-box { background: var(--surface-1) !important; border-color: var(--line) !important; color: var(--rise-text) !important; }
:root[data-theme="dark"] .target-box strong { color: var(--rise-blue-dark) !important; }
:root[data-theme="dark"] .map-container,
:root[data-theme="dark"] #heatmap { background: var(--page) !important; border: 2px solid var(--line) !important; border-radius: 8px; }

/* D12 Direct Regression Fixes */
:root[data-theme="dark"] .qs-assessment-card,
:root[data-theme="dark"] .schedule-alert-box,
:root[data-theme="dark"] .schedule-card,
:root[data-theme="dark"] .schedule-course-card,
:root[data-theme="dark"] .map-person-card,
:root[data-theme="dark"] .person-card,
:root[data-theme="dark"] .email-header-card,
:root[data-theme="dark"] .modal-header-card { background: var(--surface-1) !important; color: var(--rise-text) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] .qs-assessment-card span,
:root[data-theme="dark"] .qs-assessment-card small,
:root[data-theme="dark"] .schedule-course-time span,
:root[data-theme="dark"] .schedule-course-main span,
:root[data-theme="dark"] .email-header-card .muted,
:root[data-theme="dark"] .modal-header-card .muted { color: var(--muted) !important; }
:root[data-theme="dark"] .qs-assessment-card b,
:root[data-theme="dark"] .schedule-course-time strong,
:root[data-theme="dark"] .schedule-course-main strong { color: var(--rise-blue-dark) !important; }
:root[data-theme="dark"] .btn-outline-danger { background: rgba(255, 95, 122, .12) !important; border-color: #ff5f7a !important; color: #ff9aac !important; }

/* D13 Surface Safety Net */
:root[data-theme="dark"] :is(
  .card, .panel, .dialog, .drawer, .menu, .dropdown, .dropdown-menu,
  .table-wrap, .table-responsive, .tab-strip, .tab-content, .modal-header,
  .empty-state, .placeholder, .stat-card, .metric-card, .info-card,
  .person-card, .member-card, .route-card, .action-card, .box, .container-box,
  .email-header-card, .modal-header-card, .modal-content, .modal-body
):not(
  .map-container, #heatmap, #adminMap, #fieldMap, #map,
  #emailPreviewBody, #finalEmailPreview, .email-preview, .doc-preview,
  .scale-editor, .scale-row, .assess-pill, [class*="score-"],
  .status-badge, .badge, .status-pill, .mode-chip, .btn
) {
  background: var(--surface-1) !important;
  border-color: var(--line) !important;
  color: var(--rise-text) !important;
}

/* D13 Inline Style Safety Net */
:root[data-theme="dark"] :is(
  [style*="background: #fff"], [style*="background:#fff"],
  [style*="background: white"], [style*="background:white"],
  [style*="background-color: #fff"], [style*="background-color:#fff"],
  [style*="background-color: white"], [style*="background-color:white"],
  [style*="background: #f8f9fa"], [style*="background-color: #f8f9fa"]
):not(
  .map-container, #heatmap, #adminMap, #fieldMap, #map,
  #emailPreviewBody, #finalEmailPreview, .email-preview, .doc-preview,
  .scale-editor, .scale-row, .assess-pill, [class*="score-"],
  .status-badge, .badge, .status-pill, .mode-chip, .btn
) {
  background: var(--surface-1) !important;
  border-color: var(--line) !important;
  color: var(--rise-text) !important;
}

/* D13 Text Contrast Safety Net */
:root[data-theme="dark"] :is(
  .card, .panel, .dialog, .drawer, .menu, .dropdown, .dropdown-menu,
  .table-wrap, .table-responsive, .tab-strip, .tab-content, .modal-header,
  .empty-state, .placeholder, .stat-card, .metric-card, .info-card,
  .person-card, .member-card, .route-card, .action-card, .box, .container-box,
  [style*="background: #fff"], [style*="background: white"], [style*="background-color: #fff"]
) :is(.muted, .text-muted, .subtext, small, .meta, .helper-text) {
  color: var(--muted) !important;
}

:root[data-theme="dark"] :is(
  .card, .panel, .dialog, .drawer, .menu, .dropdown, .dropdown-menu,
  .table-wrap, .table-responsive, .tab-strip, .tab-content, .modal-header,
  .empty-state, .placeholder, .stat-card, .metric-card, .info-card,
  .person-card, .member-card, .route-card, .action-card, .box, .container-box,
  [style*="background: #fff"], [style*="background: white"], [style*="background-color: #fff"]
) :is(a, h1, h2, h3, h4, strong, b):not(.btn, .danger, [class*="score-"]) {
  color: var(--rise-blue-dark) !important;
}

/* D13 Destructive Button Safety Net Ext */
:root[data-theme="dark"] :is(.btn-outline-danger, .btn-light.danger, .text-danger) {
  background: rgba(255, 95, 122, .12) !important;
  border-color: #ff5f7a !important;
  color: #ff9aac !important;
}
