/*
 * Help center (design direction A, "Calm hub"). Loaded only on help views (inc/help/views.php).
 * Everything is scoped to .help so the site header and footer keep their own styles.
 */

.help {
  --help-text: #363131;
  /* Brand tokens from css/style.css, with text colours nudged to meet WCAG AA (4.5:1):
     muted #7E7E7E -> #6F6B6B, link #51AFEE -> #1A6FA8, and white text sits on #D63B2B, not #FA5847. */
  --help-muted: #6F6B6B;
  --help-lead: #5a5555;
  --help-accent: #FA5847;
  --help-accent-strong: #D63B2B;
  --help-accent-ink: #C23B2C;
  --help-accent-soft: #FFF0EE;
  --help-link: #1A6FA8;
  --help-focus: #51AFEE;
  --help-surface: #F9F8F8;
  --help-chip: #F4F2F2;
  --help-border: #DDDDDD;
  --help-rule: #EEEEEE;
  --help-callout: #EEF7FE;
  --help-head: MuseoSansbold, 'Museo Sans', 'Helvetica Neue', Arial, sans-serif;
  --help-body: Rubik, 'Helvetica Neue', Arial, sans-serif;
  --help-sticky-top: 112px; /* clears the fixed site header */

  color: var(--help-text);
  font-family: var(--help-body);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 64px;
}

/* Reset the theme's global type rules inside help views. */
.help h1, .help h2, .help h3, .help h4 {
  font-family: var(--help-head);
  font-weight: normal;
  line-height: 1.2;
  color: var(--help-text);
  margin: 0;
}
.help p, .help li {
  font-family: var(--help-body);
  font-size: inherit;
  line-height: inherit;
  font-weight: normal;
  color: inherit;
}
.help a { color: var(--help-link); }
.help a:hover { text-decoration: underline; }
.help a:focus-visible,
.help button:focus-visible,
.help summary:focus-visible,
.help input:focus-visible {
  outline: 2px solid var(--help-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.help [hidden] { display: none !important; }

.help-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.help-icon { display: block; width: 22px; height: 22px; }

.help-lead { font-size: 20px; line-height: 1.5; color: var(--help-lead); margin: 0 0 16px; }

.help-badge {
  display: inline-block;
  font-family: var(--help-head);
  font-size: 12px;
  line-height: 1.6;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--help-accent-soft);
  color: var(--help-accent-ink);
}

/* Breadcrumb */
.help-crumbs { padding: 24px 0 0; font-size: 14px; color: var(--help-muted); }
.help-crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.help-crumbs li { font-size: 14px; }
.help-crumbs li + li::before { content: "\203A"; margin: 0 8px; color: var(--help-muted); }
.help-crumbs a { color: var(--help-muted); }
.help-crumbs [aria-current] { color: var(--help-text); }

/* Search box */
.help-search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.help-search__field { position: relative; display: flex; align-items: center; }
.help-search__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--help-muted); pointer-events: none; }
.help .help-search__input {
  width: 100%;
  font: inherit;
  font-size: 18px;
  color: var(--help-text);
  padding: 18px 112px 18px 52px;
  border: 1px solid var(--help-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  -webkit-appearance: none;
  appearance: none;
}
.help .help-search__input::placeholder { color: var(--help-muted); opacity: 1; }
.help .help-search__input:focus { outline: 2px solid var(--help-focus); outline-offset: 0; border-color: transparent; }
.help-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.help-search__submit {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--help-head);
  font-size: 15px;
  color: #fff;
  background: var(--help-accent-strong);
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}
.help-search__submit:hover { filter: brightness(.95); }
.help-search--compact .help-search__input { font-size: 16px; padding: 12px 92px 12px 44px; border-radius: 10px; box-shadow: none; }
.help-search--compact .help-search__icon { left: 14px; }
.help-search--compact .help-search__submit { font-size: 14px; padding: 7px 12px; right: 6px; }

