/* The user guide (guide/index.html), on top of style.css. */

.guide-hero { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2.5rem, 5vw, 3.25rem); }
.guide-hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.018em;
  margin: 0 0 1.25rem;
}
.guide-hero .lede { max-width: 42rem; }
.guide-hero .lede a { color: var(--field-ink); }
.byline { margin: 1.5rem 0 0; font-size: 0.9375rem; color: var(--field-muted); }

.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.toc { display: none; }
@media (min-width: 76rem) {
  .guide-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 0 4.5rem; }
  .toc {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 3.25rem 0 2rem;
  }
  /* the contents list inside the text repeats the sidebar on wide screens */
  main.guide #contents, main.guide #contents + ol { display: none; }
}
.toc-title { font-family: var(--serif); font-size: 1.3125rem; margin: 0 0 0.9rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.32rem 0 0.32rem 1rem;
  border-left: 1px solid transparent;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }

main.guide {
  padding: clamp(2.25rem, 5vw, 3.25rem) 0 4.5rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 48rem;
}
main.guide > p,
main.guide > ul,
main.guide > ol,
main.guide > blockquote { max-width: 42rem; }
main.guide > p.figure,
main.guide > p.caption { max-width: none; }

main.guide h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  margin: 4.5rem 0 1.1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
main.guide > h2:first-child { margin-top: 0; }
main.guide h3 { font-size: 1.5rem; margin: 2.75rem 0 0.75rem; }
main.guide h2, main.guide h3 { scroll-margin-top: 1.25rem; }
main.guide li { margin: 0.35rem 0; }
main.guide li > p { margin: 0.35rem 0; }
main.guide strong { font-weight: 600; }

main.guide p.figure { margin: 2rem 0 0.6rem; }
main.guide img { display: block; max-width: 100%; height: auto; }
main.guide img[src$=".png"],
main.guide img[src$=".jpg"] { border: 1px solid var(--rule); }
main.guide p.caption {
  margin: 0 0 2.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}
main.guide p.caption b { color: var(--ink); font-weight: 600; }

main.guide pre {
  max-height: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  margin: 1.25rem 0;
}
main.guide pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }

main.guide blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.5;
}
main.guide blockquote p { margin: 0.3rem 0; }

.guide-table {
  overflow-x: auto;
  margin: 1.5rem 0 1.75rem;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.guide-table table { font-size: 0.9375rem; line-height: 1.5; }
.guide-table thead th { position: static; white-space: normal; }
.guide-table td code { white-space: nowrap; }

@media print {
  .toc { display: none; }
  main.guide pre { white-space: pre-wrap; }
}
