/* ============================================
   Churn Solution — HubSpot integration
   Page styles, on top of style.css
   ============================================ */
/* ============================================
   SYNCED DATA (what Churn Solution sends to HubSpot)
   ============================================ */
:is(#root, #root-end) .sync-section {
  background: var(--ink-50);
}
:is(#root, #root-end) .sync {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
:is(#root, #root-end) .sync-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:is(#root, #root-end) .sync-copy p {
  font-size: 16.5px;
  color: var(--ink-600);
  text-wrap: pretty;
}
:is(#root, #root-end) .sync-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  font-size: 15.5px;
}
:is(#root, #root-end) .sync-table th,
:is(#root, #root-end) .sync-table td {
  padding: 17px 24px;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--ink-200);
  background: var(--paper);
}
:is(#root, #root-end) .sync-table tr:last-child > * {
  border-bottom: 0;
}
:is(#root, #root-end) .sync-table thead th {
  background: var(--violet-800);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
:is(#root, #root-end) .sync-table tbody th {
  width: 40%;
  font-weight: 600;
  color: var(--violet-800);
}
:is(#root, #root-end) .sync-table td {
  color: var(--ink-600);
}

/* Frame + shared parts */
:is(#root, #root-end) .mock {
  width: 100%;
  min-width: 0;
  max-width: 600px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  background: var(--ink-100);
  color: var(--violet-800);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
:is(#root, #root-end) .mock.mock-center {
  align-items: center;
  justify-content: center;
}
:is(#root, #root-end) .mock-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--sh-sm);
}
:is(#root, #root-end) .mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
:is(#root, #root-end) :is(.mock-head strong, .mock-title) {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-head span {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-note {
  font-size: 12px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-btn {
  display: block;
  padding: 11px;
  border-radius: 8px;
  background: var(--gold-400);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Colour tones shared by bars, swatches and timeline dots */
:is(#root, #root-end) .mock .is-navy {
  --tone: var(--violet-800);
}
:is(#root, #root-end) .mock .is-navy-soft {
  --tone: color-mix(in srgb, var(--violet-800) 75%, transparent);
}
:is(#root, #root-end) .mock .is-violet {
  --tone: var(--violet-300);
}
:is(#root, #root-end) .mock :is(.is-gold, .is-kept) {
  --tone: var(--gold-400);
}
:is(#root, #root-end) .mock .is-saved {
  --tone: #1b8a45;
}
:is(#root, #root-end) .mock .is-idle {
  --tone: var(--ink-300);
}
:is(#root, #root-end) .mock-fill {
  fill: var(--tone);
}

/* Segmented flows: save-rate dashboard */
:is(#root, #root-end) .mock-rate {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
:is(#root, #root-end) .mock-rate-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
}
:is(#root, #root-end) .mock-rate-label strong {
  font-weight: 700;
}
:is(#root, #root-end) .mock-rate-bar {
  display: block;
}
:is(#root, #root-end) .mock-rate-track {
  fill: var(--ink-100);
}
:is(#root, #root-end) .mock-segments-row {
  display: flex;
  gap: 16px;
}
:is(#root, #root-end) .mock-reasons {
  flex: 1 1 0;
}
:is(#root, #root-end) .mock-stacks {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
:is(#root, #root-end) .mock-stack {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-stack-bar {
  display: block;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}
:is(#root, #root-end) .mock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
:is(#root, #root-end) .mock-swatch {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 3px;
  background: var(--tone);
}
:is(#root, #root-end) .mock-stat {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--grad-b) 0%, var(--grad-c) 100%);
  color: var(--paper);
}
:is(#root, #root-end) .mock-stat span {
  font-size: 12px;
  color: var(--violet-200);
}
:is(#root, #root-end) .mock-stat strong {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--gold-400);
}
:is(#root, #root-end) .mock-spark {
  display: block;
}
:is(#root, #root-end) .mock-spark polyline {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Step 1: Connect to HubSpot card */
:is(#root, #root-end) .mock-connect {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 34px 28px 26px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--sh-md);
  text-align: center;
}
:is(#root, #root-end) .mock-connect-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
}
:is(#root, #root-end) .mock-connect-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
:is(#root, #root-end) .mock-connect strong {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
}
:is(#root, #root-end) .mock-connect p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-400);
}
:is(#root, #root-end) .mock-connect .mock-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
}

/* Steps 2–3: radio options and toggles */
:is(#root, #root-end) .mock-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: var(--paper);
}
:is(#root, #root-end) .mock-option.is-selected {
  padding: 9px 11px;
  border: 2px solid var(--violet-800);
  background: var(--ink-100);
}
:is(#root, #root-end) .mock-radio {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid var(--violet-800);
  border-radius: 50%;
  background: var(--paper);
}
:is(#root, #root-end) .mock-option.is-selected .mock-radio {
  border-width: 4.5px;
}
:is(#root, #root-end) :is(.mock-option, .mock-toggle-row) > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
:is(#root, #root-end) :is(.mock-option, .mock-toggle-row) strong {
  font-size: 13px;
  font-weight: 700;
}
:is(#root, #root-end) :is(.mock-option, .mock-toggle-row) > div span {
  font-size: 11px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-200);
}
:is(#root, #root-end) .mock-toggle {
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--ink-300);
}
:is(#root, #root-end) .mock-toggle.is-on {
  background: var(--violet-800);
}
:is(#root, #root-end) .mock-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
}
:is(#root, #root-end) .mock-toggle.is-on::after {
  left: 17px;
}

/* Step 4: Churn Solution properties on a HubSpot contact */
:is(#root, #root-end) .mock-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}
:is(#root, #root-end) .mock-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--violet-800);
  color: var(--paper) !important;
  font-size: 14px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-contact > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
:is(#root, #root-end) .mock-contact strong {
  font-size: 15px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-contact span {
  font-size: 12px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-subtitle {
  font-size: 12px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-property {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-200);
}
:is(#root, #root-end) .mock-property span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-property strong {
  font-size: 13px;
  font-weight: 600;
}

/* Step 5: activity timeline */
:is(#root, #root-end) .mock-timeline {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}
:is(#root, #root-end) .mock-event {
  position: relative;
  display: flex;
  gap: 12px;
}
:is(#root, #root-end) .mock-event:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 15px;
  bottom: -3px;
  width: 2px;
  background: var(--ink-200);
}
:is(#root, #root-end) .mock-dot {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--tone);
}
:is(#root, #root-end) .mock-event > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 14px;
}
:is(#root, #root-end) .mock-event:last-child > div {
  padding-bottom: 0;
}
:is(#root, #root-end) .mock-event strong {
  font-size: 13px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-event span {
  font-size: 12px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-event small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-400);
}

@media (max-width: 600px) {
  :is(#root, #root-end) .mock {
    padding: 14px;
  }
  :is(#root, #root-end) .mock-card {
    padding: 14px;
  }
  :is(#root, #root-end) .mock-head {
    flex-wrap: wrap;
  }
  :is(#root, #root-end) .mock-segments-row {
    flex-direction: column;
  }
  :is(#root, #root-end) .mock-stat {
    width: auto;
  }
  :is(#root, #root-end) .mock-connect {
    padding: 26px 18px 20px;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1080px) {
  :is(#root, #root-end) .sync {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 600px) {
  :is(#root, #root-end) .sync-table th,
  :is(#root, #root-end) .sync-table td {
    padding: 14px 16px;
  }
}
