/* Help centre (uxC, v1.0): /help/ index and article shell.  Scoped to .help-centre so it can be
   redesigned or replaced on its own.  Tokens follow the shell: text and links use the accessible
   brand token (--brand-action), gold is decoration only, focus is the shared #007DC5 ring.
   Loaded only by help/index.html and help/_article.html. */
.help-centre {
  --hc-ink: #172b48;
  --hc-muted: #52637a;      /* 6.2:1 on white */
  --hc-line: #d6e0ec;
  --hc-soft: #f4f7fb;
  --hc-tint: #eef4fb;
  --hc-gold: #c9a84c;       /* decoration only */
  color: var(--hc-ink);
  min-width: 0;
}
/* R3 (v0.10.1): the same ink and top size (34px) as every other page h1. */
.help-centre h1 { color: var(--text, #162d4c); font-size: clamp(1.75rem, 3vw, 2.125rem); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 .7rem; overflow-wrap: anywhere; }
.help-centre h2 { color: var(--hc-ink); letter-spacing: -.02em; }
.help-centre .lead { color: var(--hc-muted); font-size: 1rem; line-height: 1.65; max-width: 62ch; margin: 0; }
.help-centre .eyebrow { margin: 0 0 .6rem; }
.help-centre :is(a, summary):focus-visible { outline: 3px solid var(--ux-focus, #007dc5); outline-offset: 3px; }
.help-centre :is(h2, section)[id] { scroll-margin-top: 1.5rem; }

/* ── Index ─────────────────────────────────────────────────────────────── */
.help-hero { padding: 0 0 1.5rem; margin: 0 0 1.75rem; border-bottom: 1px solid var(--hc-line); }
.help-hero__roles { margin: .9rem 0 0; max-width: 70ch; }
.help-jump ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.help-jump li { min-width: 0; max-width: 100%; }
.help-jump a {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; max-width: 100%; padding: .35rem .9rem;
  color: var(--brand-action, #002561); background: #fff; border: 1px solid #c3d1e3; border-radius: 999px;
  font-size: .875rem; font-weight: 600; text-decoration: none;
}
.help-jump__label { min-width: 0; overflow-wrap: anywhere; }
.help-jump__count { flex-shrink: 0; }
.help-jump a:hover { background: var(--hc-tint); border-color: var(--brand-action, #002561); }
.help-jump__count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem; border-radius: 999px; background: var(--hc-tint); color: var(--hc-ink); font-size: .75rem; font-variant-numeric: tabular-nums; }

.help-section { margin: 0 0 2.5rem; }
.help-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.help-section__head h2 { margin: 0; font-size: 1.3rem; line-height: 1.3; }
.help-section__count { margin: 0; color: var(--hc-muted); font-size: .8125rem; white-space: nowrap; }
.help-section__kicker {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .35rem;
  color: var(--hc-muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.help-section__kicker::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--hc-gold); }

.help-topic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: .9rem; list-style: none; margin: 0; padding: 0; }
.help-card {
  position: relative; display: flex; flex-direction: column; gap: .45rem; min-width: 0;
  padding: 1.05rem 2.6rem 1.1rem 1.15rem; background: #fff; border: 1px solid var(--hc-line); border-radius: 12px;
}
.help-card__title { margin: 0; font-size: 1rem; line-height: 1.4; font-weight: 650; letter-spacing: -.01em; }
.help-card__title a { color: var(--brand-action, #002561); text-decoration: none; overflow-wrap: anywhere; }
/* The whole card is the link's target area; the link text stays the accessible name. */
.help-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.help-card__summary { margin: 0; color: var(--hc-muted); font-size: .875rem; line-height: 1.6; }
.help-card__meta { margin: auto 0 0; padding-top: .35rem; color: var(--hc-muted); font-size: .75rem; }
.help-card__arrow { position: absolute; top: 1rem; right: 1rem; color: var(--hc-muted); font-size: 1rem; line-height: 1.4; }
.help-card:hover { border-color: #9fb4cc; box-shadow: 0 6px 18px #0025610d; }
.help-card:hover .help-card__title a { text-decoration: underline; text-underline-offset: 3px; }
.help-card:hover .help-card__arrow { color: var(--brand-action, #002561); }
.help-card:focus-within { border-color: var(--brand-action, #002561); box-shadow: 0 0 0 1px var(--brand-action, #002561); }
.help-card--featured { padding-top: 1.25rem; border-top: 3px solid var(--hc-gold); background: linear-gradient(180deg, #fbfcfe 0%, #fff 60%); }
.help-card--featured .help-card__title { font-size: 1.075rem; }
.help-section--yours .help-topic-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }

.help-contact { margin: 1rem 0 0; padding: 1.25rem 1.4rem; background: var(--hc-soft); border: 1px solid var(--hc-line); border-left: 3px solid var(--hc-gold); border-radius: 10px; }
.help-contact h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.help-contact p { margin: 0; color: var(--hc-ink); font-size: .9375rem; max-width: 70ch; }

/* ── Article ───────────────────────────────────────────────────────────── */
.help-back { margin: 0 0 1.25rem; }
.help-back--end { margin: 2rem 0 0; }
.help-article { container-type: inline-size; }
.help-article__header { max-width: 72ch; padding-bottom: 1.5rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--hc-line); }

.help-article__layout { display: block; }
.help-article-body { max-width: 72ch; min-width: 0; overflow-wrap: anywhere; }
.help-article .help-topic {
  margin: 0 0 1.1rem; padding: 1.35rem 1.5rem 1.4rem; background: #fff;
  border: 1px solid var(--hc-line); border-radius: 12px; box-shadow: none;
}
.help-article .help-topic h2 { margin: 0 0 .85rem; font-size: 1.2rem; line-height: 1.35; }
.help-article .help-topic :is(p, li) { font-size: .96875rem; line-height: 1.7; }
.help-article .help-topic > p { margin: 0 0 .85rem; }
.help-article .help-topic > :last-child { margin-bottom: 0; }
.help-article .help-topic ul { margin: 0 0 .85rem; padding-left: 1.25rem; }
.help-article .help-topic ul > li { margin: 0 0 .5rem; padding-left: .2rem; }
.help-article .help-topic ul > li::marker { color: var(--hc-muted); }

/* Numbered steps: list semantics kept with role="list" on the <ol>. */
.help-article ol.help-steps { counter-reset: help-step; list-style: none; margin: 0 0 .9rem; padding: 0; }
.help-article ol.help-steps > li { counter-increment: help-step; position: relative; min-height: 2rem; margin: 0; padding: .1rem 0 1rem 2.85rem; }
.help-article ol.help-steps > li:last-child { padding-bottom: .2rem; }
.help-article ol.help-steps > li::before {
  content: counter(help-step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 1.95rem; height: 1.95rem; border-radius: 50%;
  color: var(--brand-action, #002561); background: var(--hc-tint); border: 1px solid #c3d1e3;
  font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
}
.help-article ol.help-steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: .97rem; top: 2.15rem; bottom: .2rem; width: 1px; background: var(--hc-line);
}

/* On-screen labels (buttons, fields, statuses) and page links inside the text. */
.help-article-body strong {
  padding: .05em .4em; color: var(--hc-ink); background: #f1f4f8; border: 1px solid #d3dce8; border-radius: 5px;
  font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.help-article-body a {
  color: var(--brand-action, #002561); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.help-article-body a:hover { text-decoration-thickness: 2px; background: var(--hc-tint); border-radius: 3px; }
.help-article-body a strong { color: inherit; }
.help-article-body code { padding: .05em .35em; background: var(--hc-soft); border: 1px solid var(--hc-line); border-radius: 4px; font-size: .875em; overflow-wrap: anywhere; }

/* Tips and cautions. */
.help-article .help-note {
  margin: 1rem 0 0; padding: .85rem 1rem .85rem 1.1rem; color: var(--hc-ink); background: var(--hc-soft);
  border: 1px solid var(--hc-line); border-left: 3px solid var(--hc-gold); border-radius: 8px;
  font-size: .9375rem; line-height: 1.65;
}
.help-article .help-note strong { background: #fff; }

/* "On this page" (help-centre.js). */
.help-toc { margin: 0 0 1.25rem; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--hc-line); border-radius: 12px; }
.help-toc__title { margin: 0 0 .5rem; color: var(--hc-muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.help-toc__list { list-style: none; margin: 0; padding: 0; }
.help-toc__list a { display: flex; align-items: center; min-height: 44px; padding: .3rem .55rem; border-left: 2px solid var(--hc-line); color: var(--brand-action, #002561); font-size: .875rem; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.help-toc__list a:hover { border-left-color: var(--hc-gold); background: var(--hc-soft); text-decoration: underline; text-underline-offset: 3px; }
/* Use the space available to the article, including enlarged text, rather than
   the viewport width: the application sidebar also occupies reading space. */
@container (min-width: 56rem) {
  .help-article__layout.has-toc { display: grid; grid-template-columns: minmax(0, 72ch) minmax(13rem, 16rem); gap: 2rem; align-items: start; }
  /* Keep every contents link reachable on short screens and at enlarged text sizes.
     Native scrolling also brings keyboard-focused links into view. */
  .help-article__layout.has-toc .help-toc { order: 2; position: sticky; top: 1.25rem; margin: 0; max-height: calc(100vh - 2.5rem); max-height: calc(100svh - 2.5rem); overflow-y: auto; scrollbar-gutter: stable; }
  .help-article__layout.has-toc .help-article-body { order: 1; }
}

/* Related articles. */
.help-related { margin: 2.25rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--hc-line); max-width: 72ch; }
.help-related h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.help-topic-list--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.help-topic-list--compact .help-card__title { font-size: .95rem; }

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .help-section__head { flex-wrap: wrap; align-items: baseline; }
  .help-article .help-topic { padding: 1.1rem 1rem 1.15rem; }
  .help-article ol.help-steps > li { padding-left: 2.5rem; }
  .help-card { padding-right: 2.3rem; }
  .help-back--end .btn { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .help-card, .help-jump a, .help-toc__list a { transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
}
@media (forced-colors: active) {
  .help-card, .help-toc, .help-article .help-topic, .help-article .help-note, .help-contact, .help-jump a { border-color: CanvasText; }
  .help-article ol.help-steps > li::before { border-color: CanvasText; forced-color-adjust: none; color: CanvasText; background: Canvas; }
  .help-article-body strong { border-color: CanvasText; }
}
@media print {
  .help-jump, .help-toc, .help-back, .help-card__arrow { display: none !important; }
  .help-card, .help-article .help-topic { break-inside: avoid; box-shadow: none; }
  .help-card__title a::after { content: none; }
  .help-article__layout.has-toc { display: block; }
}
