/* 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-).
   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(--faint); pointer-events: none; }
.help-search input { padding-left: 44px; min-height: 48px; border-radius: 999px; }
.help-count { min-height: 1.5em; margin: 8px 4px 0; }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* The topics, as cards that are links. */
.help-cards { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.help-card { display: flex; gap: 14px; align-items: flex-start; height: 100%; min-height: 40px; padding: 16px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s; }
@media (hover: hover) { .help-card:hover { border-color: var(--line2); transform: translateY(-1px); } }
.help-card.own { background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel)); }
.help-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.help-ic svg { width: 22px; height: 22px; }
.help-ic.big { width: 48px; height: 48px; border-radius: 14px; }
.help-ic.big svg { width: 26px; height: 26px; }
.help-txt { display: grid; gap: 3px; min-width: 0; }
.help-t { font-weight: 700; font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.help-t .chip { font-size: 14px; padding: 2px 8px; vertical-align: 1px; margin-left: 4px; }
.help-s { color: var(--mute); font-size: 14.5px; line-height: 1.45; }
.help-hit { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line2); color: var(--mute); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.help-none { margin-top: 10px; }
.help-stuck { display: flex; gap: 14px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 28px; }
.help-stuck h2 { margin-bottom: 4px; }
.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) 280px; gap: 32px; align-items: start; }
.help-doc { max-width: 720px; min-width: 0; }
.help-title { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.help-title h1 { margin: 0; font: 600 clamp(26px, 3.4vw, 34px)/1.15 var(--serif); letter-spacing: -.015em; overflow-wrap: anywhere; }
.help-doc .lead { font-size: 18px; color: var(--mute); margin: 0 0 16px; }
.help-doc h2 { margin: 30px 0 10px; font-size: 20px; }
.help-doc h3 { margin: 20px 0 8px; font-size: 16px; }
.help-doc p { line-height: 1.6; }
.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: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.hlist { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.55; }
.hlist li::marker { color: var(--accent); }
.htip { margin: 16px 0; padding: 12px 16px; border-radius: var(--r-sm); background: var(--accent-2-soft); color: var(--fg); border-left: 4px solid var(--accent-2); }
.help-keys td:first-child { white-space: nowrap; width: 1%; }
.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: 8px 12px; border-radius: 10px; color: var(--mute); font-weight: 600; font-size: 15px; text-decoration: none; }
@media (hover: hover) { .help-nav a:hover { background: var(--sunk); color: var(--fg); } }
.help-nav a[aria-current=page] { background: var(--sunk); color: var(--fg); box-shadow: inset 3px 0 0 var(--accent); }
@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 > .primary { flex: 1 1 100%; }
  .help-show > .btn { flex: 1 1 100%; }
  .help-doc .lead { font-size: 17px; }
}

/* 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: 12px 14px; border-radius: var(--r-sm); background: var(--sunk); color: var(--fg); text-decoration: none; }
@media (hover: hover) { a.gs-item:hover { background: color-mix(in srgb, var(--sunk) 70%, var(--line2)); } }
.gs-tick { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--field); margin-top: 1px; }
.gs-tick svg { width: 15px; height: 15px; }
.gs-item.done .gs-tick { background: var(--accent-2); border-color: var(--accent-2); color: var(--panel); }
.gs-item.done .gs-what b { color: var(--mute); text-decoration: line-through; text-decoration-thickness: 1px; }
.gs-what { display: grid; gap: 2px; min-width: 0; }
.gs-what b { font-size: 15px; line-height: 1.3; }
.gs-what small { color: var(--mute); font-size: 14px; line-height: 1.35; }
.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: 8px; color: var(--mute); font-size: 14px; 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: 13.5px; }
.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: each one is a link once it is there, and a quiet line while it is being
   prepared (not a control, so it never looks pressable). */
.help-guides { margin: 0 0 16px; gap: 10px; }
.help-guide:empty { display: none; }
.help-soon { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--line2); color: var(--mute); font-size: 14.5px; }
.help-soon svg { width: 18px; height: 18px; flex: none; }
