/* help.css - the help centre (help-), the first welcome's points (guide-), the site's own Report a problem
   form (rp-), Today's Getting started card (gs-), and the Admin page's switches (own-), reported problems
   and requests to join (iss-, join-).
   In the Indigo look, calm: search first, rows on hairlines rather than boxed cards, one sans; a done step gets
   the site's one done mark.
   Colors only through the tokens in app.css, so light and dark both follow; every column shrinks to a
   320 px phone, every control stands at least 44 px tall with 4 px or more between stacked rows and 8 px
   between side-by-side buttons, and text people read is 14 px or more. Hover looks only where a pointer
   hovers. */

/* The search box: an input with the magnifier inside it. */
.help-search { position: relative; max-width: 560px; }
.help-search > svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.help-search input { padding-left: 44px; min-height: 48px; border-radius: var(--r-2); }
.help-count { min-height: 1.5em; margin: var(--s-2) var(--s-1) 0; }
mark { background: var(--highlight); color: inherit; border-radius: 2px; padding: 0 1px; }

/* The topics, as rows that are links (app.css ul.list.links): a title and a line (two on a narrow phone), the line
   the search found under it while searching. The owner's own topics say so with one chip. */
.help-cards { margin: var(--s-2) 0 0; }
/* a topic's line is read to its end: never cut with … (it is short, at most two lines at 360) */
ul.list.links.help-cards .main > small { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.help-t .chip { font-size: var(--fs-14); padding: 2px var(--s-2); vertical-align: 1px; margin-left: var(--s-1); }
.help-hit { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-strong); color: var(--ink-3); font-size: var(--fs-14); line-height: 1.5; overflow-wrap: anywhere; }
.help-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-2); background: var(--accent-soft); color: var(--accent-text); }
.help-ic svg { width: 24px; height: 24px; }
.help-ic.big { width: 48px; height: 48px; }
.help-ic.big svg { width: 26px; height: 26px; }
.help-none { margin-top: 10px; }
/* A phone's first screen (help.js): the three topics it needs most, then All topics for the rest. Keyboard
   shortcuts waits on a touch screen until a key is pressed there (app.js html[data-keys]). */
@media (max-width: 720px) {
  .help-cards[data-folded] > li.help-rest { display: none; }
  .help-all { width: 100%; margin-top: var(--s-2); }
}
@media (hover: none) and (pointer: coarse) {
  html:not([data-keys]) :is(.help-cards, .help-nav) > li[data-topic=keyboard] { display: none; }
}
/* Signed out, the questions people ask, folded, after the topics. */
.help-faq details.how { margin-top: 0; }
.help-faq details.how > p { margin: 0 0 var(--s-3); }
/* Get to know the site (signed in): the full tour and the guide, two rows under the topics. */
.help-sub { margin: var(--s-6) 0 var(--s-1); font-size: var(--fs-18); }
.help-tours { border-top: 1px solid var(--line); }
/* Still stuck? at the foot: a line and a button, after a hairline (no box). */
.help-stuck { display: flex; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.help-stuck h2 { margin-bottom: 4px; font-size: var(--fs-18); }
.help-stuck p { margin: 0; }

/* A topic: the article, with the topics beside it on a wide screen and under it on a phone. */
.help-article .back { min-height: 44px; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-7); align-items: start; }
.help-doc { max-width: 760px; min-width: 0; }
.help-title { display: flex; gap: var(--s-4); align-items: center; margin-bottom: var(--s-3); }
.help-title h1 { margin: 0; font-size: clamp(26px, 3.2vw, var(--fs-40)); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; overflow-wrap: anywhere; }
.help-doc .lead { font-size: var(--fs-18); color: var(--ink-2); margin: 0 0 var(--s-4); }
.help-doc h2 { margin: var(--s-6) 0 10px; font-size: var(--fs-22); }
.help-doc h3 { margin: var(--s-5) 0 var(--s-2); font-size: var(--fs-18); }
.help-doc p { line-height: var(--lh-body); }
.help-doc .help-stuck h2 { margin: 0 0 4px; }
.help-show { margin: 4px 0 6px; }
.hsteps { list-style: none; counter-reset: hstep; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.hsteps > li { counter-increment: hstep; position: relative; padding: 2px 0 0 42px; line-height: 1.55; min-height: 30px; }
.hsteps > li::before { content: counter(hstep); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: var(--r-1); display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.hlist { margin: 0 0 14px; padding-left: 22px; display: grid; gap: var(--s-2); line-height: 1.6; }
.hlist li::marker { color: var(--accent-text); }
.htip { margin: var(--s-4) 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-2); background: var(--surface-2); color: var(--ink); border-left: 4px solid var(--accent); }
/* The shortcuts: the key column as narrow as its keys, where each works on a quiet line under it, so the table
   fits a phone; were it ever wider, its box scrolls and takes the focus (help.js gives it tabindex and a name). */
.help-keys td:first-child { width: 1%; min-width: 7em; }
.help-keys td:first-child .key { white-space: nowrap; }
.help-keys .key-where { display: block; margin-top: 2px; font-size: var(--fs-14); color: var(--ink-3); line-height: 1.35; }
.tablewrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.help-side { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; gap: 10px; }
.help-side .help-search input { min-height: 44px; }
.help-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.help-nav a { display: flex; align-items: center; min-height: 44px; padding: var(--s-2) var(--s-3); border-radius: var(--r-2); color: var(--ink-2); font-size: var(--fs-16); text-decoration: none; }
@media (hover: hover) { .help-nav a:hover { background: var(--surface); color: var(--ink); } }
.help-nav a[aria-current=page] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line); }
@media (max-width: 900px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-side { position: static; padding-top: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .help-stuck > button { flex: 1 1 100%; }
  .help-show > .btn { flex: 1 1 100%; }
  .help-doc .lead { font-size: var(--fs-16); }
}

/* The first welcome (tour.js): three points, one line each, after the same icon squares as the topics. */
.guide-points { list-style: none; margin: 16px 0 6px; padding: 0; display: grid; gap: 12px; }
.guide-points li { display: flex; align-items: center; gap: 14px; font-weight: 600; line-height: 1.35; }

/* The site's own Report a problem form, in the page's dialog. */
.rp { display: grid; gap: 14px; }
.rp > p { margin: 0; }
.rp-kind { justify-self: start; gap: 4px; }
.rp-kind button { min-height: 44px; padding: 0 18px; }
.rp textarea { min-height: 128px; }
.rp-tech { min-height: 44px; justify-self: start; }
.rp-what { font-size: 14px; color: var(--mute); }
.rp-what summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; border-radius: 8px; }
/* A details' own triangle goes when its summary is a flex row, so the summaries here draw a chevron. */
.rp-what summary, .iss-tech summary { list-style: none; }
.rp-what summary::-webkit-details-marker, .iss-tech summary::-webkit-details-marker { display: none; }
.rp-what summary::before, .iss-tech summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 10px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; }
.rp-what[open] summary::before, .iss-tech[open] summary::before { transform: rotate(45deg); }
.rp-what dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 6px 0; }
.rp-what dt { font-weight: 600; color: var(--fg); }
.rp-what dd { margin: 0; overflow-wrap: anywhere; }
.rp-what ul { margin: 0; padding-left: 18px; }

