/* The guides at /guides. Loaded after /legal.css, which sets the tokens, type and the header
   and footer; this adds what a how-to page needs on top: a wider column, a site nav, numbered
   steps, screenshots and the guide index cards. */

.wrap.wide {
  max-width: 60rem;
}

/* Header: the wordmark, then a short nav that wraps under it on a phone. */
header.top .wrap {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  gap: 4px 18px;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a.app {
  background: var(--accent-ink);
  border-radius: 9px;
  color: var(--surface);
  padding: 6px 12px;
}

.crumb {
  font-size: 14.5px;
  margin: 0 0 10px;
}

.crumb a {
  text-decoration: none;
}

.lede {
  color: var(--ink-soft);
  font-size: 18.5px;
  margin: 12px 0 28px;
  max-width: 40rem;
}

.guide h2 {
  font-size: 23px;
  margin-top: 48px;
  scroll-margin-top: 16px;
}

.guide p,
.guide ul,
.guide ol {
  max-width: 44rem;
}

/* Numbered steps: a counter in a coloured disc, so a walkthrough reads as one. */
ol.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

ol.steps > li {
  counter-increment: step;
  margin-bottom: 12px;
  padding-left: 40px;
  position: relative;
}

ol.steps > li::before {
  background: var(--sun-soft);
  border-radius: 50%;
  color: var(--ink);
  content: counter(step);
  font-size: 14px;
  font-weight: 700;
  height: 26px;
  left: 0;
  line-height: 26px;
  position: absolute;
  text-align: center;
  top: 1px;
  width: 26px;
}

/* A label as it appears in the app: a button, a tab, a menu item. */
.ui {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
  padding: 0 6px;
  white-space: nowrap;
}

/* Screenshots. A desktop shot on its own, or a desktop and phone pair side by side that
   stacks on a narrow screen. */
figure.shots {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  margin: 22px 0 30px;
}

figure.shots.pair {
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr);
}

figure.shots.phones {
  grid-template-columns: repeat(auto-fill, minmax(190px, 260px));
}

figure.shots img {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgb(46 40 35 / 0.1);
  display: block;
  height: auto;
  width: 100%;
}

figure.shots img.phone {
  border-radius: 18px;
}

figure.shots figcaption {
  color: var(--ink-soft);
  font-size: 14.5px;
  grid-column: 1 / -1;
  margin-top: -4px;
}

@media (max-width: 640px) {
  figure.shots.pair {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On a phone the phone screenshot is the useful one; keep it a sensible size. */
  figure.shots.pair img.phone {
    margin: 0 auto;
    max-width: 280px;
  }
}

.tip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sun);
  border-radius: 10px;
  margin: 18px 0 24px;
  max-width: 44rem;
  padding: 12px 16px;
}

.tip p:last-child {
  margin-bottom: 0;
}

/* The guide index. */
.guide-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.guide-grid li {
  margin: 0;
}

.guide-grid a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--ink);
  display: block;
  height: 100%;
  padding: 16px 18px;
  text-decoration: none;
}

.guide-grid a:hover {
  border-color: var(--sun);
}

.guide-grid b {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.guide-grid span {
  color: var(--ink-soft);
  display: block;
  font-size: 15px;
  line-height: 1.5;
}

/* Previous / next at the foot of a guide. */
.pager {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 20px;
}

.pager a {
  font-weight: 600;
  text-decoration: none;
}

.pager small {
  color: var(--ink-soft);
  display: block;
  font-size: 13px;
  font-weight: 400;
}

.pager .next {
  margin-left: auto;
  text-align: right;
}

.disclaimer {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 28px;
}
