/* ==========================================================================
   Help centre (/help). Built on the tokens of site.css: same canvas, same
   type, same red for "do this". Search first, then every article folded,
   so the page reads as a list of questions rather than a manual.
   ========================================================================== */
.help{padding-top:clamp(18px,3vh,36px)}
.help-hero{max-width:780px;margin:0 auto clamp(26px,4vh,42px);text-align:center}
.help-hero .eyebrow{justify-content:center}
.help-hero h1{font-size:clamp(2.1rem,4.6vw,3.3rem);margin-bottom:12px}
.help-hero .lead{margin:0 auto 24px}
.help-search{position:relative;max-width:660px;margin:0 auto}
.help-search svg{position:absolute;left:19px;top:50%;transform:translateY(-50%);width:22px;height:22px;color:var(--ink-3);pointer-events:none}
.help-search input{padding:1.02em 1.2em 1.02em 54px;font-size:1.08rem;border-radius:999px;background:var(--field);
  border:1px solid var(--line-2);box-shadow:0 18px 40px -28px rgba(var(--shadow),.55)}
.help-search input:focus{border-color:var(--brand);box-shadow:0 0 0 4px var(--tint),0 18px 40px -28px rgba(var(--shadow),.55)}
.help-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px}
.help-chip{border:1px solid var(--line-2);background:var(--surface-3);color:var(--ink-2);border-radius:999px;padding:.46em .95em;
  font-size:.9rem;cursor:pointer;transition:border-color .2s,color .2s}
.help-who{display:inline-flex;gap:4px;margin-top:20px;padding:4px;border-radius:999px;background:var(--tint)}
.help-who button{border:0;background:transparent;border-radius:999px;padding:.52em 1.1em;font-size:.92rem;color:var(--ink-3);cursor:pointer}
.help-who button[aria-pressed=true]{background:var(--surface-3);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.1)}
@media (hover:hover){.help-chip:hover{border-color:var(--red);color:var(--red)}.help-who button:hover{color:var(--ink)}}
/* a phone: eight popular questions stacked took half the screen and pushed the results below it,
   so they become one row that scrolls sideways, fading out on the right */
@media (max-width:640px){
  .help-chips{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;
    scrollbar-width:none;padding-bottom:4px;-webkit-mask-image:linear-gradient(90deg,#000 82%,transparent);
    mask-image:linear-gradient(90deg,#000 82%,transparent)}
  .help-chips::-webkit-scrollbar{display:none}
  .help-chip{flex:none}
}

/* search results: the ranked answers, above the full list */
.help-results{max-width:780px;margin:0 auto clamp(26px,4vh,40px);display:grid;gap:8px}
.help-results-head{margin:0 0 4px;font-family:var(--cond);font-size:.76rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-3)}
.help-result{display:grid;gap:3px;padding:14px 18px;border-radius:14px;background:var(--surface-3);border:1px solid var(--line);
  box-shadow:0 12px 30px -26px rgba(var(--shadow),.6);transition:border-color .2s,transform .25s var(--ease)}
.help-result b{font-weight:600;color:var(--ink);font-size:1.03rem}
.help-result-sec{font-family:var(--cond);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--red)}
.help-result-snip{font-size:.92rem;color:var(--ink-3);line-height:1.5}
@media (hover:hover){.help-result:hover{border-color:var(--red);transform:translateY(-1px)}}
mark.help-hl{background:rgba(245,165,36,.32);color:inherit;border-radius:3px;padding:0 1px}

/* layout: contents on the left, articles on the right */
.help-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:clamp(24px,4vw,56px);align-items:start}
.help-toc{position:sticky;top:78px;max-height:calc(100vh - 96px);overflow:auto;padding:4px 6px 20px 0;font-size:.9rem;scrollbar-width:thin}
.help-toc-group{margin-bottom:16px}
.help-toc-title{display:block;font-family:var(--cond);font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink);margin:0 0 6px}
.help-toc ul{list-style:none;margin:0;padding:0 0 0 10px;border-left:1px solid var(--line)}
.help-toc li a{display:block;padding:.28em 0;color:var(--ink-3);line-height:1.35;transition:color .2s}
@media (hover:hover){.help-toc li a:hover{color:var(--red)}}
@media (max-width:960px){.help-layout{grid-template-columns:1fr}.help-toc{display:none}}

.help-sec{margin-bottom:clamp(30px,5vh,52px);scroll-margin-top:84px}
.help-sec-head{margin-bottom:12px}
.help-sec-head h2{font-size:clamp(1.55rem,2.6vw,2.1rem);margin:8px 0 6px}
.help-sec-head p{margin:0;color:var(--ink-3);font-size:.98rem;max-width:70ch}
.help-badge{display:inline-block;font-family:var(--cond);font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;
  padding:.34em .75em;border-radius:999px;background:var(--tint);color:var(--ink-3)}
