/* Your data page. Load after site.css. Breakpoints: 768px, 1024px. */

picture {
  display: block;
}

/* Facts: the number and heading, then the body; side by side on wide screens. */
.yd-fact {
  padding-top: var(--space-7);
  border-top: 1px solid var(--color-border);
}

.yd-fact-head .eyebrow {
  margin-top: var(--space-5);
}

.yd-fact-head h2 {
  margin-top: var(--space-4);
}

.yd-fact-body {
  max-width: 38ch;
  margin-top: var(--space-5);
  font-size: var(--text-lead);
  line-height: 1.45;
  color: var(--color-text-muted);
}

@media (min-width: 1024px) {
  .yd-fact {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--space-8);
    align-items: end;
    padding-top: var(--space-8);
  }

  .yd-fact-body {
    margin-top: 0;
  }
}

/* The fact sections sit closer together than picture sections. */
#data-folder,
#projects,
#sign-ins {
  padding-bottom: var(--space-9);
}

.yd-figure {
  max-width: min(100%, var(--container));
  margin-top: var(--space-8);
}

.yd-figure figcaption {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  text-align: center;
}

/* AI tools: the dark panel with its number. */
.yd-panel {
  margin-top: 0;
}

.yd-panel .step-number {
  margin-bottom: var(--space-5);
}

.yd-panel h2 {
  max-width: 18ch;
  margin: var(--space-4) auto 0;
}

.yd-panel .lead {
  max-width: 44ch;
  margin-top: var(--space-5);
}

/* Report: the illustration, then the numbered callouts. */
.yd-report .yd-figure {
  width: auto;
}

.yd-callouts {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
  counter-reset: callout;
}

.yd-callouts li {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: var(--space-4);
  counter-increment: callout;
}

.yd-callouts li::before {
  content: counter(callout);
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-on-dark);
  font-size: var(--text-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.yd-callouts h3 {
  display: flex;
  align-items: center;
  min-height: 32px;
  font-size: var(--text-body);
  line-height: 1.3;
}

.yd-callouts p {
  grid-column: 2;
  margin-top: var(--space-1);
  font-size: var(--text-body);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .yd-callouts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-7);
  }
}

@media (min-width: 1024px) {
  .yd-callouts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Closing */
.yd-more {
  margin-top: var(--space-5);
}

.yd-more a {
  color: var(--color-link);
  font-weight: 500;
}

.page-note {
  max-width: 52ch;
  margin: var(--space-7) auto 0;
  color: var(--color-text-muted);
}

/* Motion: the callouts rise in one after another as the list scrolls into view. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .yd-callouts {
      view-timeline: --callouts block;
    }

    .yd-callouts li {
      animation: rise linear both;
      animation-timeline: --callouts;
    }

    .yd-callouts li:nth-child(1) { animation-range: cover 4% cover 20%; }
    .yd-callouts li:nth-child(2) { animation-range: cover 8% cover 24%; }
    .yd-callouts li:nth-child(3) { animation-range: cover 12% cover 28%; }
    .yd-callouts li:nth-child(4) { animation-range: cover 16% cover 32%; }
    .yd-callouts li:nth-child(5) { animation-range: cover 20% cover 36%; }
    .yd-callouts li:nth-child(6) { animation-range: cover 24% cover 40%; }
  }
}
