/* The help page (Pagalba). The same horizon as the other pages holding one thing: a search box. Under it a contents list and the text, set
   for reading: one column of about 44 rem, generous leading, steps numbered only where there is a sequence. Built on ops.css (band, nav). */

.help { --gutter: clamp(1rem, 1.7vw, 2.75rem); --hp-w: 69.5rem; }
.hp-head { display: grid; gap: 0.9rem; padding-bottom: clamp(1.2rem, 2.4vh, 2rem); }
.hp-head .verdict { margin: 0; }
.hp-lead { max-width: 42rem; color: var(--ink); font-size: 1.125rem; line-height: 1.45; text-wrap: pretty; }

.hp-search { position: relative; width: min(100%, 40rem); }
.hp-search input {
  width: 100%;
  min-height: 3.5rem;
  padding: 0 3.4rem 0 1.4rem;
  background: color-mix(in srgb, var(--ground) 64%, transparent);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-size: 1.1875rem;
  -webkit-appearance: none;
  appearance: none;
}
.hp-search input::placeholder { color: var(--ink-2); opacity: 1; }
.hp-search input::-webkit-search-cancel-button { display: none; }
.hp-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-color: var(--ink-2); }
.hp-clear {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.25rem;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
}
.hp-clear[hidden] { display: none; }
.hp-clear span { position: relative; width: 1rem; height: 1rem; }
.hp-clear span::before, .hp-clear span::after { content: ""; position: absolute; left: 0; top: calc(50% - 1px); width: 100%; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.hp-clear span::after { transform: rotate(-45deg); }
.hp-clear:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.hp-found { min-height: 1.4em; color: var(--ink); font-size: 0.9375rem; }
.hp-found:empty { display: none; }

/* ---- Contents and text ----------------------------------------------------------------------------------- */

.hp-wrap { display: grid; gap: 1.2rem 4.5rem; align-items: start; padding: 1.3rem var(--gutter) 5rem; }
.hp-toc ol { display: flex; flex-direction: column; }
.hp-toc a { display: block; padding: 0.42rem 0.9rem; border-left: 2px solid var(--line); color: var(--ink-2); font-size: 0.9375rem; line-height: 1.3; text-decoration: none; }
.hp-toc a:hover { color: var(--ink); border-left-color: var(--line-2); }
.hp-toc a[aria-current="true"] { border-left-color: var(--state, var(--lamp)); color: var(--ink); font-weight: 620; }
.hp-toc-btn { display: none; align-items: center; justify-content: space-between; gap: 0.8rem; width: 100%; min-height: 2.9rem; padding: 0 1.1rem; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font: inherit; font-weight: 560; }
.hp-chev { width: 0.5em; height: 0.5em; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-0.15em) rotate(45deg); transition: transform 0.12s ease; }
.hp-toc-btn[aria-expanded="true"] .hp-chev { transform: translateY(0.1em) rotate(-135deg); }
@media (max-width: 999px) {
  .hp-toc-btn { display: flex; }
  .hp-toc ol { display: none; margin-top: 0.5rem; padding: 0.3rem 0; }
  .hp-toc[data-open="1"] ol { display: flex; }
  .hp-toc a { min-height: 2.75rem; display: flex; align-items: center; }
}
@media (min-width: 1000px) {
  /* contents and text centred as one block, the head above lined up with it */
  .hp-wrap { grid-template-columns: 17rem minmax(0, 48rem); }
  .hp-wrap, .hp-head { padding-inline: max(var(--gutter), calc((100% - var(--hp-w)) / 2)); }
  .hp-toc { position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
}

.hp-main:focus { outline: none; }
.hp-sec { padding: 2.6rem 0 0.4rem; border-top: 1px solid var(--line-3); scroll-margin-top: 1rem; }
.hp-sec:first-child { padding-top: 0.2rem; border-top: 0; }
/* inline flow, the # straight after the text with no space: it wraps with the heading's last word, never onto a line alone */
.hp-sec h2, .hp-h3 { position: relative; text-wrap: balance; }
.hp-sec h2 { margin-bottom: 0.7rem; font-size: clamp(1.55rem, 1.2rem + 0.9vw, 2rem); font-weight: 560; line-height: 1.15; letter-spacing: -0.015em; }
.hp-h3 { margin: 2.1rem 0 0.5rem; font-size: 1.1875rem; font-weight: 620; line-height: 1.3; scroll-margin-top: 1rem; }
.hp-lead2 { max-width: 44rem; margin-bottom: 1.3rem; color: var(--ink-2); font-size: 1.1875rem; line-height: 1.5; text-wrap: pretty; }
.hp-tag { display: inline-block; margin-left: 0.8rem; vertical-align: 0.2em; white-space: nowrap; padding: 0.05rem 0.7rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; }

.hp-perma { margin-left: 0.35em; color: var(--ink-3); font-size: 0.9em; font-weight: 400; text-decoration: none; opacity: 0; transition: opacity 0.12s; }
.hp-sec h2:hover .hp-perma, .hp-h3:hover .hp-perma, .hp-perma:focus-visible { opacity: 1; }
.hp-perma:hover { color: var(--ink); }
@media (hover: none) { .hp-perma { opacity: 0.55; } }
.hp-sec:target > h2, .hp-h3:target { box-shadow: -1rem 0 0 -0.7rem var(--state, var(--lamp)); }

.hp-sec > p, .hp-sec li, .hp-dl dd, .hp-note p { font-size: 1.0625rem; line-height: 1.62; text-wrap: pretty; }
.hp-sec > p { max-width: 44rem; margin-top: 0.9rem; }
.hp-sec > p:first-of-type { margin-top: 0; }
.hp-sec a { color: var(--ink); text-decoration-color: var(--ink-3); text-underline-offset: 0.2em; }
.hp-sec a:hover { text-decoration-color: var(--ink); }
.hp-sec a.hp-perma { text-decoration: none; }
.hp-sec strong { font-weight: 650; }
.hp-sec code { padding: 0.08em 0.38em; border-radius: 0.35em; background: var(--sheet-hi); font-family: var(--mono); font-size: 0.875em; overflow-wrap: anywhere; }
mark { padding: 0 0.12em; border-radius: 0.2em; background: color-mix(in srgb, var(--amber) 40%, transparent); color: inherit; }

.hp-ul, .hp-ol { display: grid; gap: 0.6rem; max-width: 44rem; margin-top: 0.9rem; }
.hp-ul li { position: relative; padding-left: 1.4rem; }
.hp-ul li::before { content: ""; position: absolute; left: 0.2rem; top: 0.72em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--ink-3); }
.hp-ol { counter-reset: step; gap: 0.9rem; }
.hp-ol li { position: relative; padding-left: 2.8rem; counter-increment: step; }
.hp-ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hp-dl { display: grid; gap: 0.9rem; max-width: 44rem; margin-top: 0.9rem; }
.hp-dl > div { display: grid; gap: 0.1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.hp-dl > div:first-child { padding-top: 0; border-top: 0; }
.hp-dl dt { font-size: 1.0625rem; font-weight: 640; }
.hp-dl dd { color: var(--ink-2); }
@media (min-width: 700px) { .hp-dl > div { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.4rem; } }

.hp-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.8rem; align-items: baseline; max-width: 44rem; margin-top: 1.1rem; padding: 0.85rem 1.1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--sheet); }
.hp-note .mk { width: 0.62em; height: 0.62em; transform: translateY(0.02em); }
.hp-note[data-tone="warn"] { border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: var(--amber-wash); }

.hp-none { max-width: 40rem; padding: 1rem 0; }
.hp-none-t { margin-bottom: 0.8rem; font-size: 1.3125rem; font-weight: 560; }
.hp-none p + p { margin-top: 0.8rem; color: var(--ink-2); }
.hp-btn { min-height: 2.75rem; padding: 0 1.3rem; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font: inherit; font-weight: 560; }
.hp-btn:hover { background: var(--sheet-hi); }
.hp-failed { color: var(--ember); font-weight: 600; }
.help .loading { color: var(--ink-2); }

@media (forced-colors: active) {
  mark { background: Highlight; color: HighlightText; }
  .hp-toc a[aria-current="true"] { outline: 2px solid Highlight; }
}