/* Today: Getting started, a calm card that ticks itself off. Boxes side by side on a wide screen; on a phone,
   short rows with the count at the end, so it never pushes the day's work far down. */
.gs { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; align-items: start; }
.gs-head { grid-column: 1; }
.gs-head h2 { margin: 0; }
.gs-head p { margin: 2px 0 0; }
.gs-hide { grid-column: 2; grid-row: 1; margin-right: -18px; }
.gs-list { grid-column: 1 / -1; list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gs-item { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; height: 100%; padding: var(--s-3) 14px; border-radius: var(--r-2); background: var(--surface-2); color: var(--ink); text-decoration: none; }
@media (hover: hover) { a.gs-item:hover { background: var(--accent-soft); } }
.gs-tick { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--line-strong); margin-top: 1px; }
.gs-tick svg { display: none; }
/* done: the site's one done mark (app.css --i-done) */
.gs-item.done .gs-tick { border: 0; background: var(--good); -webkit-mask: var(--i-done) center / contain no-repeat; mask: var(--i-done) center / contain no-repeat; }
.gs-item.done .gs-what b { color: var(--ink-3); }
.gs-what { display: grid; gap: 2px; min-width: 0; }
.gs-what b { font-size: var(--fs-16); line-height: 1.3; }
.gs-what small { color: var(--ink-3); font-size: var(--fs-14); line-height: 1.4; }
.gs-short { display: none; }
@media (max-width: 1100px) { .gs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .gs { grid-template-columns: minmax(0, 1fr); }
  .gs-hide { grid-column: 1; grid-row: 3; justify-self: start; margin: 6px 0 0 -12px; }
  .gs-list { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 8px; }
  .gs-item { align-items: center; padding: 8px 2px; min-height: 44px; border-radius: 0; background: none; border-top: 1px solid var(--line); }
  .gs-list li:first-child .gs-item { border-top: 0; }
  a.gs-item:hover { background: none; }
  .gs-note { display: none; }
  .gs-short { display: block; margin-left: auto; padding-left: var(--s-2); color: var(--ink-3); font-size: var(--fs-14); white-space: nowrap; }
}

/* Admin: the switches under the cap, each 44 px tall to press with 8 px between, and the listening switch's
   note lined up under its words (past the 44 px switch and its 10 px gap). */
.own-switches { gap: 8px; }
.own-switches .switch { min-height: 44px; }
.own-note { margin: 0 0 4px 54px; max-width: 62ch; line-height: 1.45; }

/* Admin: problems reported and requests to join. */
.iss-list > li { align-items: flex-start; }
.iss-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 2px; }
.iss-meta { color: var(--mute); font-size: 14px; }
.iss-meta code { font-size: var(--fs-14); }
.iss-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.iss-acts button { min-height: 44px; padding: 0 14px; font-size: 14px; }
.iss-list li.done .iss-text { color: var(--mute); }
.iss-tech { margin-top: 4px; font-size: 14px; color: var(--mute); }
.iss-tech summary { cursor: pointer; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; border-radius: 6px; }
.iss-tech ul { margin: 4px 0 0; padding-left: 18px; }
.iss-more { margin-top: 10px; }
@media (max-width: 720px) {
  .iss-list > li { flex-direction: column; align-items: stretch; }
  .iss-acts { justify-content: stretch; }
  .iss-acts button { flex: 1 1 0; }
}

/* Admin: People. Delete account sits beside each learner, and under them on a phone, where the name and
   what they have studied keep the width. */
.own-people > li { flex-wrap: wrap; }
.own-people .main { flex: 1 1 220px; }
.own-people [data-del] { min-height: 44px; padding: 0 14px; font-size: 14px; }
/* The delete dialog: a long email breaks where it must, so the dialog never scrolls sideways on a phone. */
.del-who { overflow-wrap: anywhere; }
/* The guides to download on Help, under the topics: each one a link once it is there (the row shows only then). */
.help-guides { margin: var(--s-5) 0 0; gap: 10px; }
.help-guide:empty { display: none; }
