/* ============================================================
   META ADS COMPOSER — Apple-style premium redesign
   Airy whitespace, hero typography, color reserved for meaning,
   single primary action per surface.
   ============================================================ */

.ma-composer, .ma-tokens {
  /* ────────────────────────────────────────────────────────────
     Meta Ads now renders entirely on the shared V2 design tokens.
     The --ma-* names are kept only as thin local aliases that point
     at the canonical tokens in tokens.css / styles.css, so there is
     a single source of truth and the surface flips with light/dark
     automatically (no separate .dark override needed below).
     ──────────────────────────────────────────────────────────── */
  /* Type system */
  --ma-font:    var(--font-sans);
  --ma-mono:    var(--font-mono);

  /* Text ramp — shared 4-step ramp (fg-5 reuses the faintest step) */
  --ma-fg:        var(--text);
  --ma-fg-2:      var(--text-quiet);
  --ma-fg-3:      var(--text-muted);
  --ma-fg-4:      var(--text-faint);
  --ma-fg-5:      var(--text-faint);

  /* Surfaces */
  --ma-bg:        var(--bg);
  --ma-surface:   var(--surface);
  --ma-surface-2: var(--bg-sunken);
  --ma-line:      var(--hairline);
  --ma-line-2:    var(--hairline-strong);

  /* Tint hovers — derived from --text so they flip with the theme */
  --ma-tint-1:    color-mix(in oklch, var(--text) 4%, transparent);
  --ma-tint-2:    color-mix(in oklch, var(--text) 7%, transparent);
  --ma-tint-3:    color-mix(in oklch, var(--text) 11%, transparent);

  /* Semantic → shared health palette */
  --ma-positive:  var(--h-strong);
  --ma-warn:      var(--h-low);
  --ma-danger:    var(--h-critical);
  --ma-info:      var(--h-soldout);

  /* Soft tint backgrounds for status surfaces */
  --ma-positive-bg: var(--h-strong-bg);
  --ma-warn-bg:     var(--h-low-bg);
  --ma-danger-bg:   var(--h-critical-bg);
  --ma-info-bg:     var(--h-soldout-bg);

  /* Shadows → shared scale */
  --ma-shadow-sm: var(--shadow-sm);
  --ma-shadow-md: var(--shadow-md);
  --ma-shadow-lg: var(--shadow-lg);

  /* Radii → shared scale */
  --ma-r-sm: var(--r-sm);
  --ma-r-md: var(--r-md);
  --ma-r-lg: var(--r-lg);
  --ma-r-xl: var(--r-xl);

  /* Map onto the rcc-* tokens used in some places */
  --rcc-font-sans:       var(--ma-font);
  --rcc-font-numeric:    var(--ma-font);
  --rcc-text-primary:    var(--ma-fg);
  --rcc-text-secondary:  var(--ma-fg-2);
  --rcc-text-tertiary:   var(--ma-fg-3);
  --rcc-text-muted:      var(--ma-fg-4);
  --rcc-positive:        var(--ma-positive);
  --rcc-warn:            var(--ma-warn);
  --rcc-danger:          var(--ma-danger);
  --rcc-info:            var(--ma-info);
  --rcc-l1: var(--ma-tint-1);
  --rcc-l2: var(--ma-tint-2);
  --rcc-l3: var(--ma-tint-3);
}

/* Page canvas */
.ma-page-canvas {
  background: var(--ma-bg);
  min-height: 100%;
}

/* ── 3-COLUMN SHELL ─────────────────────────────────────── */
.ma-composer {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) 320px;
  column-gap: 28px;
  align-items: stretch;
  min-height: 100vh;
  max-width: 1560px;
  margin-inline: auto;
  padding: 24px 28px 64px;
  font-family: var(--ma-font);
  letter-spacing: -0.005em;
  color: var(--ma-fg);
}
@media (max-width: 1240px) {
  .ma-composer {
    grid-template-columns: 168px minmax(0, 1fr) 280px;
    column-gap: 20px;
    padding: 20px 20px 64px;
  }
}
@media (max-width: 1080px) {
  .ma-composer {
    grid-template-columns: 160px minmax(0, 1fr);
    column-gap: 20px;
  }
  .ma-composer-side[aria-label="Kontextpanel"] { display: none; }
}

.ma-composer-side {
  min-height: 0;
}
.ma-composer-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 0;
}
.ma-composer-main-scroll {
  flex: 1;
  min-height: 0;
}

/* Entrance — transform-only, opacity stays at 1 so static
   screenshots and SSR previews show content correctly */
.rcc-enter {
  animation: maEnterIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes maEnterIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger helper — apply with --i: 1, 2, 3 etc */
.rcc-stagger { animation: maEnterIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--i, 0) * 30ms); }

/* Generic card — used sparingly */
.rcc-card {
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
}

/* ── LEFT COLUMN — just nav, no metric cards ────────────── */
.ma-left {
  padding-block: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 28px;
}
.ma-left-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-mode-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ma-mode-btn {
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--ma-r-sm);
  border: 0;
  background: transparent;
  color: var(--ma-fg-2);
  font-size: 13.5px;
  font-weight: 450;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.22, 1, 0.36, 1), color 120ms ease;
  letter-spacing: -0.005em;
}
.ma-mode-btn:hover { background: var(--ma-tint-1); color: var(--ma-fg); }
.ma-mode-btn.is-active {
  background: var(--ma-tint-2);
  color: var(--ma-fg);
  font-weight: 550;
}
.ma-mode-count {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ma-fg-4);
  font-variant-numeric: tabular-nums;
}

