/* The help centre.
 *
 * Two ideas carry the whole design. First, annotations live in HTML on top of
 * a raw screenshot rather than being drawn into the pixels — so re-shooting a
 * screen does not mean redrawing anything, a translation touches strings rather
 * than images, and the text an arrow points at is text a screen reader reads
 * out. Second, every annotation's meaning also exists in the step it belongs
 * to, so the whole site works with images off. That is not a nicety here: the
 * people reading this are often on a phone, on a slow connection, between
 * appointments.
 */

.help-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  max-width: 1160px;
  margin: auto;
  padding: 44px 24px 96px;
}

.help-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 20px;
  font-size: 0.84rem;
}
.help-nav section {
  display: grid;
  gap: 5px;
}
.help-nav strong {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.help-nav a {
  color: var(--slate);
  font-size: 0.83rem;
  line-height: 1.45;
}
.help-nav a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}
.help-nav a[aria-current="page"] {
  color: var(--teal-dark);
  font-weight: 750;
}

.help-article {
  min-width: 0;
  max-width: 760px;
}
.help-article h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.help-lede {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}
.help-article h2 {
  margin: 42px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}
.help-article p,
.help-article li {
  color: var(--slate);
  font-size: 0.94rem;
  line-height: 1.72;
}
.help-article a {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* Before you start */
.help-prereq {
  margin: 0 0 28px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  background: var(--mist);
}
.help-prereq strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.help-prereq p {
  margin: 0;
  font-size: 0.88rem;
}

/* The numbered steps */
.help-steps {
  display: grid;
  gap: 34px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: help-step;
}
.help-steps > li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  counter-increment: help-step;
}
.help-steps > li::before {
  content: counter(help-step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}
.help-steps > li > div {
  min-width: 0;
}
.help-steps p {
  margin: 4px 0 0;
}
.help-steps p:first-child {
  margin-top: 3px;
}

/* Screenshot with its annotation layer */
.help-shot {
  position: relative;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.help-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.help-shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  background: var(--mist);
}

/* One highlight over a control, with its number. Percentages throughout, so the
   overlay stays aligned at any displayed width — which is the point, because
   this has to work on a phone. */
.help-mark {
  position: absolute;
  border: 2.5px solid #b93a3a;
  border-radius: 7px;
  box-shadow: 0 0 0 3px rgba(185, 58, 58, 0.16);
  pointer-events: none;
}
.help-mark > span {
  position: absolute;
  top: -12px;
  left: -12px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b93a3a;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}

/* The key beneath the image. This is the part that carries the meaning when the
   images do not load, so it is never decorative. */
.help-key {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.help-key li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--slate);
}
.help-key b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #b93a3a;
  color: #fff;
  font-size: 0.72rem;
}

/* Worked / did not work */
.help-outcome {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
}
.help-outcome > div {
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.help-outcome > div.worked {
  border-left: 4px solid var(--green);
}
.help-outcome > div.stuck {
  border-left: 4px solid var(--amber);
}
.help-outcome strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.help-outcome > div.worked strong {
  color: var(--green);
}
.help-outcome > div.stuck strong {
  color: var(--amber);
}
.help-outcome p {
  margin: 0 0 8px;
  font-size: 0.89rem;
}
.help-outcome p:last-child {
  margin: 0;
}

.help-next {
  margin: 40px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.help-next span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* The index */
.help-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 30px;
}
.help-index-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.help-index-card h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.help-index-card > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.55;
}
.help-index-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.help-index-card li {
  margin: 0;
}
.help-index-card a {
  color: var(--slate);
  font-size: 0.88rem;
  line-height: 1.45;
}
.help-index-card a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 18px 64px;
  }
  .help-nav {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .help-steps > li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
  }
  .help-steps > li::before {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }
}

@media print {
  .site-header,
  footer,
  .help-nav {
    display: none !important;
  }
  .help-layout {
    display: block;
    padding: 0;
  }
}