.help-search__results {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--help-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  max-height: 70vh;
  overflow-y: auto;
}
.help-search__option { border-radius: 8px; }
.help-search__option a { display: block; padding: 10px 12px; color: var(--help-text); text-decoration: none; }
.help-search__option a:hover { text-decoration: none; }
.help-search__option-title { display: block; font-family: var(--help-head); font-size: 16px; }
.help-search__option-desc { display: block; font-size: 14px; color: var(--help-muted); line-height: 1.4; margin-top: 2px; }
.help-search__option:hover,
.help-search__option[aria-selected="true"] { background: var(--help-accent-soft); }
.help-search__option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--help-accent); }
.help-search__option--all a { font-family: var(--help-head); font-size: 14px; color: var(--help-link); }
.help-search__empty { padding: 10px 12px; font-size: 14px; color: var(--help-muted); }

/* Home hero */
.help-hero { background: var(--help-surface); text-align: center; padding: 64px 0 56px; border-bottom: 1px solid var(--help-border); }
.help .help-hero__title { font-size: 44px; margin-bottom: 12px; }
.help .help-hero__lead { color: var(--help-muted); margin: 0 0 28px; font-size: 18px; }
.help .help-hero__popular { margin: 18px 0 0; font-size: 14px; color: var(--help-muted); }
.help-hero__popular a { margin: 0 6px; display: inline-block; }

/* Sections and cards */
.help-section { padding: 56px 0 0; }
.help .help-section__title { font-size: 28px; margin-bottom: 24px; }

.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }

.help-card {
  position: relative;
  border: 1px solid var(--help-border);
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}
.help-card:hover, .help-card:focus-within { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); border-color: var(--help-accent); }
.help-card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--help-accent-soft);
  color: var(--help-accent-ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  flex: none;
}
.help .help-card__title { font-size: 19px; margin-bottom: 6px; }
.help-card__title a { color: var(--help-text); }
.help .help-card__desc { color: var(--help-muted); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.help-card__links { list-style: none; margin: 0 0 12px; padding: 12px 0 0; border-top: 1px solid var(--help-rule); }
.help .help-card__links li { font-size: 14px; line-height: 1.5; padding: 4px 0; }
.help-card__count { font-size: 13px; color: var(--help-muted) !important; }
.help .help-card__topic { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--help-muted); margin: 0 0 6px; }
.help-card--article .help-card__desc:last-child { margin-bottom: 0; }

.help-popular { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.help-popular a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--help-surface);
  color: var(--help-text);
  font-family: var(--help-head);
}
.help-popular a:hover { background: var(--help-accent-soft); text-decoration: none; }