/* ── TOP STATUS STRIP — quiet 4-cell band ────────────────── */
.ma-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--ma-line);
  margin-bottom: 32px;
  padding: 0;
}
.ma-status-cell {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 16px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  position: relative;
  transition: opacity 160ms ease;
}
.ma-status-cell:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0; top: 14px; bottom: 14px;
  width: 1px;
  background: var(--ma-line);
}
.ma-status-cell:hover { opacity: 0.75; }
.ma-status-cell-k {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-status-cell-v {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.ma-status-cell-sub {
  font-size: 12px;
  color: var(--ma-fg-3);
  font-variant-numeric: tabular-nums;
}
.ma-status-cell-v.is-positive { color: var(--ma-positive); }
.ma-status-cell-v.is-warn     { color: var(--ma-warn); }
.ma-status-cell-v.is-danger   { color: var(--ma-danger); }

/* ── RIGHT RAIL ─────────────────────────────────────────── */
.ma-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-block: 4px;
  gap: 18px;
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.ma-rail-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.ma-rail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.ma-rail-title {
  font-size: 15px;
  font-weight: 590;
  letter-spacing: -0.01em;
  color: var(--ma-fg);
}
.ma-rail-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-rail-sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--ma-fg-3);
  margin-top: 2px;
}
.ma-rail-meta {
  font-size: 11.5px;
  color: var(--ma-fg-4);
  font-variant-numeric: tabular-nums;
}

.ma-rail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border-radius: var(--ma-r-sm);
  transition: background 160ms ease;
}
.ma-rail-row:hover { background: var(--ma-tint-1); }
.ma-rail-row.is-selected { background: var(--ma-tint-2); }
.ma-rail-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ma-rail-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ma-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.ma-rail-row-meta {
  font-size: 11.5px;
  color: var(--ma-fg-3);
  font-variant-numeric: tabular-nums;
}
.ma-rail-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}
.ma-rail-dot.is-active  { background: var(--ma-positive); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ma-positive) 14%, transparent); }
.ma-rail-dot.is-paused  { background: var(--ma-warn); }
.ma-rail-dot.is-failed  { background: var(--ma-danger); }
.ma-rail-dot.is-muted   { background: var(--ma-fg-4); }

.ma-rail-card {
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
  padding: 14px 16px;
}

/* ── PAGE HEADERS / TITLES ──────────────────────────────── */
.ma-page-title {
  font-size: 28px;
  font-weight: 590;
  letter-spacing: -0.025em;
  color: var(--ma-fg);
  margin: 0;
  line-height: 1.1;
}
.ma-page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
  margin-bottom: 8px;
}
.ma-page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.ma-page-sub {
  font-size: 14px;
  color: var(--ma-fg-3);
  margin-top: 4px;
}

.ma-section-title {
  font-size: 17px;
  font-weight: 590;
  letter-spacing: -0.012em;
  color: var(--ma-fg);
  margin: 0;
}
.ma-section-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}

/* ── OVERVIEW HERO ──────────────────────────────────────── */
.ma-hero {
  padding: 8px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
  border-bottom: 1px solid var(--ma-line);
  margin-bottom: 40px;
}
.ma-hero-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ma-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-hero-value {
  font-size: 88px;
  font-weight: 500;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--ma-fg);
  line-height: 0.95;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ma-hero-value-suffix {
  font-size: 38px;
  font-weight: 400;
  color: var(--ma-fg-3);
  letter-spacing: -0.02em;
}
.ma-hero-meta {
  font-size: 14px;
  color: var(--ma-fg-3);
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.ma-hero-claim {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ma-fg-4);
  margin-top: 14px;
}
.ma-hero-claim-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--ma-line-2);
  color: var(--ma-fg-4);
}
.ma-hero-spark {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ma-hero-spark-svg {
  display: block;
  width: 100%;
  height: 110px;
}
.ma-hero-spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ma-fg-4);
  font-variant-numeric: tabular-nums;
}

/* ── TODAY PANEL ────────────────────────────────────────── */
.ma-today {
  margin-bottom: 56px;
}
.ma-today-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ma-today-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--ma-line);
  border-radius: var(--ma-r-md);
  overflow: hidden;
  border: 1px solid var(--ma-line);
}
.ma-today-row {
  display: grid;
  grid-template-columns: 32px 1fr auto 16px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--ma-surface);
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}
.ma-today-row:hover { background: var(--ma-surface-2); }
.ma-today-row-icon {
  width: 28px; height: 28px;
  border-radius: var(--ma-r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ma-today-row-icon.is-danger   { background: var(--ma-danger-bg); color: var(--ma-danger); }
.ma-today-row-icon.is-warn     { background: var(--ma-warn-bg);   color: var(--ma-warn); }
.ma-today-row-icon.is-positive { background: var(--ma-positive-bg); color: var(--ma-positive); }
.ma-today-row-icon.is-info     { background: var(--ma-info-bg);   color: var(--ma-info); }
.ma-today-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ma-today-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ma-fg);
  letter-spacing: -0.005em;
}
.ma-today-row-sub {
  font-size: 12.5px;
  color: var(--ma-fg-3);
}
.ma-today-row-meta {
  font-size: 11.5px;
  color: var(--ma-fg-4);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
}

/* ── LEADERBOARD ────────────────────────────────────────── */
.ma-board {
  margin-bottom: 48px;
}
.ma-board-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
}
.ma-board-segment {
  display: inline-flex;
  background: var(--ma-tint-1);
  border-radius: 8px;
  padding: 2px;
}
.ma-board-segment button {
  padding: 5px 12px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ma-fg-3);
  border-radius: 6px;
  cursor: pointer;
}
.ma-board-segment button.is-on {
  background: var(--ma-surface);
  color: var(--ma-fg);
  box-shadow: var(--ma-shadow-sm);
}
.ma-window-toggle {
  display: inline-flex;
  background: var(--ma-tint-1);
  border-radius: 8px;
  padding: 2px;
}
.ma-window-toggle button {
  padding: 4px 10px;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ma-fg-3);
  border-radius: 6px;
  cursor: pointer;
}
.ma-window-toggle button.is-active {
  background: var(--ma-surface);
  color: var(--ma-fg);
  box-shadow: var(--ma-shadow-sm);
}

.ma-board-table {
  width: 100%;
  border-collapse: collapse;
}
.ma-board-table th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
  padding: 8px 0 12px;
  text-align: left;
  border-bottom: 1px solid var(--ma-line);
}
.ma-board-table th.num { text-align: right; }
.ma-board-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--ma-line);
  font-size: 13.5px;
  color: var(--ma-fg);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.ma-board-table td.num { text-align: right; }
