/* ================================================
   Marketing Automation & AI — marketing-automation-ai.css
   Service page. Reuses styles.css + web-design.css + paid-ads.css.
   Prefix: mai-  (structure mirrors email-marketing.css)
   ================================================ */

/* ===== Hero override: static Ads Manager table ===== */
.mai-hero-head {
  /* hero already sized by parent .pa-hero-head */
}

/* Safety: ensure hero text renders — kill animations, show statically */
.mai-hero-head .line { overflow: visible !important; }
.mai-hero-head .line span,
.mai-hero-head .line > span {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

/* ===== Accent-background hero variant (Tweak: accentHero) ===== */
.mai-hero-accent {
  position: relative;
  width: 98%;
  max-width: 98%;
  margin: 14px auto 0;
  background: var(--accent);
  color: var(--accent-ink, #0E0E10);
  border-radius: 28px;
  overflow: hidden;
  padding-top: clamp(40px, 5vw, 72px) !important;
  padding-bottom: clamp(48px, 5vw, 80px) !important;
  isolation: isolate;
}
/* Tint all text inside to accent-ink */
.mai-hero-accent,
.mai-hero-accent .eyebrow,
.mai-hero-accent .pa-hero-lede,
.mai-hero-accent .mono,
.mai-hero-accent .wd-hero-crumb,
.mai-hero-accent .wd-hero-crumb a,
.mai-hero-accent .pa-hero-head {
  color: var(--accent-ink, #0E0E10) !important;
}
/* In accent hero, "compound." highlight flips to white bg + black text */
.mai-hero-accent .hero-strike {
  background: #ffffff !important;
  color: var(--accent-ink, #0E0E10) !important;
}

/* Standalone metrics section (moved out of hero) */
.mai-hero-metrics-section {
  padding: clamp(40px, 4vw, 64px) 0 clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--border);
}
.mai-metrics-standalone {
  border-top: none !important;
  border-bottom: none !important;
  padding: 0 !important;
}
.mai-hero-accent .eyebrow {
  border-color: rgba(14, 14, 16, 0.28) !important;
  background: rgba(14, 14, 16, 0.06);
}
.mai-hero-accent .wd-hero-crumb a { opacity: 0.72; }
.mai-hero-accent .wd-hero-crumb a:hover { opacity: 1; }
.mai-hero-accent .crumb-sep { opacity: 0.4; }

/* Buttons: invert to dark pill on accent bg */
.mai-hero-accent .btn {
  background: var(--accent-ink, #0E0E10) !important;
  color: var(--accent) !important;
  border-color: var(--accent-ink, #0E0E10) !important;
}
.mai-hero-accent .btn:hover {
  background: #000 !important;
  border-color: #000 !important;
}
.mai-hero-accent .btn-ghost {
  background: transparent !important;
  color: var(--accent-ink, #0E0E10) !important;
  border: 1px solid rgba(14, 14, 16, 0.35) !important;
}
.mai-hero-accent .btn-ghost:hover {
  background: rgba(14, 14, 16, 0.08) !important;
}

/* Hero metrics bar inside accent card */
.mai-hero-accent .pa-hero-metrics,
.mai-hero-accent .wd-hero-metrics {
  border-top-color: rgba(14, 14, 16, 0.18) !important;
  border-bottom-color: rgba(14, 14, 16, 0.18) !important;
}
.mai-hero-accent .pa-hero-metrics *,
.mai-hero-accent .wd-hero-metrics * {
  color: var(--accent-ink, #0E0E10) !important;
  border-color: rgba(14, 14, 16, 0.18) !important;
}

/* Tag chips */
.mai-hero-accent .wd-hero-tags .dot,
.mai-hero-accent .hero-tag .dot {
  background: var(--accent-ink, #0E0E10) !important;
}

/* Ads-Manager viz card keeps its own dark body — soften border */
  box-shadow: 0 24px 60px rgba(14, 14, 16, 0.22);
  border-color: rgba(14, 14, 16, 0.22);
}

@media (max-width: 720px) {
  .mai-hero-accent {
    width: calc(100% - 16px);
    margin: 12px auto 0;
    border-radius: 22px;
  }
}

/* =========== Thesis =========== */
.mai-thesis {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mai-thesis-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: stretch;
}
.mai-thesis-head {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.mai-thesis-gallery-wrap {
  margin-top: 36px;
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}
.mai-thesis-gallery {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.15fr 1.15fr 1.5fr;
  gap: 10px;
}
.mai-thesis-g {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.mai-thesis-g img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 600ms ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
/* Per-tile subject framing — keeps faces/logos from being cropped */
.mai-thesis-g.pos-top img     { object-position: center 20%; }
.mai-thesis-g.pos-upper img   { object-position: center 30%; }
.mai-thesis-g.pos-center img  { object-position: center center; }
.mai-thesis-g.pos-lower img   { object-position: center 65%; }
.mai-thesis-g.pos-bottom img  { object-position: center 80%; }
.mai-thesis-g.pos-left img    { object-position: 25% center; }
.mai-thesis-g.pos-right img   { object-position: 75% center; }
.mai-thesis-g:hover img { transform: scale(1.04); }

/* spans — masonry layout, stretches to match right column */
.mai-thesis-g-1 { grid-column: 1; grid-row: span 2; }
.mai-thesis-g-2 { grid-column: 2; grid-row: 1; }
.mai-thesis-g-3 { grid-column: 2; grid-row: 2; }
.mai-thesis-g-4 { grid-column: 1 / -1; grid-row: 3; display: block; }
.mai-thesis-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mai-thesis-lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.mai-thesis-body b { color: var(--fg); font-weight: 600; }

.mai-thesis-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mai-thesis-counter-k {
  font-family: var(--font-display, var(--font-sans));
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.mai-thesis-counter-label {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
}

.mai-thesis-not {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in oklab, var(--bg-2) 70%, transparent);
}
.mai-thesis-not-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  color: var(--fg);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.mai-thesis-not-x {
  color: #ef4444;
  font-weight: 600;
}
.mai-thesis-not-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.mai-thesis-not-list li {
  font-size: 15px;
  padding-left: 22px;
  position: relative;
  color: var(--fg-soft);
}
.mai-thesis-not-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--fg-muted);
}
.mai-thesis-not-foot {
  font-size: 13.5px;
  color: var(--fg-muted);
  font-style: normal;
  margin: 0;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* =========== Thesis tighter rhythm (FB + GA share this) =========== */
.mai-thesis-body { gap: 14px; }
.mai-thesis-lede { font-size: 20px; line-height: 1.4; }
.mai-thesis-body p { margin: 0; }
.mai-thesis-counters { margin: 4px 0 6px; padding: 18px 0; }
.mai-thesis-not { margin-top: 6px; padding: 18px 20px; }
.mai-thesis-not-head { margin-bottom: 10px; }
.mai-thesis-not-list { gap: 6px; margin: 0 0 10px; }
.mai-thesis-not-list li { font-size: 14px; line-height: 1.45; }
.mai-thesis-not-foot { font-size: 13px; line-height: 1.5; padding-top: 10px; }
/* Cap gallery so left images don't tower when right col is short */
.mai-thesis-gallery-wrap { margin-top: 28px; max-height: 560px; }

/* =========== Services grid =========== */
.mai-services { padding: 120px 0 100px; border-top: 1px solid var(--border); background: var(--bg-2); }
.mai-services-head { max-width: 880px; margin-bottom: 56px; }
.mai-services-lede {
  font-size: 17px; line-height: 1.55; color: var(--fg-soft);
  margin-top: 20px; max-width: 56ch;
}
.mai-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.mai-service {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  transition: background 200ms ease;
}
.mai-service:hover { background: color-mix(in oklab, var(--bg) 94%, var(--accent)); }
.mai-service-top {
  display: flex; justify-content: space-between; align-items: center;
}
.mai-service-n {
  font-size: 10.5px; color: var(--fg-muted); letter-spacing: 0.12em;
}
.mai-service-chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  color: var(--fg-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mai-service-title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 4px 0 0;
  color: var(--fg);
}
.mai-service-body {
  font-size: 14.5px; line-height: 1.55; color: var(--fg-soft); margin: 0;
}
.mai-service-bullets {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.mai-service-bullets li {
  font-size: 13.5px; color: var(--fg-soft);
  display: flex; align-items: flex-start; gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.mai-service-bullets li:last-child { border-bottom: none; }
.mai-service-bullets .tick {
  color: var(--accent); font-weight: 600; flex-shrink: 0;
}
.mai-service-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========== Benchmarks =========== */
.mai-benchmarks { padding: 120px 0; border-top: 1px solid var(--border); background: var(--bg-2); }
.mai-benchmarks-head { max-width: 880px; margin-bottom: 56px; }
.mai-benchmarks-lede {
  font-size: 17px; line-height: 1.55; color: var(--fg-soft);
  margin-top: 20px; max-width: 62ch;
}

.mai-benchmarks-table {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}
.mai-bench-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr 1.2fr;
  gap: 16px;
  padding: 20px 24px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.mai-bench-row:last-child { border-bottom: none; }
.mai-bench-head {
  background: color-mix(in oklab, var(--bg) 80%, var(--bg-2));
}
.mai-bench-head .mai-bench-cell {
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.mai-bench-cell {
  font-size: 14px;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.mai-bench-cell-v { gap: 4px; }
.mai-bench-vname {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}
.mai-bench-vnote {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  text-transform: none;
}
.mai-bench-cell-roas {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}
.mai-benchmarks-foot {
  margin: 20px 0 0;
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  text-align: center;
}

/* =========== Account / rhythm =========== */
.mai-account { padding: 120px 0; border-top: 1px solid var(--border); background: var(--bg); }
.mai-account-head { max-width: 880px; margin-bottom: 56px; }
.mai-account-lede {
  font-size: 17px; line-height: 1.55; color: var(--fg-soft);
  margin-top: 20px; max-width: 60ch;
}
.mai-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.mai-account-rhythm, .mai-account-principles {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  background: color-mix(in oklab, var(--bg-2) 80%, transparent);
}
.mai-account-rhythm-label {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}
.mai-rhythm-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.mai-rhythm-row:first-of-type { border-top: none; }
.mai-rhythm-day {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}
.mai-rhythm-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}
.mai-rhythm-body p {
  font-size: 13.5px;
  color: var(--fg-soft);
  line-height: 1.5;
  margin: 0;
}

.mai-principle {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.mai-principle:first-of-type { border-top: none; }
.mai-principle-n {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  padding-top: 3px;
}
.mai-principle-t {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
  line-height: 1.25;
}
.mai-principle-b {
  font-size: 13.5px;
  color: var(--fg-soft);
  line-height: 1.55;
  margin: 0;
}

/* =========== Myths =========== */
.mai-myths { padding: 120px 0 0; border-top: 1px solid var(--border); background: var(--bg-2); }
.mai-myths-head { max-width: 880px; margin-bottom: 56px; }
.mai-myths-lede {
  font-size: 17px; line-height: 1.55; color: var(--fg-soft);
  margin-top: 20px; max-width: 60ch;
}
.mai-myths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 120px;
}
.mai-myths-hero {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #0E0E10;
  border-top: 1px solid var(--border);
}
.mai-myths-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mai-myth {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}
.mai-myth-n {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
}
.mai-myth-label {
  display: inline-block;
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.mai-myth-myth {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.3;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  text-decoration: line-through;
  text-decoration-color: rgba(239,68,68,0.55);
  text-decoration-thickness: 2px;
}
.mai-myth-truth {
  font-size: 14.5px;
  color: var(--fg-soft);
  line-height: 1.6;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* =========== Results strip =========== */
.mai-results { padding: 120px 0 80px; border-top: 1px solid var(--border); background: var(--bg); }
.mai-results-head { max-width: 880px; margin-bottom: 56px; }
.mai-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.mai-result {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--bg-2) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mai-result-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
}
.mai-result-logo {
  font-family: var(--font-display, var(--font-sans));
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.mai-result-vertical {
  color: var(--fg-muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mai-result-head {
  font-family: var(--font-display, var(--font-sans));
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  color: var(--fg);
}
.mai-result-body {
  font-size: 13.5px; line-height: 1.55; color: var(--fg-soft);
  margin: 0;
}
.mai-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 18px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.mai-result-stat-v {
  font-family: var(--font-display, var(--font-sans));
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--fg);
}
.mai-result-stat-l {
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.mai-results-foot {
  display: flex; justify-content: center; padding-top: 20px;
}

/* =========== FAQ =========== */
.mai-faq { padding: 120px 0; border-top: 1px solid var(--border); background: var(--bg-2); }
.mai-faq-head { max-width: 880px; margin-bottom: 56px; }
.mai-faq-list {
  border-top: 1px solid var(--border);
}
.mai-faq-item {
  border-bottom: 1px solid var(--border);
}
.mai-faq-q {
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 50px 1fr 30px;
  gap: 16px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  color: var(--fg);
  font-family: inherit;
}
.mai-faq-n {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
}
.mai-faq-q-text {
  font-family: var(--font-display, var(--font-sans));
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.mai-faq-plus {
  font-size: 22px;
  font-weight: 300;
  color: var(--fg-muted);
  text-align: center;
}
.mai-faq-item-open .mai-faq-plus { color: var(--accent); }
.mai-faq-a {
  padding: 0 0 28px 66px;
}
.mai-faq-a p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg-soft);
  margin: 0;
  max-width: 72ch;
}

/* =========== Responsive =========== */
@media (max-width: 1100px) {
  .mai-thesis-grid { grid-template-columns: 1fr; }
  .mai-thesis-head { height: auto; }
  .mai-thesis-gallery-wrap {
    position: static;
    height: 420px;
    max-height: none;
    flex: 0 0 auto;
    width: 100%;
    max-width: 560px;
  }
  .mai-thesis-gallery {
    position: relative;
    inset: auto;
    height: 420px;
    width: 100%;
  }
  .mai-services-grid { grid-template-columns: repeat(2, 1fr); }
  .mai-account-grid { grid-template-columns: 1fr; }
  .mai-myths-grid { grid-template-columns: 1fr; }
  .mai-results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .mai-thesis, .mai-services, .mai-lenses, .mai-benchmarks, .mai-process, .mai-account, .mai-myths, .mai-results, .mai-faq {
    padding: 80px 0;
  }
  .mai-services-grid { grid-template-columns: 1fr; }
  .mai-thesis-counters { grid-template-columns: 1fr; gap: 16px; }
  .mai-bench-row { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .mai-bench-row .mai-bench-cell-v { grid-column: span 2; }
  .mai-bench-head { display: none; }
  .mai-bench-cell { font-size: 13px; }
  .mai-myth { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
  .mai-myth-myth { font-size: 16px; }
  .mai-faq-q { grid-template-columns: 36px 1fr 24px; gap: 12px; padding: 18px 0; }
  .mai-faq-q-text { font-size: 17px; }
  .mai-faq-a { padding-left: 48px; padding-bottom: 22px; }
}

/* ============= MOBILE FIXES (≤760px) ============= */
@media (max-width: 760px) {
  .mai-hero-grid { grid-template-columns: 1fr !important; }
  .mai-thesis-gallery,
  .mai-thesis-counters { grid-template-columns: 1fr 1fr !important; }
  .mai-services-grid,
  .mai-myths-grid,
  .mai-results-grid { grid-template-columns: 1fr !important; }
  .pa-hero-head, .mai-hero-head { font-size: clamp(38px, 11vw, 56px) !important; }
}

/* =========== Shared viz shell (hero panel) =========== */
.mai-viz {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--bg-2) 96%, #000);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.32);
  font-size: 11.5px;
  align-self: start;
  width: 100%;
}
[data-theme="light"] .mai-viz {
  background: #fff;
  box-shadow: 0 24px 56px rgba(14,20,36,0.10), 0 2px 8px rgba(14,20,36,0.04);
}
.mai-viz-chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 78%, var(--bg-2));
}
.mai-viz-chrome-left { display: flex; align-items: center; gap: 10px; }
.mai-viz-chrome-mark {
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--accent) 60%, #000);
  flex-shrink: 0;
}
.mai-viz-chrome-title { font-size: 11.5px; color: var(--fg); font-weight: 500; }
.mai-viz-chrome-range {
  font-size: 10px; color: var(--fg-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border: 1px dashed var(--border-strong, var(--border)); border-radius: 999px;
}
.mai-viz-tabs {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.mai-viz-tab { font-size: 10.5px; color: var(--fg-muted); padding: 4px 0; border-bottom: 1.5px solid transparent; }
.mai-viz-tab-active { color: var(--fg); border-bottom-color: var(--accent); }
.mai-viz-tab-tail { margin-left: auto; font-size: 10px; color: var(--fg-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.mai-viz-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in oklab, var(--bg) 80%, var(--bg-2));
}
.mai-viz-foot-stats { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--fg-soft); flex-wrap: wrap; }
.mai-viz-foot-stats b { color: var(--fg); font-weight: 600; }
.mai-viz-sep { color: var(--fg-muted); }
.mai-viz-foot-sync {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--fg-muted); letter-spacing: 0.06em; text-transform: uppercase;
}
.mai-viz-foot-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  animation: maiPulse 1.8s ease-in-out infinite;
}
@keyframes maiPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* =========== Thesis honesty-block links =========== */
.mai-thesis-not-foot a,
.mai-thesis-body a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }

/* =========== Results — real case studies (image + link) =========== */
.mai-results-lede {
  font-size: 17px; line-height: 1.55; color: var(--fg-soft);
  margin-top: 20px; max-width: 60ch;
}
.mai-result { color: inherit; text-decoration: none; transition: border-color 200ms ease, transform 200ms ease; }
.mai-result:hover { border-color: var(--border-strong, var(--fg-muted)); transform: translateY(-2px); }
.mai-result-img {
  margin: -28px -28px 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.mai-result-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms ease; }
.mai-result:hover .mai-result-img img { transform: scale(1.04); }
.mai-result-logo { font-size: 13px; }
.mai-result-link {
  font-size: 10.5px; color: var(--fg); letter-spacing: 0.06em; text-transform: uppercase;
  padding-top: 4px;
}
.mai-result:hover .mai-result-link { color: var(--accent); }
[data-theme="light"] .mai-result:hover .mai-result-link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); }

/* =========== FAQ — heading wrapper reset (answers always in DOM) =========== */
.mai-faq-h { margin: 0; font: inherit; }
.mai-faq-a[hidden] { display: none; }

/* =========== Hero viz — workflow run log =========== */
.mai-viz-steps { list-style: none; margin: 0; padding: 6px 0; position: relative; }
.mai-viz-step {
  display: grid;
  grid-template-columns: 74px 14px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  position: relative;
}
.mai-viz-step + .mai-viz-step::before {
  content: '';
  position: absolute;
  left: calc(14px + 74px + 12px + 6px);
  top: -9px; height: 18px; width: 1.5px;
  background: var(--border);
}
.mai-viz-t { font-size: 10px; color: var(--fg-muted); letter-spacing: 0.04em; white-space: nowrap; }
.mai-viz-node { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--border-strong, var(--fg-muted)); background: var(--bg); box-sizing: border-box; position: relative; z-index: 1; }
.mai-viz-node-done { background: #22c55e; border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.16); }
.mai-viz-node-human { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); }
.mai-viz-node-wait { border-style: dashed; }
.mai-viz-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mai-viz-step-name { font-size: 12px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mai-viz-step-meta { font-size: 10px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mai-viz-step-wait .mai-viz-step-name { color: var(--fg-soft); }
.mai-viz-step-human { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.mai-viz-human {
  display: inline-flex; padding: 2px 7px;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
}
[data-theme="light"] .mai-viz-human { background: var(--accent); color: var(--accent-ink, #0E0E10); }

/* =========== Services — 3x3 grid + linked notes =========== */
.mai-service-note-link { color: var(--fg-soft); text-decoration: none; transition: color 150ms ease; }
.mai-service-note-link:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* =========== Stack table (3 columns) =========== */
.mai-benchmarks { background: var(--bg); }
.mai-bench-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.4fr); }
.mai-bench-cell { font-size: 14px; line-height: 1.5; color: var(--fg-soft); display: block; }
.mai-bench-cell-v { display: flex; color: var(--fg); }
.mai-bench-cell-when { color: var(--fg-muted); font-size: 13.5px; }
.mai-benchmarks-table { background: color-mix(in oklab, var(--bg-2) 70%, transparent); }

/* =========== Guardrails — the split =========== */
.mai-account { background: var(--bg-2); }
.mai-account .mai-account-rhythm, .mai-account .mai-account-principles { background: var(--bg); }
.mai-split-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--border);
}
.mai-split-row:first-of-type { border-top: none; }
.mai-split-k {
  align-self: start;
  display: inline-flex; justify-content: center;
  padding: 4px 8px; border-radius: 999px;
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--fg-soft);
}
.mai-split-k-auto { border-color: #22c55e; color: #22c55e; }
.mai-split-k-assist { border-color: var(--border-strong, var(--fg-muted)); border-style: dashed; color: var(--fg); }
.mai-split-k-human { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #0E0E10); }
.mai-split-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mai-split-list li { font-size: 14px; line-height: 1.45; color: var(--fg-soft); padding-left: 18px; position: relative; }
.mai-split-list li::before { content: '—'; position: absolute; left: 0; color: var(--fg-muted); }

/* =========== Process (reuses account layout) =========== */
.mai-process { padding: 120px 0; border-top: 1px solid var(--border); background: var(--bg); }

@media (max-width: 760px) {
  .mai-viz { display: none; }
  .mai-bench-row { grid-template-columns: 1fr; gap: 8px; }
  .mai-bench-row .mai-bench-cell-v { grid-column: auto; }
  .mai-split-row { grid-template-columns: 1fr; gap: 10px; }
  .mai-split-k { justify-self: start; }
}

/* Accent hero keeps the panel's own palette — the hero's accent-ink tint must not reach
   inside the dark-mode panel, or its mono labels disappear against the dark card. */
.mai-hero-accent .mai-viz .mono { color: var(--fg-muted) !important; }
.mai-hero-accent .mai-viz .mai-viz-chrome-title,
.mai-hero-accent .mai-viz .mai-viz-tab-active,
.mai-hero-accent .mai-viz .mai-viz-foot-stats b { color: var(--fg) !important; }
.mai-hero-accent .mai-viz .mai-viz-foot-stats { color: var(--fg-soft) !important; }
.mai-hero-accent .mai-viz .mai-viz-human { color: var(--accent) !important; }
[data-theme="light"] .mai-hero-accent .mai-viz .mai-viz-human { color: var(--accent-ink, #0E0E10) !important; }
