/* The public Help pages (/help and /help/{topic}, T-212). Loaded by templates/public/help.html and help_topic.html only. Colours are theme
   tokens, so light and dark follow the theme switch. Author: Jeremiah Buttler */

.hp-go { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; color: var(--text); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hp-go::after { content: "\2192"; text-decoration: none; color: var(--accent-ink); }
.hp-go:hover, .hp-go:focus-visible { color: var(--accent-ink); }

/* the head: the search is the task */
.hp-head .lead { max-width: none; }
.hp-search { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); max-width: 40rem; }
.hp-search__input { flex: 1; min-width: 0; min-height: 52px; font-size: var(--fs-body); padding: 0 var(--sp-4); border: var(--rule-row) solid var(--ink); background: var(--field); color: var(--text); }
.hp-search__input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hp-search__go { min-height: 52px; flex: none; }

/* results */
.hp-results { margin-bottom: var(--sp-7); }
.hp-results__count { margin: 0 0 var(--sp-3); font-family: var(--font-label); font-weight: 700; font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hp-results__list { list-style: none; margin: 0; padding: 0; background: var(--tile-bg); border: 1px solid var(--tile-border); border-top: var(--rule-tile-top) solid var(--ink); }
.hp-results__list > li + li { border-top: 1px solid var(--rule); }
.hp-results__list > li[hidden] { display: none; }
.hp-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-4); padding: var(--sp-4) var(--sp-5); color: var(--text); text-decoration: none; }
.hp-hit:hover, .hp-hit:focus-visible { background: var(--soft); }
.hp-hit__q { font-weight: 700; font-size: var(--fs-body); line-height: 1.35; }
.hp-hit__topic { font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
.hp-hit__text { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }
.hp-none { padding: var(--sp-5); }
.hp-none p { margin: 0; }
.hp-none p + p { margin-top: var(--sp-2); }

/* the cards, by what he is trying to do */
.hp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tile-gap); }
.hp-card { display: flex; flex-direction: column; background: var(--tile-bg); border: 1px solid var(--tile-border); border-top: var(--rule-tile-top) solid var(--ink);
  padding: var(--sp-5); min-width: 0; }
.hp-card__title { margin: 0; font-family: var(--font-display); font-size: var(--fs-display-4); line-height: 1.15; text-transform: uppercase; letter-spacing: .01em; }
.hp-card__title a { color: var(--text); text-decoration: none; display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; }
.hp-card__title a:hover, .hp-card__title a:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.hp-card__line { margin: 0 0 var(--sp-3); color: var(--muted); }
.hp-card__qs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.hp-card__qs li { border-bottom: 1px solid var(--rule); }
.hp-card__qs a { display: flex; align-items: center; min-height: 44px; padding: var(--sp-2) 0; color: var(--text); line-height: 1.4; text-decoration: none; }
.hp-card__qs a:hover, .hp-card__qs a:focus-visible { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.hp-card__all { margin: auto 0 0; padding-top: var(--sp-3); }

.hp-card--stuck { border-top-color: var(--accent); }
.hp-card--stuck .hp-card__all { margin-top: auto; }
.hp-card__faq { margin: var(--sp-2) 0 0; }
.hp-stuck { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-5); margin-top: var(--sp-7); padding: var(--sp-5); border-top: var(--rule-tile-top) solid var(--accent); }
.hp-stuck h2 { margin: 0 0 var(--sp-3); }
.hp-stuck p { margin: 0; }
.hp-stuck__go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }

/* a topic page: the answers, with its card and "Still stuck?" beside them */
.hp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); font-size: var(--fs-small); }
.hp-crumb a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--muted); }
.hp-crumb a:hover, .hp-crumb a:focus-visible { color: var(--accent-ink); }
.hp-topic__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
.hp-topic__main > .display { margin: 0 0 var(--sp-3); }
.hp-topic__main > .lead { margin: 0 0 var(--sp-5); max-width: none; }
.hp-toc { margin-bottom: var(--sp-5); }
.hp-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hp-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--sp-1) var(--sp-3); border: 1px solid var(--tile-border); background: var(--tile-bg);
  color: var(--text); font-size: var(--fs-small); line-height: 1.3; text-decoration: none; }
.hp-toc a:hover, .hp-toc a:focus-visible { border-color: var(--ink); }
.hp-qa { padding: var(--sp-5); scroll-margin-top: var(--sp-8); }
.hp-qa + .hp-qa { margin-top: var(--sp-4); }
.hp-qa:target { outline: 3px solid var(--accent); outline-offset: -3px; }
.hp-qa__q { margin: 0 0 var(--sp-3); font-size: var(--fs-h3); line-height: 1.3; font-weight: 700; }
.hp-qa__a { max-width: none; font-size: var(--fs-read); line-height: var(--lh-read); }
.hp-qa__a > :first-child { margin-top: 0; }
.hp-qa__a > :last-child { margin-bottom: 0; }
.hp-qa__a p, .hp-qa__a li { line-height: var(--lh-read); }
.hp-qa__a ol, .hp-qa__a ul { padding-left: var(--sp-5); }
.hp-qa__a li + li { margin-top: var(--sp-2); }
.hp-qa__a p > a:only-child { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; font-weight: 600; }
.hp-qa__a p > a:only-child::after { content: "\2192"; color: var(--accent-ink); }
.hp-qa__pic { margin-top: var(--sp-4); max-width: 40rem; }
.hp-topic__side { display: grid; gap: var(--sp-4); }
.hp-side { padding: var(--sp-5); }
.hp-side .label { margin: 0 0 var(--sp-2); }
.hp-side p { margin: 0; }
.hp-side p + p { margin-top: var(--sp-3); }
.hp-side__title { font-weight: 700; font-size: var(--fs-h3); }
.hp-side--stuck { border-top: var(--rule-tile-top) solid var(--accent); }
.hp-side__list { list-style: none; margin: 0; padding: 0; }
.hp-side__list a { display: flex; align-items: center; min-height: 44px; color: var(--text); }
.hp-side__list li + li { border-top: 1px solid var(--rule); }
.hp-side__back { margin: 0; }

@media (max-width: 1023px) {
  .hp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-card--stuck:nth-child(odd) { grid-column: 1 / -1; }
  .hp-topic__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .hp-topic__side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-side__back { grid-column: 1 / -1; }
}
@media (max-width: 719px) {
  .hp-cards { grid-template-columns: minmax(0, 1fr); }
  .hp-card--stuck:nth-child(odd) { grid-column: auto; }
  .hp-head__pic { display: none; }
  .hp-search { flex-direction: column; }
  .hp-card--stuck { border-top-color: var(--accent); }
.hp-card--stuck .hp-card__all { margin-top: auto; }
.hp-card__faq { margin: var(--sp-2) 0 0; }
.hp-stuck { flex-direction: column; align-items: flex-start; }
  .hp-topic__side { grid-template-columns: minmax(0, 1fr); }
  .hp-hit { grid-template-columns: minmax(0, 1fr); }
  .hp-hit__topic { white-space: normal; }
  .hp-toc ol { flex-direction: column; }
  .hp-toc a { width: 100%; }
}