.ma-board-table tr:last-child td { border-bottom: 0; }
.ma-board-table tbody tr { transition: background 140ms ease; }
.ma-board-table tbody tr:hover { background: var(--ma-tint-1); }
.ma-board-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ma-board-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ma-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ma-board-sub {
  font-size: 11.5px;
  color: var(--ma-fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── ROAS VALUE HELPER ──────────────────────────────────── */
.ma-roas-num.is-strong  { color: var(--ma-positive); font-weight: 550; }
.ma-roas-num.is-neutral { color: var(--ma-fg); }
.ma-roas-num.is-weak    { color: var(--ma-warn); }
.ma-roas-num.is-bad     { color: var(--ma-danger); }

/* ── SKAPA · SHOW PICKER ────────────────────────────────── */
.ma-picker-head {
  padding: 8px 0 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ma-line);
}
.ma-picker-search-wrap {
  position: relative;
  width: 280px;
}
.ma-picker-search-wrap > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ma-fg-4);
  pointer-events: none;
}
.ma-picker-search-wrap input {
  width: 100%;
  font-family: var(--ma-font);
  font-size: 13.5px;
  padding: 9px 12px 9px 34px;
  border-radius: 8px;
  border: 1px solid var(--ma-line);
  background: var(--ma-surface);
  color: var(--ma-fg);
  outline: 0;
  letter-spacing: -0.005em;
}
.ma-picker-search-wrap input:focus { border-color: var(--ma-fg-4); }

.ma-picker-week {
  margin-bottom: 32px;
}
.ma-picker-week-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.ma-picker-week-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-picker-week-meta {
  font-size: 11.5px;
  color: var(--ma-fg-4);
  font-variant-numeric: tabular-nums;
}

.ma-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ma-picker-row {
  display: grid;
  grid-template-columns: 20px 64px 1fr auto 22px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--ma-r-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}
.ma-picker-row:hover { background: var(--ma-tint-1); }
.ma-picker-row.is-selected {
  background: var(--ma-tint-2);
  border-color: var(--ma-line-2);
}
.ma-picker-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--ma-line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ma-surface);
  background: transparent;
  transition: all 160ms ease;
}
.ma-picker-row.is-selected .ma-picker-check {
  background: var(--ma-fg);
  border-color: var(--ma-fg);
}
.ma-picker-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.ma-picker-date-d {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--ma-fg);
  line-height: 1;
}
.ma-picker-date-m {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ma-fg-4);
  margin-top: 4px;
}
.ma-picker-artist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ma-picker-artist-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ma-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-picker-artist-meta {
  font-size: 11.5px;
  color: var(--ma-fg-3);
  font-variant-numeric: tabular-nums;
}
.ma-picker-fill {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ma-picker-fill-bar {
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--ma-tint-2);
  overflow: hidden;
}
.ma-picker-fill-bar-fill {
  height: 100%;
  background: var(--ma-fg-3);
  border-radius: 2px;
}
.ma-picker-fill-pct {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ma-fg-3);
  min-width: 32px;
}
.ma-picker-slots {
  display: inline-flex;
  gap: 4px;
}
.ma-picker-slot-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ma-line-2);
}
.ma-picker-slot-dot.is-on { background: var(--ma-positive); }

/* Sticky bottom action bar */
.ma-action-shelf {
  position: sticky;
  bottom: 16px;
  margin-top: 32px;
  padding: 12px 20px;
  background: color-mix(in oklch, var(--ma-surface) 92%, transparent);
  border: 1px solid var(--ma-line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--ma-shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}
.ma-action-shelf-text {
  font-size: 13.5px;
  color: var(--ma-fg);
  letter-spacing: -0.005em;
}
.ma-action-shelf-meta {
  font-size: 12.5px;
  color: var(--ma-fg-3);
  margin-left: 6px;
}
.ma-action-shelf-actions {
  display: flex;
  gap: 8px;
}

/* ── BUTTONS — Apple-style ──────────────────────────────── */
.ma-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 0;
  font-family: var(--ma-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  background: transparent;
  color: var(--ma-fg);
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}
.ma-btn:hover { background: var(--ma-tint-1); }
.ma-btn:active { transform: scale(0.98); }
.ma-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ma-btn:disabled:hover { background: transparent; }

.ma-btn-secondary {
  background: var(--ma-surface);
  border: 1px solid var(--ma-line-2);
}
.ma-btn-secondary:hover { background: var(--ma-tint-1); }

.ma-btn-primary {
  background: var(--ma-fg);
  color: var(--ma-surface);
  font-weight: 550;
}
.ma-btn-primary:hover { background: var(--ma-fg-2); }
.dark .ma-btn-primary { color: var(--ma-bg); }

.ma-btn-danger {
  color: var(--ma-danger);
}
.ma-btn-danger:hover { background: var(--ma-danger-bg); }

.ma-btn-ghost {
  color: var(--ma-fg-3);
}
.ma-btn-ghost:hover { color: var(--ma-fg); background: var(--ma-tint-1); }

/* ── OBJECTIVE PICKER ───────────────────────────────────── */
.ma-objective-wrap { padding-top: 8px; }
.ma-objective-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  font-size: 13px;
  color: var(--ma-fg-3);
  padding: 4px 8px 4px 4px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 20px;
}
.ma-objective-back:hover { color: var(--ma-fg); background: var(--ma-tint-1); }

.ma-showcard {
  padding: 20px 24px;
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
  background: var(--ma-surface);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}