/* Contact band */
.help-band {
  margin-top: 56px;
  background: var(--help-text);
  color: #fff;
  border-radius: 16px;
  padding: 40px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.help .help-band__title { font-size: 26px; margin-bottom: 6px; color: #fff; }
.help .help-band__text { margin: 0; color: #ccc; }
.help-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.help-band--compact { margin-top: 48px; padding: 28px; }
.help-band--compact .help-band__title { font-size: 22px; }
.help-band a:focus-visible, .help-band button:focus-visible { outline-color: #fff; }

.help-btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 10px;
  font-family: var(--help-head);
  font-size: 16px;
  line-height: 1.2;
  background: var(--help-accent-strong);
  color: #fff !important;
  border: 1px solid var(--help-accent-strong);
  cursor: pointer;
}
.help-btn:hover { text-decoration: none !important; filter: brightness(.95); }
.help-btn--outline { background: transparent; border-color: #fff; }

/* Topic page */
.help-topic__layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; padding-top: 16px; }
.help-topic__head { display: flex; gap: 16px; align-items: flex-start; margin: 8px 0 28px; }
.help-topic__head .help-card__icon { margin: 6px 0 0; }
.help .help-topic__title { font-size: 40px; margin-bottom: 8px; }
.help-list { display: grid; gap: 16px; }
.help-topic__aside { align-self: start; position: sticky; top: var(--help-sticky-top); padding-top: 8px; }
.help-topics-nav { margin-top: 24px; border-left: 2px solid var(--help-rule); padding-left: 16px; }
.help .help-topics-nav__title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--help-muted); margin-bottom: 10px; }
.help-topics-nav ul { margin: 0; padding: 0; list-style: none; }
.help-topics-nav a { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; color: var(--help-text); }
.help-topics-nav .help-icon { width: 18px; height: 18px; color: var(--help-muted); flex: none; }
.help-topics-nav a[aria-current] { color: var(--help-accent-ink); font-family: var(--help-head); }
.help-topics-nav a[aria-current] .help-icon { color: var(--help-accent); }

/* Article */
.help-article {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  grid-template-areas: "head" "body" "foot";
  justify-content: center;
  column-gap: 64px;
  padding-top: 16px;
}
.help-article--toc { grid-template-columns: minmax(0, 720px) 240px; grid-template-areas: "head toc" "body toc" "foot toc"; }
.help-article__head { grid-area: head; }
.help-article__body { grid-area: body; }
.help-article__foot { grid-area: foot; }
.help .help-article__title { font-size: 40px; margin: 8px 0 12px; }
.help .help-meta {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  font-size: 14px;
  color: var(--help-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--help-border);
  margin: 0 0 28px;
}

.help-toc { grid-area: toc; align-self: start; position: sticky; top: var(--help-sticky-top); font-size: 14px; border-left: 2px solid var(--help-rule); padding-left: 16px; margin-top: 8px; }
.help-toc summary {
  font-family: var(--help-head);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--help-muted);
  margin-bottom: 10px;
  list-style: none;
  cursor: default;
}
.help-toc summary::-webkit-details-marker { display: none; }
.help-toc ol { margin: 0; padding: 0; list-style: none; }
.help .help-toc li { font-size: 14px; line-height: 1.4; }
.help-toc a { display: block; color: var(--help-text); padding: 4px 0; }
.help-toc a.is-active { color: var(--help-accent-ink); font-family: var(--help-head); }

/* Article body */
.help-prose { min-width: 0; }
.help-prose > :first-child { margin-top: 0; }
.help-prose p { margin: 0 0 18px; }
.help-prose h2 { position: relative; font-size: 26px; margin: 36px 0 12px; scroll-margin-top: var(--help-sticky-top); }
.help-prose h3 { font-size: 20px; margin: 28px 0 10px; scroll-margin-top: var(--help-sticky-top); }
.help-prose ul { list-style: disc; padding-left: 24px; margin: 0 0 20px; }
.help-prose ul li { margin-bottom: 6px; }
.help-prose ol { list-style: none; counter-reset: help-step; padding: 0; margin: 0 0 20px; }
.help-prose ol > li { counter-increment: help-step; position: relative; padding: 4px 0 14px 48px; }
.help-prose ol > li::before {
  content: counter(help-step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--help-accent-strong);
  color: #fff;
  font-family: var(--help-head);
  font-size: 15px;
  line-height: 32px;
  text-align: center;
}
.help-prose li > p { margin: 0 0 8px; }
.help-prose li > ul, .help-prose li > ol { margin: 8px 0 0; }

/* Bold text names a dashboard control, so it reads as a UI label. */
.help-prose p strong, .help-prose li strong, .help-prose td strong {
  font-family: var(--help-head);
  font-weight: normal;
  background: var(--help-chip);
  border: 1px solid var(--help-border);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: .92em;
}
.help-prose--plain p strong, .help-prose--plain li strong, .help-prose--plain td strong {
  font-family: inherit; font-weight: bold; background: none; border: 0; padding: 0; font-size: inherit;
}

