/* The video guides (kapshur.co/guides and /guides/<slug>, written by scripts/guides/pages.mjs).
   Loaded after styles.css and uses its tokens: soft-glow canvas, white cards, Fraunces for headings only,
   vermilion only for the main action. A guide is one reading column: title, video, steps, transcript.
   No JavaScript is needed: the video is a plain <video> with captions, the transcript a <details>. */
.gd-hero { padding: 56px 0 28px; display: grid; gap: 16px; justify-items: start; }
.wrap.gd-hero { padding-left: var(--gutter); padding-right: var(--gutter); }
.gd-hero .display { font-size: clamp(36px, 5vw, 60px); max-width: 860px; }
.gd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.gd-crumbs a { color: var(--ink); font-weight: 600; text-decoration: none; }
.gd-crumbs a:hover { text-decoration: underline; }
.gd-meta { font-size: 14px; color: var(--muted); }

/* one column for the guide: the title, the video, the steps and the transcript share the same edges */
.gd-article { width: 100%; max-width: calc(920px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.gd-video { padding: 8px; display: grid; gap: 10px; margin: 0; scroll-margin-top: 96px; }
.gd-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 14px; background: var(--soft-2); }
.gd-video figcaption { padding: 0 8px 4px; }

.gd-section { padding-top: 48px; padding-bottom: 8px; display: grid; gap: 20px; }
.gd-article > .gd-section { gap: 16px; }

/* the steps: one white card, a row for each step (number, text, the time in the video) */
.gd-steps { counter-reset: gd; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 0; }
.gd-steps li {
  counter-increment: gd; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 16px; row-gap: 4px;
  padding: 18px 20px; scroll-margin-top: 96px;
}
.gd-steps li + li { border-top: 1px solid var(--line); }
.gd-steps li::before {
  content: counter(gd); grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px;
}
.gd-steps h3 { grid-column: 2; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; padding-top: 4px; }
.gd-steps p { grid-column: 2; color: var(--muted); max-width: 600px; }
.gd-time {
  grid-column: 3; grid-row: 1; align-self: start; margin-top: 3px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px 3px 8px; background: var(--card);
  transition: border-color var(--ease), background var(--ease);
}
.gd-time::before { content: ""; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.gd-time:hover { border-color: #B9BEC7; background: var(--soft); }

/* the transcript: closed by default, under the steps */
.gd-transcript { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.gd-transcript summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; font-size: 15px; font-weight: 600; border-radius: var(--r);
}
.gd-transcript summary::-webkit-details-marker { display: none; }
.gd-transcript summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); transition: transform var(--ease);
}
.gd-transcript[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.gd-transcript p { padding: 0 20px 20px; color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 680px; }

/* guide cards (the index and More guides): the designed poster, the title, one line */
.gd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gd-card { display: grid; gap: 8px; align-content: start; height: 100%; padding: 8px 8px 18px; text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
.gd-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.gd-card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; padding: 6px 8px 0; }
.gd-card .hint { padding: 0 8px; font-size: 14px; }
.gd-card-meta { padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.gd-thumb { display: block; border-radius: 14px; overflow: hidden; background: var(--soft-2); }
.gd-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }

.gd-cta { display: grid; gap: 16px; justify-items: start; padding: 48px; }
.gd-cta .h2-big { color: #fff; max-width: 720px; }
.gd-cta p { color: #C3C7CE; max-width: 520px; }
.gd-cta .gd-fine { font-size: 14px; color: var(--ink-muted); }
main > .gd-section:last-child { padding-bottom: 24px; }

@media (max-width: 960px) {
  .gd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .gd-hero { padding-top: 36px; }
  .gd-grid { grid-template-columns: minmax(0, 1fr); }
  .gd-steps li { grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; padding: 16px; }
  .gd-steps li::before { width: 28px; height: 28px; font-size: 13px; grid-row: 1 / span 3; }
  .gd-steps h3 { padding-top: 2px; }
  .gd-time { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 6px; }
  .gd-transcript summary { padding: 16px; }
  .gd-transcript p { padding: 0 16px 16px; }
  .gd-cta { padding: 32px 22px; }
  .gd-video { padding: 6px; }
}