.ma-showcard-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 24px;
  border-right: 1px solid var(--ma-line);
}
.ma-showcard-date-d {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ma-fg);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ma-showcard-date-m {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
  margin-top: 6px;
}
.ma-showcard-date-w {
  font-size: 11px;
  color: var(--ma-fg-4);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ma-showcard-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ma-showcard-artist {
  font-size: 22px;
  font-weight: 590;
  letter-spacing: -0.018em;
  color: var(--ma-fg);
}
.ma-showcard-meta {
  font-size: 13px;
  color: var(--ma-fg-3);
  font-variant-numeric: tabular-nums;
}
.ma-showcard-stats {
  display: flex;
  gap: 28px;
  text-align: right;
}
.ma-showcard-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}
.ma-showcard-stat-k {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-showcard-stat-v {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
}

.ma-objective-prompt {
  font-size: 14px;
  color: var(--ma-fg-3);
  margin: 0 0 24px;
  max-width: 600px;
  line-height: 1.5;
}
.ma-objective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ma-objective-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 28px;
  border: 1px solid var(--ma-line);
  background: var(--ma-surface);
  border-radius: var(--ma-r-md);
  cursor: pointer;
  text-align: left;
  transition: border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ma-objective-card:hover {
  border-color: var(--ma-line-2);
  transform: translateY(-2px);
  box-shadow: var(--ma-shadow-md);
}
.ma-objective-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--ma-tint-1);
  color: var(--ma-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ma-objective-card-title {
  font-size: 22px;
  font-weight: 590;
  letter-spacing: -0.02em;
  color: var(--ma-fg);
}
.ma-objective-card-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ma-fg-3);
  letter-spacing: -0.005em;
}
.ma-objective-card-spec {
  font-size: 11.5px;
  color: var(--ma-fg-4);
  border-top: 1px solid var(--ma-line);
  padding-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ma-objective-card-spec strong { color: var(--ma-fg); font-weight: 500; }

/* ── AUTHORING ──────────────────────────────────────────── */
.ma-authoring {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ma-authoring-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.ma-stepper-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.ma-step-tab {
  padding: 7px 14px;
  border: 0;
  background: transparent;
  font-family: var(--ma-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ma-fg-3);
  border-radius: 7px;
  cursor: pointer;
  transition: background 160ms ease, color 120ms ease;
  letter-spacing: -0.005em;
}
.ma-step-tab:hover { color: var(--ma-fg); }
.ma-step-tab.is-active {
  background: var(--ma-tint-2);
  color: var(--ma-fg);
  font-weight: 550;
}
.ma-step-tab-num {
  display: inline-flex;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  background: var(--ma-tint-2);
  color: var(--ma-fg-3);
  margin-right: 6px;
}
.ma-step-tab.is-active .ma-step-tab-num {
  background: var(--ma-fg);
  color: var(--ma-surface);
}

.ma-authoring-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: flex-start;
}
.ma-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.ma-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ma-form-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ma-line);
}
.ma-form-section-title {
  font-size: 15px;
  font-weight: 590;
  letter-spacing: -0.01em;
  color: var(--ma-fg);
}
.ma-form-section-sub {
  font-size: 12px;
  color: var(--ma-fg-3);
}
.ma-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.ma-form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.ma-form-grid-full { grid-column: 1 / -1; }

.ma-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ma-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ma-fg-2);
  letter-spacing: -0.005em;
}
.ma-field-required::after { content: " *"; color: var(--ma-danger); }
.ma-field-input,
.ma-field-textarea,
.ma-field-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--ma-line);
  background: var(--ma-surface);
  color: var(--ma-fg);
  font-family: var(--ma-font);
  font-size: 13.5px;
  outline: 0;
  letter-spacing: -0.005em;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.ma-field-input:focus,
.ma-field-textarea:focus,
.ma-field-select:focus {
  border-color: var(--ma-fg-4);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ma-fg) 8%, transparent);
}
.ma-field-textarea { resize: vertical; min-height: 72px; }
.ma-field-hint { font-size: 11.5px; color: var(--ma-fg-4); }

.ma-radio-group {
  display: inline-flex;
  background: var(--ma-tint-1);
  padding: 3px;
  border-radius: 8px;
}
.ma-radio-group button {
  padding: 5px 12px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ma-fg-3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 160ms ease;
  letter-spacing: -0.005em;
}
.ma-radio-group button:hover { color: var(--ma-fg); }
.ma-radio-group button.is-on {
  background: var(--ma-surface);
  color: var(--ma-fg);
  font-weight: 550;
  box-shadow: var(--ma-shadow-sm);
}

.ma-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px;
  min-height: 40px;
  border: 1px solid var(--ma-line);
  border-radius: 8px;
  background: var(--ma-surface);
}
.ma-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ma-tint-2);
  color: var(--ma-fg);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.ma-chip-x {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ma-fg-3);
  cursor: pointer;
}
.ma-chip-x:hover { color: var(--ma-fg); background: var(--ma-tint-2); }

