/* The dashboard teaser in the landing page's teams band (public/index.html, [data-teaser];
   agent-fingerprint docs/landing-redesign.md, "The dashboard teaser"). A small window of the real
   dashboard: its Overview figures, its live Sessions list and its "Top agent families" card, in
   the dashboard's own words and the landing page's tokens (styles.css), light and dark.
   Its classes are dt-…; nothing here touches another band. The rules without a [data-state] are the
   end state: what shows without JavaScript, under prefers-reduced-motion (styles.css stops every
   animation and transition there, and /teaser.js does nothing) and before the band is scrolled to.
   /teaser.js sets data-state (armed, playing, done) and the row classes; only transform and opacity
   move, the rows keep fixed slots and the numbers are tabular, so nothing shifts the layout. */

.dt {
  --dt-row: 3.75rem;
  --dt-ok: #14652f;
  --dt-ok-surface: #edf7ef;
  --dt-ok-stroke: #7cbf8e;
  --dt-wash: var(--bk-accent-wash);
  position: relative;
  min-width: 0;
}
@media (prefers-color-scheme: dark) {
  .dt {
    --dt-ok: #6fd08c;
    --dt-ok-surface: #1f2e24;
    --dt-ok-stroke: #3f7a52;
    --dt-wash: #3a2219;
  }
}
/* A soft orange light behind the window, as the hero's; no wider than the page's gutter, so it
   never makes the page scroll sideways. */
.dt::before {
  content: '';
  position: absolute;
  inset: -2.5rem calc(-1 * var(--gutter));
  z-index: 0;
  background: radial-gradient(60% 55% at 60% 40%, rgb(255 69 0 / 0.13), transparent 72%);
  pointer-events: none;
}

.dt-win {
  position: relative;
  z-index: 1;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: var(--surface-sunken);
  box-shadow:
    0 30px 60px -32px rgb(35 35 35 / 0.45),
    0 2px 6px rgb(35 35 35 / 0.06);
  overflow: clip;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.dt-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--stroke);
  background: var(--surface-raised);
  padding: 0.625rem 0.875rem;
}
.dt-bar__dots {
  display: flex;
  gap: 0.3125rem;
}
.dt-bar__dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--stroke);
}
.dt-bar__title {
  font-weight: 500;
}
.dt-live {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  margin-left: auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dt-live__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--bk-accent);
}
.dt-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
}

/* The Overview's key figures. */
.dt-figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}
.dt-fig,
.dt-card {
  border: 1px solid var(--stroke);
  border-radius: 0.75rem;
  background: var(--surface-raised);
}
.dt-fig {
  padding: 0.75rem 0.875rem 0.8125rem;
}
.dt-fig dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.dt-fig dd {
  margin: 0;
}
.dt-fig__n {
  display: block;
  margin-top: 0.125rem;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
/* Large text: #FF4500 is 3.4:1 on white, 4.2:1 on #2c2c2c. */
.dt-fig--hero .dt-fig__n {
  color: var(--bk-accent);
}
.dt-fig__sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* Agents against people, as one line: its orange part is the agent share. */
.dt-split {
  display: block;
  height: 0.25rem;
  margin-top: 0.4375rem;
  border-radius: 999px;
  background: var(--muted-line);
  overflow: clip;
}
.dt-split__fill {
  display: block;
  width: 18.6%;
  height: 100%;
  background: var(--bk-accent);
  transform-origin: left;
}

.dt-cols {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}
.dt-card {
  min-width: 0;
  overflow: clip;
}
.dt-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6875rem 0.875rem;
}
.dt-card__title {
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
}
/* The Sessions page's Live switch, on. A picture of it: the page has no setting to change. */
.dt-switch {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  color: var(--text-muted);
}
.dt-switch__knob {
  position: relative;
  width: 1.5rem;
  height: 0.875rem;
  border-radius: 999px;
  background: var(--bk-accent);
}
.dt-switch__knob::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  right: 0.125rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--bk-white);
}

