/* =====================================================================
   Help Center — self-contained section styles (loaded after styles.css)
   Reuses tokens, .nav/.mega, .btn*, .footer/.rp-footer, .rev-anim.
   ===================================================================== */

.help-main { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* ===== HERO ===== */
/* deliberately compact: both product cards have to reach the first screen,
   otherwise the page reads as if only Route Planner exists */
.help-hero {
  width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 13px; padding: 44px 24px 34px;
  background: radial-gradient(120% 150% at 50% 0%, #e9eaff 0%, #f6f7ff 44%, #fff 100%);
  border-bottom: 1px solid var(--color-gray-200);
}
.help-hero h1 { font-weight: 700; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -.9px; }
/* 640px keeps the sub-heading on a single line on desktop; it still wraps below that */
.help-hero__sub { font-size: 17px; line-height: 1.55; color: var(--color-gray-600); max-width: min(640px, 100%); }

/* search */
.help-search { width: min(620px, 100%); margin-top: 4px; }
.help-search__field {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px;
  background: #fff; border: 1px solid var(--color-gray-200); border-radius: 14px;
  box-shadow: var(--elev-soft); transition: border-color .18s ease, box-shadow .18s ease;
}
.help-search__field:focus-within { border-color: var(--color-brand-300); box-shadow: 0 0 0 4px rgba(65, 65, 231, .12), var(--elev-soft); }
.help-search__field svg { width: 20px; height: 20px; flex: none; color: var(--color-gray-500); }
.help-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 16px; color: var(--color-gray-900); }
.help-search input::placeholder { color: var(--color-gray-500); }
.help-search__empty { display: none; margin-top: 14px; font-size: 14px; color: var(--color-gray-600); }
.help-search.is-empty .help-search__empty { display: block; }

/* topic chips — they highlight matching answers in both cards, they don't hide anything */
.help-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.help-chips span { font-size: 13px; color: var(--color-gray-500); align-self: center; margin-right: 2px; }
.help-chip {
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: var(--radius-full); border: 1px solid transparent;
  color: var(--color-brand); background: var(--color-blue-chip);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.help-chip:hover { background: var(--color-blue-50); }
.help-chip[aria-pressed="true"] { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }

.help-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ===== PRODUCT CARDS =====
   Both products sit side by side on the landings' 1080px column, so neither
   half is hidden behind a tab or pushed below the fold. */
.help-cards {
  width: min(1080px, calc(100% - 48px)); margin-top: 36px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}
.help-card {
  background: #fff; border: 1px solid var(--color-gray-200); border-radius: 20px;
  padding: 22px 24px 8px; min-width: 0;
}
.help-card__head { display: flex; align-items: center; gap: 13px; padding-bottom: 6px; }
.help-card__ic {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: var(--color-blue-25); color: var(--color-brand);
}
.help-card__ic svg { width: 22px; height: 22px; }
.help-card__head h2 { font-weight: 700; font-size: 19px; line-height: 1.2; letter-spacing: -.4px; }
.help-card__head p { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--color-gray-500); }
.help-card__n { white-space: nowrap; }
.help-card.has-matches .help-card__n { color: var(--color-brand); font-weight: 600; }
/* shown only when a filter or search leaves this card with nothing */
.help-card__none { display: none; padding: 18px 2px 22px; font-size: 14.5px; color: var(--color-gray-500); }
.help-card.is-blank .help-card__none { display: block; }

/* sub-group of questions inside a card */
.help-sub { margin-top: 18px; }
.help-sub__title {
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--color-gray-500); margin-bottom: 8px; padding-left: 12px;
}
.help-sub + .help-sub { margin-top: 30px; }

/* ===== QUESTION / ANSWER ===== */
.help-q { border-bottom: 1px solid var(--color-gray-200); }
.help-sub > .help-q:first-of-type { border-top: 1px solid var(--color-gray-200); }
/* horizontal padding is constant, matched or not, so the chevron never shifts
   when a topic filter turns the highlight on */
.help-q > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 10px 17px 12px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 15.5px; line-height: 1.4; color: var(--color-gray-900);
  transition: color .16s ease;
}
.help-q > summary::-webkit-details-marker { display: none; }
.help-q > summary:focus-visible { outline: 2px solid var(--color-brand-300); outline-offset: 2px; border-radius: 6px; }
/* same chevron as the FAQ blocks on the landing pages (.disp-faq__ic) */
.help-q__chev {
  width: 20px; height: 20px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9ca6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/16px no-repeat;
  transition: transform .25s ease;
}
.help-q[open] .help-q__chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .help-q__chev { transition: none; } }