/* ── PREVIEW PANE (sticky right column in authoring) ────── */
.ma-preview-pane {
  position: sticky;
  top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ma-preview-section {
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ma-preview-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ma-preview-eyebrow {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}

/* Ad preview (in preview pane) */
.ma-ad-preview {
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--ma-surface);
  display: flex;
  flex-direction: column;
}
.ma-ad-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}
.ma-ad-preview-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ma-fg);
  color: var(--ma-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.ma-ad-preview-page {
  font-size: 13px;
  font-weight: 600;
  color: var(--ma-fg);
}
.ma-ad-preview-sponsored {
  font-size: 11px;
  color: var(--ma-fg-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ma-ad-preview-text {
  padding: 0 12px 12px;
  font-size: 13px;
  color: var(--ma-fg);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.ma-ad-preview-text .ph { color: var(--ma-fg-4); font-style: italic; }
.ma-ad-preview-media {
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      var(--ma-surface-2) 0 14px,
      var(--ma-bg) 14px 28px);
  aspect-ratio: 1.91 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ma-fg-4);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.ma-ad-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--ma-surface-2);
  gap: 12px;
}
.ma-ad-preview-link {
  font-size: 10.5px;
  color: var(--ma-fg-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ma-ad-preview-headline {
  font-size: 14px;
  font-weight: 600;
  color: var(--ma-fg);
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.ma-ad-preview-cta {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ma-tint-2);
  color: var(--ma-fg);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Stat readout in preview */
.ma-preview-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12.5px;
}
.ma-preview-stat-k { color: var(--ma-fg-3); }
.ma-preview-stat-v {
  color: var(--ma-fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Reach estimator visual */
.ma-reach {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ma-reach-value {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ma-reach-bar {
  height: 6px;
  background: var(--ma-tint-1);
  border-radius: 3px;
  overflow: hidden;
}
.ma-reach-bar-fill {
  height: 100%;
  background: var(--ma-fg);
  border-radius: 3px;
}
.ma-reach-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ma-fg-4);
}

/* Authoring shelf — bottom bar */
.ma-author-shelf {
  position: sticky;
  bottom: 16px;
  margin-top: 32px;
  padding: 12px 16px;
  background: color-mix(in oklch, var(--ma-surface) 90%, transparent);
  border: 1px solid var(--ma-line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--ma-shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}
.ma-author-shelf-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ma-fg-3);
  flex: 1;
  min-width: 0;
}
.ma-author-shelf-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ma-author-shelf-dot.is-ok    { background: var(--ma-positive); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ma-positive) 14%, transparent); }
.ma-author-shelf-dot.is-error { background: var(--ma-danger); }
.ma-author-shelf-dot.is-warn  { background: var(--ma-warn); }

/* Adset/Ad item cards in steps */
.ma-adset-item {
  border: 1px solid var(--ma-line);
  background: var(--ma-surface);
  border-radius: var(--ma-r-md);
  overflow: hidden;
}
.ma-adset-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ma-line);
}
.ma-adset-item-name {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 590;
  letter-spacing: -0.01em;
  color: var(--ma-fg);
  outline: 0;
}
.ma-adset-item-name:focus {
  outline: 2px solid var(--ma-line-2);
  outline-offset: 4px;
  border-radius: 4px;
}
.ma-adset-item-meta {
  font-size: 11.5px;
  color: var(--ma-fg-3);
  font-variant-numeric: tabular-nums;
}
.ma-adset-item-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ma-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--ma-line-2);
  border-radius: var(--ma-r-md);
  background: transparent;
  color: var(--ma-fg-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms ease;
}
.ma-add-row:hover {
  border-color: var(--ma-fg-4);
  background: var(--ma-tint-1);
  color: var(--ma-fg);
}

/* ── DRAFT CARDS — status-differentiated ────────────────── */
.ma-drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.ma-draft {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
  cursor: pointer;
  text-align: left;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  overflow: hidden;
}
.ma-draft:hover {
  border-color: var(--ma-line-2);
  transform: translateY(-1px);
  box-shadow: var(--ma-shadow-md);
}
.ma-draft.is-draft {
  border-style: dashed;
}
.ma-draft.is-failed {
  border-color: color-mix(in oklch, var(--ma-danger) 50%, var(--ma-line));
}
.ma-draft.is-failed::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ma-danger);
}
.ma-draft.is-publishing::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ma-info), transparent);
  animation: maPublishingShimmer 1.6s ease-in-out infinite;
}
@keyframes maPublishingShimmer {
  0%, 100% { transform: translateX(-30%); }
  50%      { transform: translateX(30%); }
}

.ma-draft-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ma-draft-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ma-draft-status.is-draft      { background: var(--ma-tint-1);    color: var(--ma-fg-3); }
.ma-draft-status.is-publishing { background: var(--ma-info-bg);   color: var(--ma-info); }
.ma-draft-status.is-active     { background: var(--ma-positive-bg); color: var(--ma-positive); }
.ma-draft-status.is-paused     { background: var(--ma-warn-bg);   color: var(--ma-warn); }
.ma-draft-status.is-failed     { background: var(--ma-danger-bg); color: var(--ma-danger); }
.ma-draft-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.ma-draft-status.is-active .ma-draft-status-dot {
  animation: maPulse 2s ease-in-out infinite;
}
@keyframes maPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.ma-draft-obj {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ma-fg-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ma-draft-name {
  font-size: 16px;
  font-weight: 590;
  letter-spacing: -0.015em;
  color: var(--ma-fg);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(16px * 1.3 * 2);
}
.ma-draft-meta {
  font-size: 12px;
  color: var(--ma-fg-3);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.ma-draft-meta-sep { color: var(--ma-fg-4); }
.ma-draft-stale {
  font-size: 11px;
  color: var(--ma-warn);
  font-weight: 500;
}
.ma-draft-error {
  font-size: 11.5px;
  color: var(--ma-danger);
  line-height: 1.4;
  padding: 8px 10px;
  background: var(--ma-danger-bg);
  border-radius: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ma-draft-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-top: 12px;
  border-top: 1px solid var(--ma-line);
  gap: 4px;
}
.ma-draft-stat-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ma-fg-4);
  font-weight: 500;
}
.ma-draft-stat-v {
  font-size: 14px;
  font-weight: 500;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  margin-top: 1px;
}

