.tb-exhibits {
  --tb-line: #b4bcc2;
  background: var(--paper);
  color: var(--tb-ink);
  color-scheme: light;
}

/* Lighter fills echo the native tools. Darker strokes hold up on the paper background. */
#sentinel { --tb-accent: #257cb1; --tb-tint: #c6eee9; }
#service-status { --tb-accent: #36865c; }
#sessions { --tb-accent: #2b817b; --tb-tint: #bbebe5; }
#awake { --tb-accent: #957231; --tb-tint: #f4edda; }
#network-probe { --tb-accent: #33867e; }

.tb-exhibit {
  --tb-direction: 1;
  scroll-margin-top: var(--header-height);
  overflow: clip;
}

.tb-exhibit:nth-child(even) { --tb-direction: -1; }

.tb-exhibit-inner {
  width: min(76rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "copy illustration";
  align-items: center;
  gap: clamp(2rem, 6.5vw, 7rem);
  padding-block: clamp(3rem, 5.8vw, 5.5rem);
  border-top: 1px solid var(--tb-divider);
}

.tb-exhibit:nth-child(even) .tb-exhibit-inner {
  grid-template-areas: "illustration copy";
}

.tb-exhibit-copy { grid-area: copy; }
.tb-exhibit-copy h3 {
  margin: 0;
  font-size: clamp(2.15rem, 3.65vw, 3.65rem);
  font-weight: 630;
  line-height: 1.12;
  letter-spacing: -.038em;
  text-wrap: balance;
}

.tb-exhibit-copy p {
  max-width: 41ch;
  margin: 1.15rem 0 0;
  font-size: clamp(1.0625rem, 1.38vw, 1.25rem);
  line-height: 1.7;
  color: var(--tb-muted);
  text-wrap: pretty;
}

.tb-illustration {
  grid-area: illustration;
  justify-self: center;
  margin: 0;
  width: min(100%, 29rem);
}

.tb-illustration svg {
  width: 100%;
  height: auto;
  display: block;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tb-illustration text {
  fill: var(--tb-ink);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -.01em;
}

.tb-rule { stroke: var(--tb-line); stroke-width: 1; }
.tb-accent, .tb-day-arc { stroke: var(--tb-accent); stroke-width: 1.7; }
.tb-dot { fill: var(--tb-accent); }
.tb-wash { fill: var(--tb-tint); }
.tb-echo { fill: var(--paper); stroke: var(--tb-accent); stroke-width: 1.5; }
.tb-echo circle:first-child { stroke: #8c66c4; }
.tb-radar-hand { transform-origin: 123px 103px; }
.tb-record, .tb-interruption { stroke: var(--tb-accent); stroke-width: 4; }
.tb-interruption { stroke: #c46b25; stroke-width: 5; stroke-dasharray: 3 3; stroke-linecap: butt; }
.tb-cursor { --tb-accent: #626e68; }
.tb-tile { fill: #e5dff9; stroke: #8672a7; stroke-width: 1; }
.tb-tile:nth-child(3n) { fill: #efeaf9; }
.tb-tile-archived { fill: var(--tb-tint); stroke: var(--tb-accent); }
.tb-laptop { fill: var(--paper); stroke: var(--tb-ink); stroke-width: 1.7; }
.tb-laptop .tb-accent { fill: none; stroke: #368a7e; }
.tb-solar { transform-origin: 180px 148px; transform: rotate(56deg); }
.tb-sun { fill: var(--tb-tint); stroke: var(--tb-accent); stroke-width: 1.8; }
.tb-endpoints { fill: var(--paper); stroke: var(--tb-accent); stroke-width: 1.5; }
.tb-request-step { stroke: var(--tb-accent); stroke-width: 5; }
.tb-request-total { stroke: var(--tb-ink); stroke-width: 1.7; }

@media (prefers-reduced-motion: no-preference) {
  html.toolbox-motion .tb-exhibit { --tb-progress: var(--tool-progress, 1); }

  html.toolbox-motion .tb-exhibit-copy,
  html.toolbox-motion .tb-illustration {
    opacity: clamp(.2, var(--tb-progress) * 1.9, 1);
  }
  html.toolbox-motion .tb-exhibit-copy {
    transform: translateX(calc((1 - var(--tb-progress)) * -1.5rem * var(--tb-direction)));
  }
  html.toolbox-motion .tb-illustration {
    transform: translateX(calc((1 - var(--tb-progress)) * 1.5rem * var(--tb-direction)));
  }

  html.toolbox-motion .tb-radar-hand { transform: rotate(calc((var(--tb-progress) - 1) * 160deg)); }
  html.toolbox-motion .tb-echo { opacity: clamp(.1, (var(--tb-progress) - .2) * 1.8, 1); }
  html.toolbox-motion .tb-status-series { clip-path: inset(0 calc(100% - 100% * var(--tb-progress)) 0 0) stroke-box; }
  html.toolbox-motion .tb-cursor { transform: translateX(calc((var(--tb-progress) - 1) * 196px)); }
  html.toolbox-motion .tb-tile {
    --tile-open: clamp(0, var(--tb-progress) * 1.8 - var(--tile-index) * .11, 1);
    transform-box: fill-box;
    transform-origin: top left;
    transform: scale(var(--tile-open));
  }
  html.toolbox-motion .tb-map-details { opacity: clamp(0, (var(--tb-progress) - .3) * 2, 1); }
  html.toolbox-motion .tb-solar { transform: rotate(calc(-77deg + var(--tb-progress) * 133deg)); }
  html.toolbox-motion .tb-draw,
  html.toolbox-motion .tb-request-step {
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--tb-progress));
  }
  html.toolbox-motion .tb-request-step {
    stroke-dashoffset: calc(1 - clamp(0, var(--tb-progress) * 2 - var(--phase) * .4, 1));
  }
  html.toolbox-motion .tb-request-end { opacity: clamp(0, (var(--tb-progress) - .8) * 5, 1); }
}

@media (max-width: 46rem) {
  .tb-exhibit .tb-exhibit-inner,
  .tb-exhibit:nth-child(even) .tb-exhibit-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "illustration";
    gap: 2.1rem;
    padding-block: 3.4rem;
  }
  .tb-illustration { width: min(100%, 24rem); }
}