.help-q__a { padding: 0 10px 22px 12px; font-size: 15px; line-height: 1.65; color: var(--color-gray-600); }
.help-q__a > :first-child { margin-top: 0; }
.help-q__a p { margin: 0 0 12px; }
.help-q__a p:last-child { margin-bottom: 0; }
.help-q__a strong { color: var(--color-gray-900); font-weight: 600; }
.help-q__a a { color: var(--color-brand); }
.help-q__a ol, .help-q__a ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 7px; }
.help-q__a li { padding-left: 2px; }
.help-q__a img { max-width: 100%; height: auto; border-radius: 12px; margin: 6px 0 14px; }
.help-q__more { margin-top: 14px !important; }
.help-q__more a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; text-decoration: none; }
.help-q__more a::after { content: "→"; }
.help-q__more a:hover { text-decoration: underline; }

/* deep-linked panel gets a subtle marker so you can see where you landed */
.help-q:target { box-shadow: inset 2px 0 0 var(--color-gray-200); }

/* topic-chip highlight — colour-tinted so matches read at a glance in both cards */
.help-q.is-match {
  background: var(--color-blue-25);
  box-shadow: inset 3px 0 0 var(--color-brand);
  border-radius: 0 8px 8px 0;
}
@media (prefers-reduced-motion: no-preference) {
  .help-q { transition: background .2s ease, box-shadow .2s ease; }
}