/* ── EMPTY STATES ───────────────────────────────────────── */
.ma-empty {
  padding: 64px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ma-empty-title {
  font-size: 16px;
  font-weight: 590;
  color: var(--ma-fg);
  letter-spacing: -0.01em;
}
.ma-empty-sub {
  font-size: 13px;
  color: var(--ma-fg-3);
  max-width: 380px;
  line-height: 1.5;
}

/* ── PILL · BADGES ──────────────────────────────────────── */
.ma-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ma-pill.is-exact   { background: var(--ma-positive-bg); color: var(--ma-positive); }
.ma-pill.is-funnel  { background: var(--ma-info-bg);     color: var(--ma-info); }
.ma-pill.is-missing { background: var(--ma-danger-bg);   color: var(--ma-danger); }
.ma-pill.is-mixed   { background: var(--ma-warn-bg);     color: var(--ma-warn); }
.ma-pill.is-unknown { background: var(--ma-tint-1);      color: var(--ma-fg-4); }

/* ── AUTO MODE ──────────────────────────────────────────── */
.ma-auto-strategies {
  display: grid;
  /* minmax(0, 1fr) — NOT 1fr. A bare `1fr` is `minmax(min-content, 1fr)`, so
     a wide card (the 28px metric value / "spend (30 d)" line) forces its track
     past its 1/3 share and the cards overflow/overlap into the right column.
     minmax(0,…) lets the tracks shrink so content wraps and the 16px gap holds. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.ma-auto-strat {
  position: relative;
  min-width: 0; /* allow the card to shrink within its track so content wraps */
  padding: 22px 24px;
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ma-auto-strat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ma-auto-strat-name {
  font-size: 17px;
  font-weight: 590;
  letter-spacing: -0.012em;
  color: var(--ma-fg);
}
.ma-auto-strat-sub {
  font-size: 12px;
  color: var(--ma-fg-3);
  margin-top: 2px;
}
.ma-auto-strat-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ma-auto-strat-status.is-positive { background: var(--ma-positive-bg); color: var(--ma-positive); }
.ma-auto-strat-status.is-info     { background: var(--ma-info-bg);     color: var(--ma-info); }
.ma-auto-strat-status.is-neutral  { background: var(--ma-tint-1);      color: var(--ma-fg-3); }
.ma-auto-strat-status.is-warn     { background: var(--ma-warn-bg);     color: var(--ma-warn); }
.ma-auto-strat-status.is-danger   { background: var(--ma-danger-bg);   color: var(--ma-danger); }
.ma-auto-strat-metric {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
  border-top: 1px solid var(--ma-line);
  padding-top: 14px;
}
.ma-auto-strat-metric-v {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ma-auto-strat-metric-k {
  font-size: 12px;
  color: var(--ma-fg-3);
  min-width: 0;
}
.ma-auto-strat-desc {
  font-size: 12.5px;
  color: var(--ma-fg-3);
  line-height: 1.55;
}

/* ── SETTINGS ───────────────────────────────────────────── */
.ma-settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--ma-line);
}
.ma-settings-row:last-child { border-bottom: 0; }
.ma-settings-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ma-settings-row-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ma-fg);
  letter-spacing: -0.005em;
}
.ma-settings-row-hint {
  font-size: 12px;
  color: var(--ma-fg-3);
}
.ma-settings-row-key {
  font-family: var(--ma-mono);
  font-size: 10.5px;
  color: var(--ma-fg-4);
  margin-top: 2px;
}

/* ── METRICS ────────────────────────────────────────────── */
.ma-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--ma-line);
  margin-bottom: 32px;
}
.ma-metrics-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ma-metrics-stat-k {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-metrics-stat-v {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ma-metrics-stat-sub {
  font-size: 13px;
  color: var(--ma-fg-3);
  margin-top: 2px;
}

.ma-compare-table {
  width: 100%;
  border-collapse: collapse;
}
.ma-compare-table th,
.ma-compare-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--ma-line);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.ma-compare-table th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
  font-variant-numeric: normal;
}
.ma-compare-table th:first-child,
.ma-compare-table td:first-child {
  text-align: left;
  color: var(--ma-fg-2);
  font-weight: 500;
}
.ma-compare-table td.is-muted { color: var(--ma-fg-3); }
.ma-compare-table td.is-accent { color: var(--ma-warn); font-weight: 500; }

/* ── CAMPAIGN DETAIL (selected in Overview) ─────────────── */
.ma-detail {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.ma-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  font-size: 13px;
  color: var(--ma-fg-3);
  padding: 4px 8px 4px 4px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  align-self: flex-start;
}
.ma-detail-back:hover { color: var(--ma-fg); background: var(--ma-tint-1); }
.ma-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ma-line);
}
.ma-detail-name {
  font-size: 32px;
  font-weight: 590;
  letter-spacing: -0.025em;
  color: var(--ma-fg);
  line-height: 1.15;
  margin: 0 0 8px;
}
.ma-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ma-detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--ma-tint-1);
  color: var(--ma-fg-2);
}
.ma-detail-tag.is-positive { background: var(--ma-positive-bg); color: var(--ma-positive); }
.ma-detail-tag.is-warn     { background: var(--ma-warn-bg);     color: var(--ma-warn); }

.ma-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.ma-detail-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ma-detail-kpi-k {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-detail-kpi-v {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
}
.ma-detail-kpi-sub {
  font-size: 12px;
  color: var(--ma-fg-3);
}

.ma-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ma-line);
  border-radius: var(--ma-r-md);
  overflow: hidden;
  border: 1px solid var(--ma-line);
}
.ma-config-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 12px 16px;
  background: var(--ma-surface);
  gap: 12px;
}
.ma-config-k {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
  align-self: center;
}
.ma-config-v {
  font-size: 13px;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

/* ── READINESS PANEL ────────────────────────────────────── */
.ma-readiness {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: var(--ma-r-md);
}
.ma-readiness-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 590;
  color: var(--ma-fg);
  letter-spacing: -0.01em;
}
.ma-readiness-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ma-positive);
}
.ma-error-group { display: flex; flex-direction: column; gap: 6px; }
.ma-error-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-inline: -8px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 590;
  color: var(--ma-fg);
  cursor: pointer;
}
.ma-error-group-head:hover { background: var(--ma-tint-1); }
.ma-error-group-count { color: var(--ma-danger); font-variant-numeric: tabular-nums; font-weight: 500; }
.ma-error-row {
  display: flex;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ma-fg-2);
  padding: 4px 8px;
  letter-spacing: -0.005em;
}
.ma-error-icon { color: var(--ma-danger); margin-top: 2px; flex-shrink: 0; }

/* ── UTILITY ────────────────────────────────────────────── */
.ma-mute { color: var(--ma-fg-4); }
.ma-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selectable filter chip row (Drafts) */
.ma-chip-row {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.ma-chip-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--ma-line);
  background: var(--ma-surface);
  color: var(--ma-fg-3);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: all 160ms ease;
}
.ma-chip-btn:hover { color: var(--ma-fg); border-color: var(--ma-line-2); }
.ma-chip-btn.is-on {
  background: var(--ma-fg);
  color: var(--ma-surface);
  border-color: var(--ma-fg);
}

/* ============================================================
   DIALOGS & DRAWERS
   ============================================================ */
.ma-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  animation: maBackdropIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .ma-backdrop { background: oklch(0 0 0 / 0.55); }
@keyframes maBackdropIn { from { opacity: 0; } to { opacity: 1; } }

