/* Source-system CRM migration pages (CHK-18):
   /services/{attio,pipedrive,salesforce,close}-to-hubspot-migration.html
   Shared by all four pages. Nav CSS stays inlined per page like every other
   non-insights page; only the page body lives here. Tokens only, no new colours. */

/* ========== Hero + answer block ========== */
.mig-hero {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-3xl);
}
.mig-hero__inner { max-width: 820px; }
.mig-hero__overline { display: block; margin-bottom: var(--space-md); }
.mig-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: var(--space-sm); }
.mig-updated { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: var(--space-xl); }
.mig-updated a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.mig-answer { font-size: 1.125rem; line-height: 1.7; color: var(--text-primary); max-width: 72ch; margin-bottom: var(--space-xl); }
.mig-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.mig-fact {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: var(--space-md) var(--space-lg);
}
.mig-fact__value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; color: var(--accent); }
.mig-fact__label { display: block; font-size: 0.8125rem; line-height: 1.45; color: var(--text-secondary); }
.mig-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }

/* ========== Shared section intro ========== */
.mig-intro { max-width: 720px; margin-bottom: var(--space-xl); }
.mig-intro h2 { margin-bottom: var(--space-md); }
.mig-intro p { font-size: 1.0625rem; line-height: 1.65; color: var(--text-secondary); }
.mig-intro .overline { display: block; margin-bottom: var(--space-sm); }

/* ========== Object map table ========== */
.mig-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; background: var(--bg-card); }
.mig-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: var(--space-md);
}
.mig-table th, .mig-table td { padding: var(--space-md); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.55; }
.mig-table thead th { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); border-bottom: 2px solid var(--border-dark); }
.mig-table tbody th { font-weight: 600; color: var(--text-primary); }
.mig-table td { color: var(--text-secondary); }
.mig-table td.mig-fit { font-weight: 600; color: var(--text-primary); white-space: nowrap; }

/* Below 720px the table stacks into one card per row; the column name is
   repeated from data-label so every cell still says what it is. */
@media (max-width: 720px) {
  .mig-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mig-table, .mig-table caption, .mig-table tbody, .mig-table tr, .mig-table th, .mig-table td { display: block; width: 100%; }
  .mig-table { background: transparent; }
  .mig-table tr { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--space-md); padding: var(--space-sm) 0; }
  .mig-table th, .mig-table td { border-bottom: 0; padding: var(--space-xs) var(--space-md); }
  .mig-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
  }
  .mig-table td.mig-fit { white-space: normal; }
}

/* ========== Phases ========== */
.mig-phases { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-lg); counter-reset: phase; }
.mig-phase { counter-increment: phase; border-top: 3px solid var(--accent); padding-top: var(--space-md); }
.mig-phase::before { content: counter(phase, decimal-leading-zero); display: block; font-family: var(--font-display); font-weight: 700; color: var(--accent); margin-bottom: var(--space-xs); }
.mig-phase h3 { font-size: 1.0625rem; margin-bottom: var(--space-xs); }
.mig-phase p { font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }

/* ========== Risks ========== */
.mig-risks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.mig-risk { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-lg); background: var(--bg-card); padding: var(--space-lg); }
.mig-risk h3 { font-size: 1.0625rem; margin-bottom: var(--space-xs); }
.mig-risk p { font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }

/* ========== Proof ========== */
.mig-proof { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-2xl); align-items: start; }
.mig-proof__body p { font-size: 1.0625rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: var(--space-md); }
.mig-proof__body blockquote { border-left: 3px solid var(--accent); padding-left: var(--space-lg); margin: var(--space-lg) 0; font-style: italic; color: var(--text-primary); line-height: 1.65; }
.mig-proof__body cite { display: block; font-style: normal; font-size: 0.875rem; color: var(--text-secondary); margin-top: var(--space-xs); }
.mig-proof__link { color: var(--accent); font-weight: 500; }
.mig-stats { list-style: none; padding: var(--space-lg); margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); display: flex; flex-direction: column; gap: var(--space-md); }
.mig-stats li { font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); padding-bottom: var(--space-md); border-bottom: 1px solid var(--border); }
.mig-stats li:last-child { padding-bottom: 0; border-bottom: 0; }
.mig-stats strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); }

/* ========== FAQ ========== */
.mig-faq { max-width: 760px; display: flex; flex-direction: column; gap: var(--space-lg); }
.mig-faq h3 { font-size: 1.0625rem; margin-bottom: var(--space-xs); }
.mig-faq p { font-size: 0.9375rem; line-height: 1.65; color: var(--text-secondary); }

/* ========== Go deeper ========== */
.mig-reading { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
.mig-reading a { display: block; height: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); padding: var(--space-lg); color: inherit; transition: border-color var(--transition-fast); }
.mig-reading a:hover, .mig-reading a:focus-visible { border-color: var(--accent); }
.mig-reading strong { display: block; color: var(--text-primary); margin-bottom: var(--space-xs); line-height: 1.4; }
.mig-reading span { display: block; font-size: 0.875rem; line-height: 1.55; color: var(--text-secondary); }
.mig-sources { margin-top: var(--space-xl); font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.8; }
.mig-sources a { color: var(--accent); font-weight: 500; margin-right: var(--space-md); }

/* ========== CTA ========== */
.mig-cta { max-width: 640px; margin-inline: auto; text-align: center; }
.mig-cta h2 { margin-bottom: var(--space-lg); }
.mig-cta p { margin-bottom: var(--space-xl); }

@media (max-width: 1024px) {
  .mig-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mig-reading { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .mig-facts, .mig-phases, .mig-risks, .mig-reading, .mig-proof { grid-template-columns: minmax(0, 1fr); }
  .mig-proof { gap: var(--space-xl); }
}