.help-prose code { background: var(--help-chip); padding: 2px 6px; border-radius: 4px; font-size: .9em; word-break: break-all; }
.help-prose pre { background: var(--help-chip); padding: 16px; border-radius: 10px; overflow-x: auto; margin: 0 0 20px; }
.help-prose pre code { background: none; padding: 0; word-break: normal; }
.help-prose img { display: block; max-width: 100%; height: auto; border: 1px solid var(--help-border); border-radius: 12px; margin: 0 0 24px; }
.help-prose p > img:only-child { margin-bottom: 0; }
.help-prose blockquote {
  border-left: 4px solid var(--help-focus);
  background: var(--help-callout);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 0 0 24px;
}
.help-prose blockquote > :last-child { margin-bottom: 0; }
.help-prose hr { border: 0; border-top: 1px solid var(--help-border); margin: 32px 0; }
.help-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.help-prose th, .help-prose td { border: 1px solid var(--help-border); padding: 8px 12px; text-align: left; vertical-align: top; }
.help-prose th { background: var(--help-surface); font-family: var(--help-head); font-weight: normal; }

/* Copy-link button added to h2s by js/help.js */
.help-anchor {
  margin-left: 8px;
  padding: 2px 6px;
  font-family: var(--help-head);
  font-size: 18px;
  line-height: 1;
  color: var(--help-muted);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  vertical-align: middle;
}
.help-prose h2:hover .help-anchor, .help-anchor:focus-visible, .help-anchor.is-copied { opacity: 1; }
.help-anchor:hover { color: var(--help-accent-ink); }
@media (hover: none) { .help-anchor { opacity: 1; } }

/* Related, previous/next */
.help-related { margin-top: 40px; }
.help .help-related__title { font-size: 20px; margin-bottom: 12px; }
.help-related ul { margin: 0; padding: 0; list-style: none; }
.help-related a { display: block; padding: 10px 0; border-bottom: 1px solid var(--help-rule); }
.help-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 0; }
.help-pn a { border: 1px solid var(--help-border); border-radius: 10px; padding: 14px 18px; color: var(--help-text); font-family: var(--help-head); }
.help-pn a:hover { border-color: var(--help-accent); text-decoration: none; }
.help-pn small { display: block; color: var(--help-muted); font-family: var(--help-body); font-size: 13px; }
.help-pn__next { grid-column: 2; text-align: right; }

/* Search results */
.help-narrow { max-width: 880px; }
.help-results__head { padding: 8px 0 28px; }
.help .help-results__title { font-size: 36px; margin: 8px 0 8px; word-break: break-word; }
.help .help-results__count { color: var(--help-muted); margin: 0 0 20px; }
.help-results .help-search { margin: 20px 0 0; max-width: none; }
.help-empty { padding: 8px 0 0; }
.help .help-empty__title { font-size: 22px; margin-bottom: 8px; }
.help-empty p { margin: 0 0 20px; }
.help-pagination { margin-top: 32px; }
.help-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.help-pagination .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--help-border); border-radius: 8px; color: var(--help-text); }
.help-pagination .page-numbers.current { background: var(--help-text); border-color: var(--help-text); color: #fff; }
.help-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* Responsive */
@media (max-width: 1023px) {
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 959px) {
  .help-article--toc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "toc" "body" "foot"; }
  .help-toc {
    position: static;
    margin: 0 0 24px;
    border: 1px solid var(--help-border);
    border-radius: 10px;
    padding: 12px 16px;
  }
  .help-toc summary { margin: 0; cursor: pointer; list-style: revert; }
  .help-toc details[open] summary { margin-bottom: 8px; }
  .help-topic__layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .help-topic__aside { position: static; }
}
@media (max-width: 639px) {
  .help-grid, .help-popular { grid-template-columns: minmax(0, 1fr); }
  .help-hero { padding: 48px 0 40px; }
  .help .help-hero__title { font-size: 32px; }
  .help .help-article__title, .help .help-topic__title { font-size: 30px; }
  .help .help-results__title { font-size: 28px; }
  .help .help-search__input { font-size: 16px; padding: 14px 92px 14px 44px; }
  .help-search__icon { left: 14px; }
  .help-band { padding: 28px 24px; }
  .help-pn { grid-template-columns: 1fr; }
  .help-pn__next { grid-column: 1; }
  .help-prose ol > li { padding-left: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .help-card { transition: none; }
}
