/* Marketing screens (public/marketing.js). Loaded after the shared sheets. */
.mk-back { margin-bottom: 18px; }
.mk-stale { color: var(--ink-faint); }
.mk-cancel { justify-content: flex-end; }
/* Dashboard: one date control, the two dates only for a custom range. */
.mk-period { margin-bottom: var(--space-4); }
.mk-period .seg { flex-wrap: wrap; max-width: 100%; margin-bottom: 0; }
.mk-period .panel.filters { margin: var(--space-3) 0 0; }
.mk-period .panel[hidden] { display: none; }
/* New segment: the count and Save stay together at the foot of the window. */
#ov_segments .mk-savebar { position: sticky; top: auto; bottom: 12px; z-index: 5; margin-bottom: 0; }
.mk-savebar .mk-audience-count { margin: 0; }
/* Campaign report: five figures in one row on a wide screen, in pairs on a phone. */
@media (min-width: 1024px) { body #ov_marketing-reports .kpi-grid.mk-five { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 639.98px) {
  body #ov_marketing-reports .kpi-grid.mk-five { flex-wrap: wrap; overflow: visible; }
  body #ov_marketing-reports .kpi-grid.mk-five > * { flex: 1 1 calc(50% - var(--space-3)); }
  #ov_segments .mk-savebar { gap: 4px 12px; padding: 12px 16px; bottom: 8px; }
  .mk-savebar .mk-audience-count { font-size: 24px; line-height: 30px; }
  .mk-savebar .mk-audience-note { min-width: 0; }
  #ov_segments .mk-savebar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .mk-savebar .mk-audience-note { display: none; }
  .mk-savebar .btn { margin-left: auto; min-height: 44px; }
}
#ov_segments .mk-checks { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.mk-delivery { display: block; min-width: 180px; }
.ov-bar.mk-stack { display: flex; width: 100%; max-width: 260px; height: 8px; margin-bottom: 4px; }
.mk-stack .ov-bar-fill { border-radius: 0; }
.panel > .mk-delivery .mk-stack { max-width: none; }
.mk-line summary { cursor: pointer; color: var(--ink-muted); }
.mk-line > span { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.mk-funnel { list-style: none; margin: 0; padding: 0; }
.mk-funnel li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 5em 3em; align-items: center; gap: var(--space-3, 12px); padding: 8px 0; font-size: 14px; }
.mk-funnel li > strong, .mk-funnel li > .ov-sub { text-align: right; }
.mk-partial { opacity: .35; }
.mk-key { margin: 8px 0 0; }
.mk-gauge { display: grid; gap: 4px; padding: 8px 0; font-size: 14px; }
.mk-gauge .ov-bar { width: 100%; height: 8px; }
/* Bonus campaign: what needs a person, in one block with its action. */
.mk-needs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.mk-needs > div { flex: 1 1 280px; min-width: 0; }
.mk-needs h2 { margin: 0 0 4px; font-size: 15px; line-height: 20px; font-weight: 500; }
.mk-needs .mk-notes { color: inherit; gap: 2px; }
/* An amount stays on one line; a long one is set a little smaller on a phone. */
#ov_bonus-campaign :is(.mono, .kpi-value) { white-space: nowrap; }
.mk-days { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--line); }
.mk-day { display: flex; flex: 1 1 0; min-width: 0; max-width: 28px; height: 100%; flex-direction: column; justify-content: flex-end; }
.mk-day > span { display: block; }
.mk-day-sent { background: var(--good); }
.mk-day-failed { background: var(--critical); }
.mk-days-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-faint); }
.mk-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 8px; }
.mk-swatch:first-child { margin-left: 0; }
@media (max-width: 640px) {
  /* Segments on a phone: name, audience and when it was counted, read from the left. */
  #ov_segments .mk-segments table.stack td { display: block; text-align: left; }
  #ov_segments .mk-segments table.stack td::before { content: none; }
  #ov_segments .mk-segments table.stack td > div { text-align: left; }
  #ov_segments .mk-segments table.stack td:nth-child(2), #ov_segments .mk-segments table.stack td:nth-child(4), #ov_segments .mk-segments td:first-child .sub-line { display: none; }
  #ov_segments .mk-segments .mk-actions { justify-content: flex-start; }
  .mk-rows table.stack td:first-child { display: block; text-align: left; }
  .mk-rows table.stack td:first-child::before { content: none; }
  :is(#ov_analytics, #ov_campaigns, #ov_marketing-reports) .mk-rows table.stack td:first-child > div { text-align: left; }
  .mk-line summary { min-height: 44px; }
  #ov_bonus-campaign .kpi-value { font-size: 1.25rem; }
  .mk-needs .btn { width: 100%; min-height: 44px; }
  .mk-delivery { min-width: 0; flex: 1; }
  .ov-bar.mk-stack { margin-left: auto; }
  .mk-funnel li { grid-template-columns: minmax(0, 1fr) 4em 3em; }
  .mk-funnel li .ov-bar { display: none; }
}