/* Centered modal */
.ma-modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  pointer-events: none;
}
.ma-modal-card {
  background: var(--ma-surface);
  border-radius: 18px;
  box-shadow: var(--ma-shadow-lg);
  border: 1px solid var(--ma-line);
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  animation: maModalIn 320ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
@keyframes maModalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ma-modal-head {
  padding: 22px 24px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ma-modal-title {
  font-size: 18px;
  font-weight: 590;
  letter-spacing: -0.015em;
  color: var(--ma-fg);
  margin: 0;
}
.ma-modal-sub {
  font-size: 13px;
  color: var(--ma-fg-3);
  margin: 4px 0 0;
  line-height: 1.5;
}
.ma-modal-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--ma-tint-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ma-fg-3);
  flex-shrink: 0;
  transition: background 160ms ease, color 160ms ease;
}
.ma-modal-close:hover { background: var(--ma-tint-2); color: var(--ma-fg); }
.ma-modal-body { padding: 12px 24px 16px; display: flex; flex-direction: column; gap: 12px; }
.ma-modal-foot {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--ma-line);
}

/* Right-side drawer */
.ma-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 520px;
  max-width: 92vw;
  height: 100vh;
  background: var(--ma-surface);
  border-left: 1px solid var(--ma-line);
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ma-shadow-lg);
  animation: maDrawerIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes maDrawerIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ma-drawer-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--ma-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ma-drawer-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-drawer-title {
  font-size: 20px;
  font-weight: 590;
  letter-spacing: -0.02em;
  color: var(--ma-fg);
  margin: 2px 0 0;
}
.ma-drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 18px 0;
  border-bottom: 1px solid var(--ma-line);
  background: var(--ma-surface);
  position: relative;
}
.ma-drawer-tab {
  padding: 10px 12px 12px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ma-fg-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 140ms ease;
}
.ma-drawer-tab:hover { color: var(--ma-fg); }
.ma-drawer-tab.is-active {
  color: var(--ma-fg);
  font-weight: 590;
  border-bottom-color: var(--ma-fg);
}
.ma-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}

/* ============================================================
   PUBLISH OVERLAY — multi-stage flow
   ============================================================ */
.ma-publish-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: color-mix(in oklch, var(--ma-bg) 70%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: maOverlayIn 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes maOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.ma-publish-card {
  background: var(--ma-surface);
  border-radius: 22px;
  border: 1px solid var(--ma-line);
  box-shadow: var(--ma-shadow-lg);
  width: 460px;
  max-width: 92vw;
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  animation: maPublishCardIn 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes maPublishCardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ma-publish-icon {
  width: 64px; height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ma-tint-1);
  color: var(--ma-fg);
  position: relative;
}
.ma-publish-icon.is-success {
  background: var(--ma-positive-bg);
  color: var(--ma-positive);
  animation: maSuccessPop 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ma-publish-icon.is-error {
  background: var(--ma-danger-bg);
  color: var(--ma-danger);
}
@keyframes maSuccessPop {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Spinner */
.ma-spinner {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--ma-tint-2);
  border-top-color: var(--ma-fg);
  animation: maSpin 800ms linear infinite;
}
@keyframes maSpin { to { transform: rotate(360deg); } }

/* Checkmark draw */
.ma-check {
  width: 30px; height: 30px;
  stroke-width: 2.5;
}
.ma-check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: maCheckDraw 460ms cubic-bezier(0.65, 0, 0.35, 1) 220ms forwards;
}
@keyframes maCheckDraw { to { stroke-dashoffset: 0; } }

.ma-publish-title {
  font-size: 22px;
  font-weight: 590;
  letter-spacing: -0.02em;
  color: var(--ma-fg);
  margin: 0;
}
.ma-publish-sub {
  font-size: 14px;
  color: var(--ma-fg-3);
  margin: 0;
  line-height: 1.5;
  max-width: 320px;
}

/* Stage progress */
.ma-publish-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.ma-publish-stage {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
  text-align: left;
  color: var(--ma-fg-3);
  transition: color 240ms ease;
  letter-spacing: -0.005em;
}
.ma-publish-stage.is-done {
  color: var(--ma-fg);
}
.ma-publish-stage.is-active {
  color: var(--ma-fg);
  font-weight: 500;
}
.ma-publish-stage.is-pending {
  color: var(--ma-fg-4);
}
.ma-publish-stage-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ma-tint-1);
  color: var(--ma-fg-3);
  flex-shrink: 0;
  transition: all 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ma-publish-stage.is-done .ma-publish-stage-icon {
  background: var(--ma-positive-bg);
  color: var(--ma-positive);
}
.ma-publish-stage.is-active .ma-publish-stage-icon {
  background: var(--ma-fg);
  color: var(--ma-surface);
}
.dark .ma-publish-stage.is-active .ma-publish-stage-icon { color: var(--ma-bg); }
.ma-publish-stage-spinner {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: currentColor;
  animation: maSpin 700ms linear infinite;
}

/* Progress bar */
.ma-progress {
  width: 100%;
  height: 4px;
  background: var(--ma-tint-1);
  border-radius: 2px;
  overflow: hidden;
}
.ma-progress-fill {
  height: 100%;
  background: var(--ma-fg);
  border-radius: 2px;
  transition: width 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ma-progress-shimmer {
  background:
    linear-gradient(90deg, transparent 0%, color-mix(in oklch, var(--ma-fg) 30%, transparent) 50%, transparent 100%),
    var(--ma-fg);
  background-size: 200% 100%, 100% 100%;
  background-position: 100% 0, 0 0;
  background-repeat: no-repeat;
  animation: maShimmer 1.6s linear infinite;
}
@keyframes maShimmer { to { background-position: -100% 0, 0 0; } }

/* Success summary lines (slide-up after publish) */
.ma-publish-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--ma-line);
  width: 100%;
  animation: maEnterIn 420ms cubic-bezier(0.22, 1, 0.36, 1) 280ms backwards;
}
.ma-publish-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ma-fg-3);
  font-variant-numeric: tabular-nums;
}
.ma-publish-summary-row strong { color: var(--ma-fg); font-weight: 500; }

/* ============================================================
   TEMPLATE PICKER
   ============================================================ */