/* ===== CONTACT ===== */
.help-contact { width: 100%; display: flex; justify-content: center; padding: 80px 0 96px; }
/* same 1080px column as .help-cards and the landing footer */
.help-contact__inner {
  width: min(1080px, calc(100% - 48px)); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px;
  align-items: start; padding: 44px; border: 1px solid var(--color-gray-200); border-radius: 24px;
  background: linear-gradient(180deg, #fbfbff 0%, #fff 100%);
}
.help-contact h2 { font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: -.8px; }
.help-contact__lead { margin-top: 12px; font-size: 15.5px; line-height: 1.55; color: var(--color-gray-600); }
.help-contact__mail { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 14.5px; font-weight: 500; color: var(--color-brand); text-decoration: none; }
.help-contact__mail svg { width: 17px; height: 17px; }
.help-contact__mail:hover { text-decoration: underline; }

.help-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-form .full { grid-column: 1 / -1; }
.help-form input, .help-form textarea {
  width: 100%; padding: 14px 16px; font-family: inherit; font-size: 15px; color: var(--color-gray-900);
  background: #fff; border: 1px solid var(--color-gray-200); border-radius: 12px; outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.help-form textarea { min-height: 150px; resize: vertical; }
.help-form input::placeholder, .help-form textarea::placeholder { color: var(--color-gray-500); }
.help-form input:focus, .help-form textarea:focus { border-color: var(--color-brand-300); box-shadow: 0 0 0 4px rgba(65, 65, 231, .12); }
.help-form input.invalid, .help-form textarea.invalid { border-color: #e2564d; box-shadow: 0 0 0 4px rgba(226, 86, 77, .1); }
.help-form button { width: 100%; }
.help-form button[disabled] { opacity: .6; cursor: default; }
.help-form__note { grid-column: 1 / -1; font-size: 13px; line-height: 1.5; color: var(--color-gray-500); }
.help-form__ok { display: none; grid-column: 1 / -1; padding: 14px 16px; border-radius: 12px; background: #e8f8ef; color: #15a05e; font-size: 14.5px; font-weight: 500; }
/* the wrapper only exists so the whole set of fields can be swapped out at once —
   `contents` keeps the inputs themselves as direct grid items */
.help-form__fields { display: contents; }
.help-contact.is-sent .help-form__ok { display: block; }
.help-contact.is-sent .help-form__fields { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 940px) {
  /* two Q&A columns get too narrow to read — stack the cards instead */
  .help-cards { grid-template-columns: 1fr; gap: 20px; margin-top: 44px; }
}
@media (max-width: 860px) {
  .help-contact__inner { grid-template-columns: 1fr; gap: 28px; padding: 32px; }
}
@media (max-width: 760px) {
  .help-hero { padding: 64px 20px 52px; }
  .help-cards { width: calc(100% - 40px); }
  .help-card { padding: 24px 20px 6px; }
  .help-q > summary { font-size: 15px; padding: 15px 10px 15px 12px; }
  .help-contact { padding: 56px 0 72px; }
  .help-contact__inner { width: calc(100% - 40px); }
  .help-form { grid-template-columns: 1fr; }
}

/* =====================================================================
   HELP ARTICLE — the page behind "Open the full guide"
   ===================================================================== */
.doc-main { width: 100%; }
.doc { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }

/* breadcrumb + title */
.doc-head { padding: 40px 0 28px; border-bottom: 1px solid var(--color-gray-200); }
/* back link lives at the top of the contents rail, as in blog articles (.art-toc__back) */
.doc-crumb { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 24px; font-weight: 700; font-size: 14px; line-height: 1; color: var(--color-brand); text-decoration: none; }
.doc-crumb svg { width: 16px; height: 16px; display: block; transition: transform .2s ease; }
.doc-crumb:hover svg { transform: translateX(-3px); }
.doc-head h1 { margin-top: 16px; font-weight: 700; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.14; letter-spacing: -.9px; max-width: 760px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 13.5px; color: var(--color-gray-500); }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.doc-meta svg { width: 15px; height: 15px; }
.doc-tag { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: var(--radius-full); background: var(--color-blue-chip); color: var(--color-brand); font-size: 12px; font-weight: 600; }

/* body: sticky contents rail + prose */
/* contents sit on the right, the way blog articles place .post__meta.
   The aside stays first in the DOM so it is reachable before the prose. */
.doc-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding: 40px 0 72px; align-items: start; }
.doc-prose { grid-column: 1; grid-row: 1; }
.doc-toc { grid-column: 2; grid-row: 1; }
.doc-toc { position: sticky; top: 96px; }
.doc-toc strong { display: block; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--color-gray-500); margin-bottom: 12px; }
.doc-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.doc-toc ul a { display: block; padding: 7px 12px; border-left: 2px solid var(--color-gray-200); font-size: 14px; line-height: 1.4; color: var(--color-gray-600); text-decoration: none; transition: color .16s ease, border-color .16s ease; }
.doc-toc ul a:hover, .doc-toc li.active a { color: var(--color-brand); border-left-color: var(--color-brand); }

.doc-prose { font-size: 16px; line-height: 1.7; color: var(--color-gray-600); max-width: 720px; }
.doc-prose section + section { margin-top: 40px; }
.doc-prose h2, .doc-prose h3 { font-weight: 700; color: var(--color-gray-900); letter-spacing: -.4px; }
.doc-prose h2 { font-size: 22px; line-height: 1.25; margin: 0 0 14px; }
.doc-prose h3 { font-size: 18px; line-height: 1.3; margin: 28px 0 12px; }
.doc-prose > section > :first-child { margin-top: 0; }
.doc-prose p { margin: 0 0 16px; }
.doc-prose strong { color: var(--color-gray-900); font-weight: 600; }
.doc-prose a { color: var(--color-brand); }
.doc-prose ol, .doc-prose ul { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 10px; }
.doc-prose ol ul, .doc-prose ul ul { margin: 10px 0 0; }
.doc-prose li { padding-left: 2px; }
.doc-prose img { max-width: 100%; height: auto; border-radius: 14px; margin: 8px 0 20px; }
.doc-note { padding: 16px 18px; border-radius: 12px; background: var(--color-blue-25); border: 1px solid #e2e3ff; margin: 0 0 20px; font-size: 15px; }

/* related */
.doc-related { border-top: 1px solid var(--color-gray-200); padding: 40px 0 88px; }
.doc-related h2 { font-weight: 700; font-size: 20px; letter-spacing: -.4px; margin-bottom: 18px; }
.doc-related__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doc-related a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--color-gray-200); border-radius: 14px;
  font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--color-gray-900); text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.doc-related a:hover { border-color: #dcdcf7; box-shadow: var(--elev-soft); transform: translateY(-2px); }
.doc-related a::after { content: "→"; color: var(--color-brand); flex: none; }

@media (max-width: 940px) {
  .doc-body { grid-template-columns: 1fr; gap: 28px; }
  .doc-prose, .doc-toc { grid-column: 1; grid-row: auto; }
  .doc-toc { position: static; order: -1; }
  .doc-toc ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .doc-toc ul a { border-left: 0; padding: 7px 12px; border-radius: var(--radius-full); background: var(--color-blue-chip); color: var(--color-brand); }
  .doc-related__list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .doc { width: calc(100% - 40px); }
  .doc-head { padding: 24px 0 22px; }
}