.help-badge--teacher{background:rgba(24,49,89,.1);color:var(--brand)}
.help-badge--student{background:rgba(14,158,147,.13);color:var(--ok)}
[data-theme=dark] .help-badge--teacher{background:rgba(100,132,194,.2);color:#CDD9F2}

/* one article */
.help-a{border:1px solid var(--line);border-radius:16px;background:var(--surface);margin-top:10px;scroll-margin-top:84px;
  transition:background .25s,box-shadow .25s}
.help-a[open]{background:var(--surface-3);box-shadow:0 24px 50px -40px rgba(var(--shadow),.6)}
.help-a summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:16px 18px;color:var(--ink);font-weight:500;font-size:1.02rem}
.help-a summary::-webkit-details-marker{display:none}
.help-a summary::after{content:"";flex:none;width:9px;height:9px;margin:0 4px 4px auto;border-right:2px solid var(--ink-3);border-bottom:2px solid var(--ink-3);
  transform:rotate(45deg);transition:transform .25s var(--ease)}
.help-a[open] summary::after{transform:rotate(-135deg);margin-bottom:-4px}
.help-a-title{flex:1;min-width:0}
.help-a-body{padding:0 18px 18px}
.help-a-body p{font-size:1rem;line-height:1.68;margin:0 0 .8em}
.help-intro{color:var(--ink-2)}
.help-a.flash{animation:helpflash 1.6s var(--ease)}
@keyframes helpflash{0%{box-shadow:0 0 0 0 rgba(211,33,40,.45)}100%{box-shadow:0 0 0 14px rgba(211,33,40,0)}}
@media (prefers-reduced-motion:reduce){.help-a.flash{animation:none}}

.help-steps{counter-reset:st;list-style:none;padding:0;margin:6px 0 0}
.help-steps li{counter-increment:st;position:relative;padding-left:40px;margin:0 0 18px}
.help-steps li::before{content:counter(st);position:absolute;left:0;top:1px;width:27px;height:27px;border-radius:50%;
  background:var(--red);color:#fff;display:grid;place-items:center;font-size:.84rem;font-weight:600}
.help-steps li > p{margin:0}
.help-shot{margin:12px 0 0;border-radius:12px;overflow:hidden;border:1px solid var(--line-2);cursor:zoom-in;background:var(--surface-2);max-width:820px}
.help-shot img{width:100%;height:auto;display:block}
.help-shot figcaption{padding:8px 12px;font-size:.84rem;color:var(--ink-3);background:var(--surface);border-top:1px solid var(--line)}
.help-shot--phone{max-width:300px}
.help-a-body > .help-shot{margin-bottom:6px}

/* UI labels inside the text: a button, a menu item, a field */
.help .ui{font-weight:600;color:var(--ink);background:var(--tint);padding:.06em .42em;border-radius:6px;white-space:nowrap}

.help-btns{width:100%;border-collapse:collapse;margin:16px 0 4px;font-size:.95rem}
.help-btns caption{text-align:left;font-family:var(--cond);font-size:.74rem;letter-spacing:.15em;text-transform:uppercase;color:var(--ink-3);padding-bottom:6px}
.help-btns th{text-align:left;vertical-align:top;padding:9px 14px 9px 0;color:var(--ink);font-weight:600;border-top:1px solid var(--line);width:34%}
.help-btns td{padding:9px 0;border-top:1px solid var(--line);color:var(--ink-2);line-height:1.55}
@media (max-width:560px){.help-btns th,.help-btns td{display:block;width:auto;padding:8px 0 0}.help-btns td{border-top:0;padding:2px 0 9px}}
.help-tips{margin-top:14px;padding:12px 16px;border-radius:12px;background:rgba(245,165,36,.1);border-left:3px solid var(--sun)}
.help-tips p{margin:0 0 .45em;font-size:.95rem;line-height:1.6}
.help-tips p:last-child{margin-bottom:0}
.help-a-foot{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line);font-size:.9rem;color:var(--ink-3)}
.help-a-foot a{color:var(--brand);border-bottom:1px solid var(--line-2)}
.help-copy{margin-left:auto;border:0;background:none;color:var(--ink-3);cursor:pointer;font-size:.86rem;text-decoration:underline;text-underline-offset:3px;padding:0}
.help-empty{padding:28px;border:1px dashed var(--line-2);border-radius:16px;text-align:center;color:var(--ink-3)}
.help-empty p{margin:0 0 14px}
.help-toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,12px);z-index:200;background:var(--brand);color:var(--brand-ink);
  padding:.75em 1.3em;border-radius:999px;font-size:.92rem;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s var(--ease)}
.help-toast.on{opacity:1;transform:translate(-50%,0)}
@media (max-width:640px){.help-a summary{padding:14px 14px}.help-a-body{padding:0 14px 14px}.help-steps li{padding-left:36px}}
