.tools-illustration {
  --ti-paper: #fafbfe;
  --ti-white: #fffefa;
  --ti-ink: var(--ink, #0c173b);
  --ti-blue: var(--accent, #0757ed);
  --ti-rust: #a64f36;
  --ti-line: #b8c1ce;
  box-sizing: border-box;
  width: 100%;
  max-width: 700px;
  margin: 0;
  color: var(--ti-ink);
  font-family: inherit;
  container-type: inline-size;
}

.tools-illustration *,
.tools-illustration *::before,
.tools-illustration *::after { box-sizing: border-box; }

.tools-illustration__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 370;
  isolation: isolate;
}

.tools-illustration__connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tools-illustration__route {
  stroke: var(--ti-line);
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke 220ms ease, stroke-width 220ms ease;
}

.tools-illustration__route.is-selected {
  stroke: var(--ti-blue);
  stroke-width: 2.4;
}

.tools-illustration__port { fill: var(--ti-blue); }

.tools-illustration__tool {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  width: 23%;
  min-height: 0;
  height: 26%;
  padding: 10px 5px;
  border: 1px solid #dcdedc;
  border-radius: 7px;
  background: var(--ti-white);
  color: var(--ti-ink);
  font: inherit;
  font-size: clamp(11px, 2.2cqw, 14px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 3px 9px #172b4705;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.tools-illustration__tool--email { top: 11.6%; left: 1%; }
.tools-illustration__tool--documents { top: 11.6%; right: 1%; }
.tools-illustration__tool--spreadsheets { bottom: 11.6%; left: 1%; }
.tools-illustration__tool--crm { bottom: 11.6%; right: 1%; }

.tools-illustration__tool:hover {
  border-color: #8d9dba;
  background: #ffffff;
}

.tools-illustration__tool[aria-pressed="true"] {
  border-color: var(--ti-blue);
  box-shadow: 0 0 0 1px var(--ti-blue);
}

.tools-illustration__tool:focus-visible {
  outline: 3px solid var(--ti-blue);
  outline-offset: 5px;
}

.tools-illustration__icon {
  display: block;
  width: clamp(24px, 4.8cqw, 31px);
  height: clamp(24px, 4.8cqw, 31px);
  color: var(--ti-blue);
}

.tools-illustration__tool--documents .tools-illustration__icon,
.tools-illustration__tool--crm .tools-illustration__icon { color: var(--ti-rust); }

.tools-illustration__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-illustration__record {
  position: absolute;
  top: 22%;
  left: 35%;
  width: 30%;
  height: 56%;
  display: flex;
  flex-direction: column;
  padding: clamp(10px, 3cqw, 22px) clamp(8px, 3cqw, 20px);
  border: 1px solid #a9b6ce;
  border-top: 3px solid var(--ti-blue);
  border-radius: 3px;
  background: var(--ti-white);
  box-shadow: 0 8px 20px #172b4707;
}

.tools-illustration__record-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(11px, 2.4cqw, 16px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.tools-illustration__record-heading svg {
  flex: 0 0 auto;
  width: 19px;
  height: 21px;
  stroke: var(--ti-blue);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.tools-illustration__record-items {
  display: flex;
  flex: 1;
  justify-content: center;
  flex-direction: column;
  gap: clamp(7px, 2.2cqw, 14px);
  list-style: none;
  margin: clamp(8px, 2cqw, 13px) 0 clamp(7px, 1.6cqw, 10px);
  padding: 0;
  font-size: clamp(10px, 2cqw, 13px);
  line-height: 1.2;
}

.tools-illustration__record-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.tools-illustration__record-mark {
  display: inline-block;
  width: 9px;
  color: #7c8ba0;
  font-size: 5px;
  text-align: center;
}

.tools-illustration__record-mark--action {
  color: var(--ti-rust);
  font-size: 14px;
  line-height: 0.6;
}

.tools-illustration__record-foot {
  display: block;
  color: #5b687a;
  font-size: clamp(8px, 1.5cqw, 10px);
  line-height: 1.3;
}

.tools-illustration__caption {
  padding: 0 8%;
  text-align: center;
}

.tools-illustration__status {
  min-height: 2.8em;
  max-width: 420px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.5;
  color: #4d5b6e;
}

.tools-illustration__example {
  display: block;
  margin-top: 6px;
  color: #66717e;
  font-size: 11px;
  line-height: 1.4;
}

.tools-illustration--ready .tools-illustration__route {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.tools-illustration--visible .tools-illustration__route {
  animation: tools-illustration-connect 800ms cubic-bezier(.25, .65, .3, 1) both;
}

.tools-illustration--visible [data-route="documents"] { animation-delay: 100ms; }
.tools-illustration--visible [data-route="spreadsheets"] { animation-delay: 200ms; }
.tools-illustration--visible [data-route="crm"] { animation-delay: 300ms; }

@keyframes tools-illustration-connect { to { stroke-dashoffset: 0; } }

@media (max-width: 480px) {
  .tools-illustration__tool { gap: 6px; }
  .tools-illustration__record { padding: 10px 8px; }
  .tools-illustration__record-heading { gap: 4px; }
  .tools-illustration__record-heading svg { width: 15px; height: 17px; }
  .tools-illustration__record-items { margin: 8px 0; gap: 7px; }
  .tools-illustration__record-items li { gap: 5px; }
  .tools-illustration__record-foot { font-size: 8px; }
  .tools-illustration__caption { padding: 0 5%; }
  .tools-illustration__status { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tools-illustration__route,
  .tools-illustration__tool { transition: none; }
  .tools-illustration--ready .tools-illustration__route,
  .tools-illustration--visible .tools-illustration__route {
    animation: none;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
}
/* Give the useful record labels priority over the secondary caption on phones. */
@media (max-width:480px){
 .tools-illustration__record{left:33%;width:34%;top:20%;height:60%;padding:8px}
 .tools-illustration__record-heading{font-size:12px;justify-content:center}
 .tools-illustration__record-heading svg{display:none}
 .tools-illustration__record-items{font-size:12px;gap:6px;margin:8px 0 3px}
 .tools-illustration__record-foot{display:none}
 .tools-illustration__record-items li{gap:4px}
 .tools-illustration__record-mark{width:6px}
}
