/* The Help centre (help.php): the list of guides and questions, and each step-by-step guide. Uses the
   app's own colour tokens, so it follows the light and dark themes like every other page. */

.help-page { max-width: 880px; margin-inline: auto; }

/* ---------------------------------------------------------------- the list */
.help-hero { padding: 0.5rem 0 1.25rem; }
.help-hero h1 { margin: 0 0 0.35rem; }
.help-lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1rem; }
.help-search { position: relative; max-width: 560px; }
.help-search svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.help-search input { width: 100%; padding: 0.75rem 0.9rem 0.75rem 2.5rem; font-size: 1rem; border-radius: 12px; }
.help-count { min-height: 1.2em; margin: 0.5rem 0 0; font-size: 0.88rem; color: var(--muted); }

.help-cat { margin: 1.5rem 0; }
.help-cat h2 { font-size: 1.05rem; margin: 0 0 0.7rem; color: var(--label); }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0.75rem; }
.help-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.help-card:hover, .help-card:focus-visible { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(38, 43, 51, 0.08); }
.help-card-title { font-weight: 700; }
.help-card-text { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.help-card-meta { margin-top: auto; padding-top: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--brand); }

.help-q { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 0.5rem; }
.help-q summary { cursor: pointer; padding: 0.85rem 1rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.help-q summary::-webkit-details-marker { display: none; }
.help-q summary::after { content: '+'; color: var(--brand); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.help-q[open] summary::after { content: '−'; }
.help-a { padding: 0 1rem 0.9rem; color: var(--text); line-height: 1.6; }
.help-a p { margin: 0; }
.help-none { padding: 1rem; border-radius: 12px; background: var(--surface-2); color: var(--muted); }

/* ---------------------------------------------------------------- a guide */
.help-crumbs { font-size: 0.88rem; color: var(--muted); margin: 0.25rem 0 0.75rem; }
.help-crumbs a { color: var(--brand); }
.help-guide-head h1 { margin: 0 0 0.35rem; }
.help-meta { margin: 0 0 1.25rem; font-size: 0.85rem; color: var(--muted); }

.help-steps { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.help-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0.9rem; padding: 1.1rem 0 1.4rem; border-top: 1px solid var(--line); }
.help-step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: #9a7630; color: #fff; }
.help-step-body h2 { font-size: 1.1rem; margin: 0.25rem 0 0.4rem; }
.help-step-body p { margin: 0 0 0.85rem; line-height: 1.6; }
.help-shots { display: grid; gap: 0.9rem; align-items: start; }
.help-shots.has-phone { grid-template-columns: minmax(0, 1fr) minmax(0, 210px); }
.help-shot { margin: 0; }
.help-shot img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px rgba(38, 43, 51, 0.08); background: var(--surface); }
.help-shot--phone img { border-radius: 16px; }
.help-shot figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; text-align: center; }

.help-tip { margin: 0.5rem 0 1.5rem; padding: 0.9rem 1rem; border-radius: 12px; background: var(--brand-tint); border: 1px solid var(--edge-warning); line-height: 1.55; }
.help-tip strong:first-child { display: block; margin-bottom: 0.15rem; color: var(--brand-dark); }
.help-related h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.help-related ul { margin: 0 0 1.5rem; padding-left: 1.1rem; }
.help-related li { margin: 0.25rem 0; }
.help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0 0.5rem; }
.help-pager a { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; }
.help-pager a:hover { border-color: var(--brand); }
.help-pager small { font-weight: 500; color: var(--muted); }
.help-pager-next { text-align: right; grid-column: 2; }

.help-contact { margin: 2rem 0 1rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.help-contact h2 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.help-contact p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.help-contact .help-start { margin-top: 0.6rem; display: block; color: var(--muted); }

@media (max-width: 640px) {
  .help-step { grid-template-columns: 30px minmax(0, 1fr); gap: 0.65rem; }
  .help-step-num { width: 28px; height: 28px; font-size: 0.9rem; }
  .help-shots.has-phone { grid-template-columns: minmax(0, 1fr); }
  /* On a phone, the phone picture is the one that matches the screen in your hand. */
  .help-shots.has-phone .help-shot:not(.help-shot--phone) { display: none; }
  .help-shot--phone { max-width: 260px; }
  .help-pager { grid-template-columns: minmax(0, 1fr); }
  .help-pager-next { grid-column: auto; }
}