/* The live list: newest first, every row the same height (its slot). */
.dt-rows {
  --dt-shift: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: clip;
}
.dt-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 0.3125rem 0.75rem;
  height: var(--dt-row);
  border-top: 1px solid var(--stroke);
  padding-inline: 0.875rem;
  /* While the list fills, the rows that have arrived sit that many slots higher. */
  transform: translateY(calc(var(--dt-shift) * -1 * var(--dt-row)));
}
.dt-row__who {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  min-width: 0;
}
.dt-row__kind {
  color: var(--text-muted);
}
.dt-row__name,
.dt-fam__name {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dt-row__conf {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}
/* The row is the detection and when: who on the left, the time on the right. */
.dt-row__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.dt-row__time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.dt-mark {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--stroke);
  border-radius: 0.375rem;
  background: var(--bk-white);
  object-fit: cover;
}
.dt-mark--svg {
  padding: 0.1875rem;
  object-fit: contain;
}
/* The dashboard's tags: words, never colour alone. */
.dt-tag,
.dt-id {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--stroke);
  border-radius: 0.25rem;
  padding: 0.0625rem 0.3125rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}
.dt-id {
  color: var(--text-muted);
}
.dt-id--ok {
  border-color: var(--dt-ok-stroke);
  background: var(--dt-ok-surface);
  color: var(--dt-ok);
}
.dt-id__icon {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The confidence meter of a session's page: three marks, as many filled as the band has. */
.dt-pips {
  display: flex;
  gap: 0.125rem;
}
.dt-pips i {
  width: 0.5rem;
  height: 0.3125rem;
  border-radius: 999px;
  background: var(--text);
}
.dt-pips--2 i:nth-child(3) {
  background: var(--stroke);
}

/* Top agent families: a bar and a count each. */
.dt-fam__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dt-fam__row {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 5.75rem) minmax(1.5rem, 1fr) 1.875rem;
  align-items: center;
  gap: 0.5rem;
  height: 2rem;
  border-top: 1px solid var(--stroke);
  padding-inline: 0.875rem;
}
.dt-fam__bar {
  height: 0.375rem;
}
.dt-fam__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--bk-accent-light);
  transform-origin: left;
  transform: scaleX(var(--dt-w, 1));
}
/* Each family's sessions against the first's (68): an illustration's numbers (index.html). */
.dt-fam__row:nth-child(2) {
  --dt-w: 0.603;
}
.dt-fam__row:nth-child(3) {
  --dt-w: 0.5;
}
.dt-fam__row:nth-child(4) {
  --dt-w: 0.426;
}
.dt-fam__row:nth-child(5) {
  --dt-w: 0.353;
}
.dt-fam__row:nth-child(6) {
  --dt-w: 0.25;
}
.dt-fam__row:nth-child(7) {
  --dt-w: 0.176;
}
.dt-fam__row:nth-child(8) {
  --dt-w: 0.118;
}
.dt-fam__n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dt-fam__more {
  border-top: 1px solid var(--stroke);
  padding: 0.5625rem 0.875rem 0.625rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dt-cap {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
}
.dt-cap__cta {
  white-space: nowrap;
}

/* From a tablet up the list sits beside the families; on a laptop the window takes the wider side
   of the band. */
@media (min-width: 40rem) {
  .dt-cols {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}
/* On a small laptop the window is beside the text and at its narrowest: the two lists share it
   evenly, so a family's name is whole ("OpenAI Dots" was cut to "OpenAI …"; the sessions' rows
   have the room to give). */
@media (min-width: 64rem) and (max-width: 79.99rem) {
  .dt-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (min-width: 64rem) {
  .hm-split--teams {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
  }
}

/* ---------- Motion (only with /teaser.js, never under prefers-reduced-motion) ---------- */

/* Armed: emptied, waiting for the window to be in view. */
.dt[data-state='armed'] .dt-fam__fill,
.dt[data-state='armed'] .dt-split__fill {
  transform: scaleX(0);
}
/* Playing: the bars draw, each a moment after the one above. */
.dt[data-state='playing'] .dt-fam__fill,
.dt[data-state='playing'] .dt-split__fill {
  transition: transform 0.9s var(--ease-out);
}
.dt[data-state='playing'] .dt-fam__row:nth-child(2) .dt-fam__fill {
  transition-delay: 0.05s;
}
.dt[data-state='playing'] .dt-fam__row:nth-child(3) .dt-fam__fill {
  transition-delay: 0.1s;
}
.dt[data-state='playing'] .dt-fam__row:nth-child(4) .dt-fam__fill {
  transition-delay: 0.15s;
}
.dt[data-state='playing'] .dt-fam__row:nth-child(5) .dt-fam__fill {
  transition-delay: 0.2s;
}
.dt[data-state='playing'] .dt-fam__row:nth-child(6) .dt-fam__fill {
  transition-delay: 0.25s;
}
.dt[data-state='playing'] .dt-fam__row:nth-child(7) .dt-fam__fill {
  transition-delay: 0.3s;
}
.dt[data-state='playing'] .dt-fam__row:nth-child(8) .dt-fam__fill {
  transition-delay: 0.35s;
}
.dt[data-state='playing'] .dt-live__dot {
  animation: dt-pulse 1.1s ease-in-out infinite;
}

/* A row not yet arrived keeps its slot, unseen; one arriving slides in at the top as the others
   move down a slot. */
.dt[data-state='playing'] .dt-row {
  transition:
    transform 0.45s var(--ease-out),
    opacity 0.25s linear;
}
.dt-row.is-out {
  opacity: 0;
}
/* It arrives new: /teaser.js lays "New visitor" over the row while it is read, then it is named. */
.dt-scan {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.875rem;
  color: var(--text-muted);
  opacity: 0;
  overflow: clip;
  pointer-events: none;
  transition: opacity 0.2s linear;
}
.dt-scan__mark {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px dashed var(--stroke-strong);
  border-radius: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}
.dt-scan__what {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  margin-left: auto;
}
.dt-scan::after {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgb(255 69 0 / 0.16), transparent);
  transform: translateX(-100%);
}
.dt-row > :not(.dt-scan) {
  transition: opacity 0.25s linear;
}
.dt-row.is-out > :not(.dt-scan),
.dt-row.is-reading > :not(.dt-scan) {
  opacity: 0;
}
.dt-row.is-reading .dt-scan {
  opacity: 1;
}
/* Named: the cover goes first, then the words come, so the two never read through each other. */
.dt-row.is-named .dt-scan {
  transition-duration: 0.1s;
}
.dt-row.is-named > :not(.dt-scan) {
  transition-delay: 0.08s;
}
.dt-row.is-reading .dt-scan::after {
  animation: dt-sweep 0.45s linear both;
}
/* Then it is named: the mark lands, the meter fills, and the row keeps the dashboard's wash of a
   new arrival for a moment. */
.dt-row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dt-wash);
  opacity: 0;
  pointer-events: none;
}
.dt-row.is-named::before {
  animation: dt-wash 1.6s ease-out both;
}
.dt-row.is-named .dt-mark {
  animation: dt-pop 0.4s var(--ease-out) both;
}
.dt-row.is-named .dt-pips i {
  animation: dt-pip 0.3s linear both;
}
.dt-row.is-named .dt-pips i:nth-child(2) {
  animation-delay: 0.08s;
}
.dt-row.is-named .dt-pips i:nth-child(3) {
  animation-delay: 0.16s;
}
.dt-row.is-named .dt-tag,
.dt-row.is-named .dt-id {
  animation: dt-pip 0.3s 0.12s linear both;
}
/* A number that just counted one more. */
.dt-fig__sub [data-dt-count],
[data-dt-live] {
  display: inline-block;
}
/* Room for its three figures from the first frame, so the words after it stay put. */
.dt-fig__sub [data-dt-count] {
  min-width: 3ch;
}
.is-one .dt-live__s {
  opacity: 0;
}
.is-tick {
  animation: dt-tick 0.45s var(--ease-out);
}

@keyframes dt-sweep {
  to {
    transform: translateX(250%);
  }
}
@keyframes dt-wash {
  from {
    opacity: 1;
  }
}
@keyframes dt-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}
@keyframes dt-pip {
  from {
    opacity: 0.15;
  }
}
@keyframes dt-tick {
  from {
    transform: translateY(-0.25rem);
    opacity: 0.4;
  }
}
@keyframes dt-pulse {
  50% {
    opacity: 0.3;
  }
}
