/* Reach: shared quiet workspace style and native disclosure arrows. */
html body.app-mode #reach-module-panel {
  --rf-paper:#faf6ee; --rf-surface:#fffdf8; --rf-ink:#292632; --rf-muted:#57515f;
  --rf-cyan:#d7ecef; --rf-violet:#e4dff0; --rf-line:#aaa4ad;
}
html[data-polxy-theme="calm-monochrome"] body.app-mode #reach-module-panel { --rf-cyan:#ecebea; --rf-violet:#e8e6e3; }
html body.app-mode #reach-module-panel#reach-module-panel#reach-module-panel {
  display:flex !important; flex-direction:column !important; gap:16px !important;
  padding:20px 20px 140px !important; background:var(--rf-paper) !important;
  border:1px solid var(--rf-line) !important; border-radius:14px !important; box-shadow:none !important;
}
#reach-module-panel#reach-module-panel#reach-module-panel > * { order:0 !important; margin:0 !important; min-width:0; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(div,section,aside,article,header,details,summary,form,button,input,select,textarea) {
  box-shadow:none !important; border-width:1px !important; min-width:0 !important;
  color:var(--rf-ink) !important; text-transform:none !important; letter-spacing:normal !important;
}
#reach-module-panel#reach-module-panel#reach-module-panel [hidden][hidden] { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(h2,h3,h4,strong,span,small,p,label,b) { color:var(--rf-ink) !important; -webkit-text-fill-color:currentColor !important; text-transform:none !important; letter-spacing:normal !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(p,small) { color:var(--rf-muted) !important; font-size:13px !important; line-height:1.5 !important; font-weight:400 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel h2 { font-size:30px !important; line-height:1.2 !important; max-width:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel h3 { font-size:20px !important; line-height:1.35 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel > .panel-header { display:grid !important; grid-template-columns:minmax(0,1fr) 260px !important; background:var(--rf-cyan) !important; border:1px solid var(--rf-line) !important; border-radius:12px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .panel-header > :is(div,aside) { background:transparent !important; padding:24px !important; border:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .polxy-header-boundary { display:flex !important; flex-direction:column !important; justify-content:center !important; gap:12px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-project-picker { display:grid; gap:8px; margin-top:16px; width:min(100%,340px); font-size:13px; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(button,input,select,textarea) { border:1px solid var(--rf-line) !important; border-radius:8px !important; padding:10px 12px !important; min-height:44px !important; font-size:14px !important; line-height:1.4 !important; transform:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(input,select,textarea) { width:100% !important; background:var(--rf-surface) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel button { background:var(--rf-cyan) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel button.primary-action { background:var(--rf-violet) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(button,summary,input,select,textarea,a):focus-visible { outline:3px solid #62528b !important; outline-offset:3px; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(button,select):disabled { opacity:.6; cursor:not-allowed; }
#reach-module-panel#reach-module-panel#reach-module-panel details { border:1px solid var(--rf-line) !important; border-radius:12px !important; background:var(--rf-surface) !important; overflow:hidden !important; padding:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel summary { display:flex !important; align-items:center !important; gap:16px !important; min-height:64px !important; padding:18px 20px !important; background:var(--rf-surface) !important; border:0 !important; list-style:none !important; cursor:pointer; }
#reach-module-panel#reach-module-panel#reach-module-panel details[open] > summary { background:var(--rf-violet) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel summary strong { font-size:18px !important; line-height:1.4 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel summary small { margin-left:auto !important; background:transparent !important; border:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel summary::-webkit-details-marker { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel summary::before { content:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel summary::after {
  content:"" !important; display:block !important; position:static !important; width:7px !important; height:7px !important;
  min-width:0 !important; min-height:0 !important; flex:0 0 7px !important; margin-left:auto !important;
  border:0 !important; border-right:2px solid var(--rf-ink) !important; border-bottom:2px solid var(--rf-ink) !important;
  background:transparent !important; border-radius:0 !important; box-shadow:none !important; transform:rotate(45deg) !important;
}
#reach-module-panel#reach-module-panel#reach-module-panel details[open] > summary::after { transform:rotate(225deg) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel details > :is(article,.reach-phase-content) { padding:20px !important; border:0 !important; background:var(--rf-surface) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .section-title { display:block !important; padding:0 !important; margin:0 0 16px !important; border:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .section-title::after { content:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .section-title .eyebrow { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel form { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; padding:0 !important; border:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel form label { display:grid !important; gap:8px !important; padding:0 !important; border:0 !important; background:transparent !important; font-size:14px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel form .wide-field { grid-column:1/-1 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel form > button { align-self:end; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog {
  width:min(760px,calc(100vw - 32px)) !important; height:fit-content !important; min-height:0 !important; max-height:calc(100dvh - 32px) !important;
  position:fixed !important; inset:0 !important; margin:auto !important; padding:0 !important; overflow:auto !important;
  border:1px solid #aaa4ad !important; border-radius:14px !important; background:#fffdf8 !important; box-shadow:0 16px 48px #29263233 !important;
}
#reach-action-dialog#reach-action-dialog#reach-action-dialog :is(.outreach-action-dialog-header,.outreach-action-dialog-buttons) { padding:20px !important; background:var(--rf-violet) !important; border:0 !important; box-shadow:none !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-metrics { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:0 !important; margin:16px !important; width:auto !important; max-width:calc(100% - 32px) !important; background:var(--rf-paper) !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-metrics article { display:grid !important; grid-template-columns:1fr !important; gap:6px !important; min-height:0 !important; padding:12px !important; background:transparent !important; border:0 !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog :is(h3,strong) { font-size:20px !important; line-height:1.3 !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog :is(span,p,strong,h3,button) { color:var(--rf-ink) !important; -webkit-text-fill-color:currentColor !important; overflow-wrap:anywhere; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-results { margin:16px !important; padding:0 !important; background:transparent !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-results article { padding:12px !important; background:var(--rf-paper) !important; border:0 !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-results strong { font-size:13px !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-boundary { margin:16px !important; padding:0 !important; background:transparent !important; border:0 !important; }
/* Keep the header action readable even beside a long title on phones. */
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-dialog-header {
  display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; align-items:start !important; gap:12px !important;
}
#reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-dialog-header > div { min-width:0 !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog [data-reach-action-cancel] {
  white-space:nowrap !important; word-break:normal !important; overflow-wrap:normal !important; flex-shrink:0 !important;
  width:auto !important; min-width:68px !important; min-height:44px !important;
}
#reach-action-dialog#reach-action-dialog#reach-action-dialog [data-reach-action-cancel]::after,
#reach-action-dialog#reach-action-dialog#reach-action-dialog [data-reach-action-cancel]::before { content:none !important; display:none !important; }
#reach-action-dialog#reach-action-dialog#reach-action-dialog :is(.outreach-action-results,.outreach-action-boundary) { width:auto !important; max-width:calc(100% - 32px) !important; }

