/* The interactive explainers: one per solution page, plus the autonomy slider.
 *
 * SVG and the page's own tokens, no chart library. Every one of them has a text alternative in the
 * DOM, works from the keyboard, and shows its end state rather than animating for a visitor who
 * asked for less motion.
 *
 * Prefixed ex- so nothing here can collide with the site's own classes.
 */

.ex {
  border: 1px solid var(--line, #e8eaf0);
  border-radius: 16px;
  background: var(--paper, #fff);
  padding: 22px 24px 20px;
  margin-top: 26px;
}

.ex-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ex-title {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink, #0b0f19);
}

/* Required on every explainer: these are drawings of how it works, not measurements. */
.ex-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--s7, #6a7284);
  border: 1px solid var(--line, #e8eaf0);
  border-radius: 999px;
  padding: 3px 9px;
}

.ex svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ex-ctl {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ex-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink, #0b0f19);
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e8eaf0);
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  min-height: 40px;
  transition: .16s ease;
}

.ex-btn:hover {
  border-color: #d4d8e2;
  background: var(--mist, #f7f8fa);
}

.ex-btn:focus-visible {
  outline: 2px solid var(--accent, #2f5fe6);
  outline-offset: 2px;
}

.ex-btn[aria-pressed="true"] {
  background: var(--ink, #0b0f19);
  border-color: var(--ink, #0b0f19);
  color: #fff;
}

.ex-range {
  flex: 1 1 200px;
  min-width: 160px;
  accent-color: var(--accent, #2f5fe6);
  height: 40px;
}

.ex-range:focus-visible {
  outline: 2px solid var(--accent, #2f5fe6);
  outline-offset: 3px;
}

.ex-read {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--s6, #545c6e);
}

/* The text alternative. In the DOM for everyone, shown to a screen reader, and shown on screen
   when the visitor has asked for less motion, because then the picture does not move at all. */
.ex-alt {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--s7, #6a7284);
  margin-top: 14px;
  border-top: 1px solid var(--line2, #eef0f5);
  padding-top: 12px;
}

/* Stepper, for the billing chase. */
.ex-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ex-step {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--s6, #545c6e);
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e8eaf0);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  min-height: 40px;
  transition: .16s ease;
}

.ex-step[aria-current="true"] {
  background: var(--accent-soft, #eef3fe);
  border-color: var(--accent, #2f5fe6);
  color: var(--accent-d, #2249c9);
}

.ex-step.is-done {
  color: var(--ink, #0b0f19);
}

.ex-step:focus-visible {
  outline: 2px solid var(--accent, #2f5fe6);
  outline-offset: 2px;
}

/* The autonomy slider's row list. */
.ex-rows {
  margin-top: 16px;
  border: 1px solid var(--line, #e8eaf0);
  border-radius: 12px;
  overflow: hidden;
}

.ex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 15px;
  border-top: 1px solid var(--line2, #eef0f5);
  font-size: 14.5px;
  color: var(--ink, #0b0f19);
}

.ex-row:first-child {
  border-top: 0;
}

.ex-state {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ex-state.needs {
  color: #b25e00;
}

.ex-state.did {
  color: #0f8f5e;
}

@media (max-width: 767px) {
  .ex {
    padding: 18px 16px 16px;
  }

  .ex-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Less motion: the picture holds its finished state and the words below carry the rest. */
@media (prefers-reduced-motion: reduce) {
  .ex [data-anim] {
    animation: none !important;
    transition: none !important;
  }
}