.ma-tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ma-tpl-card {
  text-align: left;
  background: var(--ma-surface);
  border: 1px solid var(--ma-line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}
.ma-tpl-card:hover {
  border-color: var(--ma-line-2);
  transform: translateY(-1px);
  box-shadow: var(--ma-shadow-sm);
}
.ma-tpl-card-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ma-fg-4);
}
.ma-tpl-card-name {
  font-size: 14px;
  font-weight: 590;
  letter-spacing: -0.01em;
  color: var(--ma-fg);
}
.ma-tpl-card-meta {
  font-size: 11.5px;
  color: var(--ma-fg-3);
}

/* ============================================================
   STRATEGIER DRAWER — Override list
   ============================================================ */
.ma-drawer-strat-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ma-line);
  margin-bottom: 18px;
}
.ma-drawer-strat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ma-tint-1);
  color: var(--ma-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ma-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--ma-line);
}
.ma-toggle-row:last-child { border-bottom: 0; }
.ma-toggle-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ma-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ma-fg);
  letter-spacing: -0.005em;
}
.ma-toggle-sub {
  font-size: 12px;
  color: var(--ma-fg-3);
}
.ma-switch {
  position: relative;
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: var(--ma-tint-2);
  border: 0;
  cursor: pointer;
  transition: background 200ms ease;
  padding: 0;
  flex-shrink: 0;
}
.ma-switch.is-on { background: var(--ma-fg); }
.ma-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ma-surface);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.2);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ma-switch.is-on::after { transform: translateX(14px); }
.dark .ma-switch.is-on::after { background: var(--ma-bg); }

/* Threshold slider row */
.ma-threshold {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ma-line);
  align-items: center;
}
.ma-threshold-value {
  font-family: var(--ma-mono);
  font-size: 13px;
  color: var(--ma-fg);
  font-variant-numeric: tabular-nums;
}
.ma-threshold-input {
  width: 88px;
  padding: 5px 8px;
  border: 1px solid var(--ma-line);
  border-radius: 6px;
  background: var(--ma-surface);
  color: var(--ma-fg);
  font-family: var(--ma-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: 0;
}
.ma-threshold-input:focus { border-color: var(--ma-fg-4); }

/* Mini timeline (logs) */
.ma-log-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ma-line);
  font-size: 12.5px;
  align-items: flex-start;
}
.ma-log-row:last-child { border-bottom: 0; }
.ma-log-time {
  font-family: var(--ma-mono);
  font-size: 11px;
  color: var(--ma-fg-4);
  font-variant-numeric: tabular-nums;
}
.ma-log-text { color: var(--ma-fg-2); line-height: 1.5; letter-spacing: -0.005em; }
.ma-log-text code { font-family: var(--ma-mono); font-size: 11px; color: var(--ma-fg); }

/* Hover lifts everywhere */
.ma-lift { transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease; }
.ma-lift:hover { transform: translateY(-1px); box-shadow: var(--ma-shadow-sm); }

/* Animated count-up — applied via inline style transitions */
.ma-count {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

/* Pulse on attention dot */
@keyframes maPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.25); opacity: 0.6; }
}
.ma-pulse { animation: maPulseDot 1.8s ease-in-out infinite; }

/* Subtle scale on button press */
.ma-btn:active { transform: scale(0.97); }
.ma-mode-btn:active { transform: scale(0.98); }
.ma-step-tab:active { transform: scale(0.98); }
.ma-picker-row:active { transform: scale(0.99); }

/* Smooth icon transitions (scoped to .fc-app so this global button rule
   doesn't bleed into the V1 app now that meta-ads.css loads app-wide). */
.fc-app button svg { transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.fc-app button:hover svg { transform: translateX(0); }

/* Toast — bottom-right ephemeral */
.ma-toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--ma-fg);
  color: var(--ma-surface);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--ma-shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 200;
  animation: maToastIn 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .ma-toast { color: var(--ma-bg); }
@keyframes maToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tab indicator underline animation */
.ma-step-tab.is-active::after {
  content: "";
  position: relative;
}

/* Hero number animation */
.ma-hero-value { transition: color 280ms ease; }

/* Audience interest interactions */
.ma-chip { transition: background 160ms ease, transform 160ms ease; }
.ma-chip:hover { transform: translateY(-1px); }

/* Stagger for board rows */
.ma-board-table tbody tr { animation: maEnterIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.ma-board-table tbody tr:nth-child(1) { animation-delay: 20ms; }
.ma-board-table tbody tr:nth-child(2) { animation-delay: 50ms; }
.ma-board-table tbody tr:nth-child(3) { animation-delay: 80ms; }
.ma-board-table tbody tr:nth-child(4) { animation-delay: 110ms; }
.ma-board-table tbody tr:nth-child(5) { animation-delay: 140ms; }
.ma-board-table tbody tr:nth-child(6) { animation-delay: 170ms; }
.ma-board-table tbody tr:nth-child(7) { animation-delay: 200ms; }
.ma-board-table tbody tr:nth-child(8) { animation-delay: 230ms; }
.ma-today-row { animation: maEnterIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.ma-today-row:nth-child(1) { animation-delay: 20ms; }
.ma-today-row:nth-child(2) { animation-delay: 50ms; }
.ma-today-row:nth-child(3) { animation-delay: 80ms; }
.ma-today-row:nth-child(4) { animation-delay: 110ms; }
.ma-today-row:nth-child(5) { animation-delay: 140ms; }
.ma-today-row:nth-child(6) { animation-delay: 170ms; }
.ma-draft { animation: maEnterIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Sparkline path draw */
.ma-hero-spark-svg path[stroke] {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: maPathDraw 1400ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
}
@keyframes maPathDraw { to { stroke-dashoffset: 0; } }

/* Reach bar fill — animated */
.ma-reach-bar-fill { transition: width 480ms cubic-bezier(0.22, 1, 0.36, 1); }

/* Picker fill bar animated */
.ma-picker-fill-bar-fill { transition: width 480ms cubic-bezier(0.22, 1, 0.36, 1); }

/* Page eyebrow + title slide-down */
.ma-page-head { animation: maPageHead 420ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes maPageHead {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
