/*
 * Walkthrough page (/walkthrough/): one real StockAtlas session, step by step.
 * Shared components (container, eyebrow, buttons, screenshot frame) live in site.css.
 *
 * Contents
 *   1. Hero
 *   2. Steps (text beside a screenshot, alternating sides from 1024px)
 *   3. "What this shows" summary and the worksheet table
 *   4. Closing call to action
 */

/* 1. Hero -------------------------------------------------------------------- */

.walkthrough-hero {
  position: relative;
  overflow: hidden;
  padding-top: 8rem;
  padding-bottom: 3rem;
}
.walkthrough-title {
  margin-top: 1.5rem;
  font-size: 2.25rem;
}
.walkthrough-lede {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--color-ink-muted);
}
/* The "educational example" caveat, set off by a thin rule on its left. */
.walkthrough-disclaimer {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-line-strong);
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--color-ink-dim);
}
@media (min-width: 640px) {
  .walkthrough-hero {
    padding-top: 10rem;
  }
  .walkthrough-title {
    font-size: 3rem;
  }
  .walkthrough-lede {
    font-size: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .walkthrough-title {
    font-size: 3.75rem;
  }
}

/* 2. Steps ------------------------------------------------------------------- */

.walkthrough-step {
  padding-block: 3.5rem;
}
.step-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.step-number {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--color-accent);
}
.step-title {
  margin-top: 0.75rem;
  font-size: 1.5rem;
}
.step-body {
  margin-top: 1rem;
  line-height: 1.625;
  color: var(--color-ink-muted);
}
.step-body > * + * {
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .walkthrough-step {
    padding-block: 5rem;
  }
  .step-title {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .step-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3rem;
  }
  .step-text {
    grid-column: span 4 / span 4;
  }
  .step-shot {
    grid-column: span 8 / span 8;
  }
  /* Flipped steps put the screenshot on the left. */
  .walkthrough-step--flip .step-text {
    order: 2;
  }
  .walkthrough-step--flip .step-shot {
    order: 1;
  }
}

/* 3. Summary and worksheet --------------------------------------------------- */

.walkthrough-summary {
  padding-block: 5rem;
}
.walkthrough-summary-title {
  margin-top: 1rem;
  font-size: 1.875rem;
}
.walkthrough-summary-intro p {
  margin-top: 1.25rem;
  line-height: 1.625;
  color: var(--color-ink-muted);
}
.walkthrough-summary-intro p + p {
  margin-top: 1rem;
}
.worksheet {
  margin-top: 3.5rem;
}
.worksheet h3 {
  font-weight: 500;
  color: var(--color-ink);
}
.worksheet-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--color-ink-muted);
}
/* On phones the table bleeds to the screen edges and scrolls sideways. */
.worksheet-scroll {
  margin-top: 1.5rem;
  margin-inline: -1.25rem;
  overflow-x: auto;
}
.worksheet table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.worksheet tbody {
  border-block: 1px solid var(--color-line);
}
.worksheet tr {
  vertical-align: top;
}
.worksheet tr + tr {
  border-top: 1px solid var(--color-line);
}
.worksheet th {
  width: 14rem;
  padding: 0.75rem 1.5rem 0.75rem 1.25rem;
  font-weight: 500;
  color: var(--color-ink);
  text-align: left;
}
.worksheet td {
  padding: 0.75rem 1.25rem 0.75rem 0;
  color: var(--color-ink-muted);
}
@media (min-width: 640px) {
  .walkthrough-summary {
    padding-block: 7rem;
  }
  .walkthrough-summary-title {
    font-size: 2.25rem;
  }
  .worksheet-scroll {
    margin-inline: 0;
  }
  .worksheet th {
    padding-left: 0;
  }
  .worksheet td {
    padding-right: 0;
  }
}

/* 4. Closing call to action -------------------------------------------------- */

.walkthrough-closing {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}
.walkthrough-closing-title {
  font-size: 2.25rem;
}
.walkthrough-closing .cta-row {
  margin-top: 2.25rem;
}
@media (min-width: 640px) {
  .walkthrough-closing-title {
    font-size: 3rem;
  }
}
