/* Guide pages. Same dark page as the rest of the site. Screenshot slots stay visible when the file is missing. */
.guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

/* Align to home: each step is a plain section on --space-section, with the
   site h2 (size, weight, rule). No card, no border, no step number. */
.guide-steps > li {
  margin: var(--space-section) 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guide-steps pre {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

.guide-steps pre code {
  font-size: inherit;
}

.guide-steps ol,
.guide-steps ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.guide-steps li li {
  margin: 0.3rem 0;
}

.shot {
  margin: 0.4rem 0 1rem;
}

.shot img {
  display: block;
  width: min(100%, 42rem);
  height: auto;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--panel-2),
      var(--panel-2) 10px,
      var(--panel) 10px,
      var(--panel) 20px
    );
  border: 1px dashed var(--btn-border);
  border-radius: 8px;
  min-height: 9rem;
}

.shot figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.guide-next {
  margin: var(--space-section) 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.guide-next h2 {
  margin-top: 0;
}

.guide-aside {
  margin: 0.4rem 0 1rem;
  padding: 0.8rem 1rem 0.2rem;
  border: 1px solid var(--line);
  border-left: 4px solid #4fd1b0;
  border-radius: 8px;
  background: var(--panel-deep);
}

.guide-aside h3 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
}

.key-terms {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 0.8rem;
  margin: 0 0 0.8rem;
}

.key-terms dt {
  margin: 0;
  align-self: baseline;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 650;
}

.key-terms dd {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 0.95rem;
}

.shot img[width] {
  width: min(100%, 42rem);
  height: auto;
  max-width: 100%;
  max-height: min(36rem, 70vh);
  min-height: 0;
  border-style: solid;
}

.guide-list li {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0.95rem 1rem 0.55rem;
}

.guide-list h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  opacity: 1;
}

.guide-list h2 a {
  color: inherit;
}
.guide-list .way-link {
  margin: auto 0 0;
}
.guide-list .way-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-text);
  text-decoration: none;
}

/* Guide video at the top of each guide: responsive, controls, no autoplay. */
.guide-video {
  margin: 0.4rem 0 0.6rem;
}
.guide-steps { margin-top: 0; }

.guide-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: var(--media-max-h, 22.5rem);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* Same shell as the public pages. Step titles stay off the page-heading scale.
   Prose stays at 65ch, flush left. */
main {
  width: min(100%, var(--shell, 64rem));
  max-width: var(--shell, 64rem);
  margin-inline: auto;
  padding: 1.35rem var(--inset, 1.25rem) 3.25rem;
  box-sizing: border-box;
}

main.guide h1 {
  /* shell clamp wins via shell.css !important; keep weight/letter here */
  font-size: inherit;
  font-weight: var(--weight-h1, 780);
  line-height: 1.22;
  letter-spacing: -0.022em;
  margin: 0 0 var(--space-after-title, 0.5rem);
}

main h1::after { content: none; display: none; }

main :is(.lead, .lede) {
  font-size: var(--type-sub, 1.125rem);
  font-weight: var(--weight-sub, 500);
  line-height: 1.5;
  max-width: var(--prose, 65ch);
  margin-left: 0;
  margin-right: 0;
}

main :is(p, li) {
  max-width: var(--prose, 65ch);
  margin-left: 0;
  margin-right: 0;
  line-height: 1.65;
}

body:has(:is(.guide-list, .guide-steps)) .site-footer-inner {
  box-sizing: border-box;
  max-width: var(--shell, 64rem);
  padding-left: var(--inset, 1.25rem);
  padding-right: var(--inset, 1.25rem);
}

.guide-video figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.guide-video-lead {
  margin: 0 0 1.2rem;
  font-weight: 600;
}

/* Phone stills are portrait: keep them phone-sized. */
.shot img[width="540"] {
  width: min(100%, 16rem);
  height: auto;
  max-height: min(28rem, 70vh);
}