#reach-module-panel#reach-module-panel#reach-module-panel .reach-send-contract { font-size:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-phase-content { padding:20px !important; background:var(--rf-surface) !important; border:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-console::before { content:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-work-grid { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:20px !important; background:transparent !important; border:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-work-grid > article,.reach-message-panel,.reach-stage-body) { padding:0 !important; border:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-stage-body { padding:20px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-source-card,.reach-review-card,.reach-reply-inbox,.reach-compliance-workflow,.reach-analytics-workflow) { background:var(--rf-paper) !important; padding:16px !important; border:1px solid var(--rf-line) !important; border-radius:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-stage { margin-top:12px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item { background:var(--rf-surface) !important; border:1px solid var(--rf-line) !important; border-radius:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item.selected { background:var(--rf-violet) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item > span,
#reach-module-panel#reach-module-panel#reach-module-panel .module-work-item.empty > :is(span,b) { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .module-work-item.empty { display:block !important; padding:12px !important; background:transparent !important; border:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-performance-funnel-section,.reach-performance-funnel-heading) { padding:0 !important; border:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-performance-unavailable { display:block !important; padding:16px !important; min-height:0 !important; background:var(--rf-paper) !important; border:1px solid var(--rf-line) !important; border-radius:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-performance-unavailable strong { font-size:18px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-performance-funnel-summary article,.reach-funnel-stage-grid article,.reach-funnel-evidence-list,.reach-score-grid article) { background:var(--rf-paper) !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(h2,h3) button { min-height:24px !important; height:24px !important; width:24px !important; padding:0 !important; border:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-header-copy { max-width:70ch; }
@media(max-width:760px) {
  html body.app-mode #reach-module-panel#reach-module-panel#reach-module-panel { padding:12px 12px 160px !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel > .panel-header,
  #reach-module-panel#reach-module-panel#reach-module-panel form { grid-template-columns:1fr !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel .reach-send-contract { padding-top:0 !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel summary small { display:none !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel .reach-phase-content { padding:16px !important; }
  #reach-action-dialog#reach-action-dialog#reach-action-dialog .outreach-action-metrics { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}

#reach-module-panel#reach-module-panel#reach-module-panel #reach-kpi-grid { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel #reach-kpi-grid::before { content:none !important; }

/* Saved messages and nested workflows share the same readable layout. */
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; align-items:center !important; gap:16px !important; padding:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item > div { grid-column:auto !important; width:auto !important; max-width:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item > b { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item strong { display:block; font-size:16px !important; line-height:1.4 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-message-actions { display:flex !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-stage-body { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-stage-body .eyebrow { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-adaptation-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-adaptation-grid article { padding:16px !important; background:var(--rf-paper) !important; border:1px solid var(--rf-line) !important; border-radius:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-adaptation-grid .eyebrow { display:block !important; font-size:13px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-adaptation-grid small { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-score-grid,.reach-compliance-kpis,.reach-analytics-kpis) { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; margin:16px 0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-score-grid,.reach-compliance-kpis,.reach-analytics-kpis) article { display:block !important; padding:12px !important; border:0 !important; background:transparent !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-score-grid,.reach-compliance-kpis,.reach-analytics-kpis) article :is(span,strong,small) { display:block !important; width:auto !important; max-width:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-form,.reach-compliance-fields,.reach-analytics-fields) { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-form,.reach-compliance-fields,.reach-analytics-fields) label { display:grid !important; gap:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .wide-field { grid-column:1/-1 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-source-actions,.reach-compliance-actions,.reach-analytics-actions,.reach-schedule-controls) { display:flex !important; flex-wrap:wrap !important; align-items:end !important; gap:12px !important; margin-top:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-schedule-controls label { flex:1 1 200px; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-head,.reach-reply-next,.reach-reply-history article,.reach-reply-sync,.reach-compliance-head,.reach-analytics-head,.reach-tracking-list article,.module-rule-item) { background:var(--rf-paper) !important; border-color:var(--rf-line) !important; border-radius:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-ops-card { display:none !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-provider-card,.reach-audience-card) .reach-score-grid { display:none !important; }
@media(max-width:760px) {
  #reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-adaptation-grid,.reach-reply-form,.reach-compliance-fields,.reach-analytics-fields) { grid-template-columns:1fr !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel .reach-message-item { grid-template-columns:minmax(0,1fr) !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel .reach-stage-body { padding:12px !important; }
}
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-form,.reach-compliance-fields,.reach-analytics-fields) > * { grid-column:auto !important; grid-row:auto !important; width:auto !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-form,.reach-compliance-fields,.reach-analytics-fields) > .wide-field { grid-column:1/-1 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-next,.reach-reply-sync) { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px !important; padding:12px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-next,.reach-reply-sync) > * { grid-column:1 !important; grid-row:auto !important; width:auto !important; max-width:100% !important; min-width:0 !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-head,.reach-compliance-head,.reach-analytics-head) b { background:var(--rf-violet) !important; border:0 !important; padding:6px 10px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-reply-next,.reach-reply-sync) :is(span,strong,small) { font-size:13px !important; line-height:1.5 !important; }

/* Saved packs remain easy to find as the library grows. */
#reach-module-panel#reach-module-panel#reach-module-panel .reach-library-controls { display:grid !important; grid-template-columns:minmax(0,1fr) 190px auto !important; gap:12px !important; margin-bottom:16px !important; align-items:end !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-library-controls label { display:grid !important; gap:8px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel .reach-library-pagination { display:flex !important; align-items:center !important; gap:12px !important; flex-wrap:wrap !important; margin-top:16px !important; }
#reach-module-panel#reach-module-panel#reach-module-panel #reach-library-count { margin-right:auto !important; }
#reach-module-panel#reach-module-panel#reach-module-panel #reach-action-feedback { padding:16px !important; background:var(--rf-cyan) !important; border:1px solid var(--rf-line) !important; border-radius:8px !important; overflow-wrap:anywhere; }
#reach-module-panel#reach-module-panel#reach-module-panel #reach-action-feedback[data-tone="error"] { background:#f4ded6 !important; }
@media(max-width:760px) {
  #reach-module-panel#reach-module-panel#reach-module-panel .reach-library-controls { grid-template-columns:minmax(0,1fr) !important; }
  #reach-module-panel#reach-module-panel#reach-module-panel :is(input,select,textarea) { font-size:16px !important; }
}

#reach-module-panel#reach-module-panel#reach-module-panel .reach-tracking-list > article:only-child { grid-column:1/-1 !important; }
@media(max-width:760px) {
  html body.app-mode #reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel :is(input,select,textarea) { font-size:16px !important; }
  html body.app-mode #reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel .reach-stage-body { padding:12px !important; }
  html body.app-mode #reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel :is(.reach-source-card,.reach-review-card,.reach-reply-inbox,.reach-compliance-workflow,.reach-analytics-workflow) { padding:12px !important; }
  html body.app-mode #reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel#reach-module-panel .reach-tracking-list { grid-template-columns:minmax(0,1fr) !important; }
}
