/* Prepare your study (prepare-your-study.html). Uses the brand tokens at the end of flow.css: neutral surfaces,
   links and focus use --accent, so light and dark follow the theme. */
.guide-page {
  max-width: 760px;
}
.guide-page .eyebrow {
  margin: 28px 0 6px;
}
.guide-page h1 {
  margin: 0 0 14px;
}
.guide-lead {
  margin: 0 0 28px;
  font-size: var(--t-2);
  color: var(--text-2);
}
.guide-lead strong {
  color: var(--text);
}
.guide-page code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}
.guide-page :not(pre) > code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
}
.guide-page pre {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  line-height: 1.5;
  overflow-x: auto;
}
.guide-page pre code {
  overflow-wrap: normal;
}
/* Commands wrap instead of scrolling sideways on a phone. */
.guide-page pre.guide-cmd {
  white-space: pre-wrap;
}
.guide-page pre.guide-cmd code {
  overflow-wrap: anywhere;
}

/* The three steps: the whole first screen. */
.guide-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}
.guide-steps > li {
  position: relative;
  padding: 18px 20px 14px 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  counter-increment: guide-step;
}
.guide-steps > li::before {
  content: counter(guide-step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  line-height: 30px;
  text-align: center;
}
.guide-page .guide-steps h2 {
  margin: 2px 0 6px;
  font-size: var(--t-2);
}
.guide-steps p {
  margin: 8px 0;
  color: var(--text-2);
}
.guide-page a.btn {
  text-decoration: none;
}

.guide-sample {
  margin: 22px 0 0;
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--surface-2);
}
.guide-page .guide-sample h2 {
  margin: 0 0 6px;
  font-size: var(--t-2);
}
.guide-sample p {
  margin: 6px 0;
}
.guide-sample a {
  font-weight: 600;
}
.guide-size {
  display: inline-block;
  margin-left: 8px;
  color: var(--text-2);
  font-size: 0.875em;
}

/* Deeper parts open on request. */
.guide-page .guide-more {
  margin: 44px 0 12px;
}
.guide-page details {
  border-top: 1px solid var(--line);
}
.guide-page details:last-of-type {
  border-bottom: 1px solid var(--line);
}
.guide-page summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 4px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.guide-page summary::-webkit-details-marker {
  display: none;
}
.guide-page summary:hover {
  background: var(--surface-2);
}
.guide-hint {
  flex: none;
  color: var(--accent);
  font-size: 0.875em;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guide-page details[open] > summary .guide-hint {
  font-size: 0;
}
.guide-page details[open] > summary .guide-hint::after {
  content: "Hide details";
  font-size: 0.875rem;
}
.guide-body {
  padding: 2px 4px 22px;
}
.guide-page .guide-body h3 {
  margin: 22px 0 6px;
}
.guide-body > :first-child {
  margin-top: 6px;
}
.guide-body ul {
  margin: 10px 0;
  padding-left: 20px;
}
.guide-body li {
  margin: 6px 0;
}

/* Name on the left, plain words on the right; stacked on a phone. */
.guide-list,
.guide-checks {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0 20px;
  margin: 12px 0;
}
.guide-checks {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.guide-list dt,
.guide-list dd,
.guide-checks dt,
.guide-checks dd {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.guide-list dt,
.guide-checks dt {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--text);
}
.guide-list dd,
.guide-checks dd {
  color: var(--text-2);
}
.guide-checks dt {
  font-weight: 500;
}

.guide-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 36px 0 20px;
}

@media (max-width: 600px) {
  .guide-steps > li {
    padding: 16px 16px 12px;
  }
  .guide-steps > li::before {
    position: static;
    display: block;
    margin-bottom: 8px;
  }
  .guide-list,
  .guide-checks {
    grid-template-columns: minmax(0, 1fr);
  }
  .guide-list dd,
  .guide-checks dd {
    padding-top: 0;
    border-top: 0;
  }
  .guide-list dt,
  .guide-checks dt {
    padding-bottom: 4px;
  }
  .guide-size {
    display: block;
    margin: 4px 0 0;
  }
}

/* Fewer boxes: steps are numbered lines parted by hairlines; only commands keep a box, so they read as code. */
.guide-steps > li {
  padding: 16px 0 12px 48px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.guide-steps > li::before {
  left: 0;
}
.guide-sample {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
