/* Help centre. Loaded after app.css and site.css, whose tokens, buttons and chat-bubble corners it reuses.
   Everything is namespaced .hc- so it can also style the article preview in the admin editor.
   Written phone first; wider layouts are added in the media queries at the end. */

.hc { padding-bottom: clamp(48px, 8vw, 96px); font-size: 1rem; }
.hc a:focus-visible, .hc button:focus-visible, .hc summary:focus-visible, .hc input:focus-visible, .hc-prose [tabindex]:focus-visible { outline: 3px solid rgba(31, 207, 154, .7); outline-offset: 2px; border-radius: 6px; }
.hc-muted { color: var(--muted); }
.hc-h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem) !important; font-weight: 800; letter-spacing: -.03em; margin-bottom: 18px; }
.hc-block { padding-top: clamp(32px, 5vw, 56px); }

/* ---------- Hero and search ---------- */
.hc-hero { padding-block: clamp(36px, 6vw, 80px) 8px; display: grid; gap: 16px; justify-items: start; position: relative; }
.hc-hero::before { content: ""; position: absolute; left: -16%; top: -40%; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 207, 154, .2), transparent 66%); pointer-events: none; z-index: -1; }
.hc-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.04; }
.hc-hero h1 em { font-style: normal; background: var(--jade-bright); padding: 0 .16em; border-radius: .28em .28em .28em .07em; display: inline-block; transform: rotate(-1.2deg); }
.hc-hero .hc-search { margin-top: 8px; }

.hc-search { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; max-width: 680px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-2); }
.hc-search:focus-within { border-color: var(--jade); box-shadow: 0 0 0 4px rgba(31, 207, 154, .22), var(--shadow-2); }
.hc-search-icon { color: var(--muted); display: grid; flex: none; }
.hc-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 4px; font: inherit; font-size: 1.02rem; color: var(--ink); outline: 0 !important; box-shadow: none; }
.hc-search input::-webkit-search-cancel-button { display: none; }
.hc-search .btn { flex: none; border-radius: 14px 14px 14px 5px; min-height: 44px; }
.hc-search.is-compact { max-width: 420px; box-shadow: none; border-radius: 14px 14px 14px 5px; padding: 3px 3px 3px 12px; }
.hc-search.is-compact input { padding: 9px 4px; font-size: .95rem; }
.hc-search.is-compact .btn { min-height: 40px; padding-inline: 14px; border-radius: 11px 11px 11px 4px; }

.hc-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; box-shadow: var(--shadow-2); max-height: min(60vh, 420px); overflow: auto; }
.hc-suggest[hidden] { display: none; }
.hc-suggest a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 11px; color: var(--ink); font-weight: 600; line-height: 1.35; }
.hc-suggest a small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.hc-suggest a:hover, .hc-suggest li[aria-selected="true"] a { background: var(--jade-tint); }
.hc-suggest .hc-suggest-all a { color: var(--jade-dark); font-weight: 700; }
.hc mark { background: var(--butter); color: inherit; border-radius: 4px; padding: 0 .12em; }

/* ---------- Home: popular and categories ---------- */
.hc-popular { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hc-popular a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; color: var(--ink); transition: border-color .18s, transform .18s var(--ease), box-shadow .18s; }
.hc-popular a:hover { border-color: var(--jade); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.hc-popular strong { display: block; font-weight: 700; line-height: 1.3; }
.hc-popular small { color: var(--muted); font-size: .84rem; }
.hc-popular .icon { color: var(--jade); flex: none; }

.hc-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hc-cat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: start; height: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 7px; color: var(--ink); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.hc-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--jade); color: var(--ink); }
.hc-cat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px 14px 14px 5px; background: var(--jade-tint); color: var(--jade-dark); flex: none; grid-row: span 2; }
.hc-cat-text strong { display: block; font: 800 1.08rem var(--font-display); letter-spacing: -.02em; }
.hc-cat-text > span { display: block; color: var(--muted); font-size: .93rem; margin-top: 3px; line-height: 1.5; }
.hc-count { grid-column: 2; justify-self: start; margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--jade-dark); background: var(--jade-tint); padding: 4px 10px; border-radius: 9px 9px 9px 3px; }

/* ---------- Contact fallback ---------- */
.hc-contact { display: grid; gap: 14px; align-items: center; padding: 22px; background: var(--ink); color: #D7E6E3; border-radius: 26px 26px 26px 8px; margin-top: clamp(32px, 5vw, 56px); }
.hc-block > .hc-contact { margin-top: 0; }
.hc-contact h2 { color: #fff; font-size: 1.25rem !important; font-weight: 800; letter-spacing: -.02em; }
.hc-contact p { margin-top: 4px; max-width: 56ch; }
.hc-contact-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px 15px 15px 5px; background: rgba(31, 207, 154, .16); color: var(--jade-bright); }
.hc-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-contact .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .25); background: transparent; word-break: break-all; }
.hc-contact .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.hc-contact a:focus-visible { outline-color: #fff; }

/* ---------- Inner pages: breadcrumbs and layout ---------- */
.hc-top { display: grid; gap: 14px; padding-block: 22px 6px; }
.hc-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .9rem; color: var(--muted); }
.hc-crumbs li + li::before { content: "/"; margin-right: 8px; color: #9FB1AE; }
.hc-crumbs a { font-weight: 600; padding-block: 6px; display: inline-block; }
.hc-crumbs [aria-current] { color: var(--ink); font-weight: 600; padding-block: 6px; }
.hc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 18px; }
.hc-main { min-width: 0; max-width: 46rem; }
.hc-side { display: none; }
.hc-meta { color: var(--muted); font-size: .88rem; margin-top: 10px; }

.hc-cathead { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.hc-cathead h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; }
.hc-cathead p { color: var(--muted); margin-top: 8px; font-size: 1.05rem; max-width: 60ch; }
.hc-cathead .hc-meta { font-size: .88rem; }

.hc-list, .hc-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hc-list a, .hc-results a { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; color: var(--ink); transition: border-color .18s, box-shadow .18s; }
.hc-list a:hover, .hc-results a:hover { border-color: var(--jade); box-shadow: var(--shadow-1); }
.hc-list strong, .hc-results strong { font-weight: 700; font-size: 1.04rem; line-height: 1.35; color: var(--heading); }
.hc-list span, .hc-results span { color: var(--muted); font-size: .95rem; line-height: 1.55; }
.hc-results small { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--jade-dark); }
.hc-search-h { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: 18px; overflow-wrap: anywhere; }
.hc-main > .hc-search { margin-bottom: 24px; box-shadow: none; }
.hc-empty { background: var(--surface); border: 1px dashed #B9C8C5; border-radius: 18px 18px 18px 6px; padding: 20px 22px; color: var(--muted); }
.hc-empty strong { color: var(--ink); }
.hc-empty ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Article ---------- */
.hc-arthead { margin-bottom: 22px; }
.hc-arthead h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; overflow-wrap: anywhere; }
.hc-summary { font-size: 1.14rem; line-height: 1.55; color: var(--muted); margin-top: 12px; }
.hc-aud { display: inline-block; margin-bottom: 12px; font: 700 .74rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--papaya-dark); background: var(--papaya-tint); padding: 7px 10px; border-radius: 9px 9px 9px 3px; }
.hc-article > .alert { margin-bottom: 16px; }

.hc-toc-inline { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 4px 18px; margin-bottom: 26px; }
.hc-toc-inline summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 12px 0; }
.hc-toc-inline ol { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 2px; }
.hc-toc-inline a { display: inline-block; padding: 5px 0; font-weight: 600; }

/* The article text: 17px, a 65-character measure. Also used by the admin preview. */
.hc-prose { font-size: 1.0625rem; line-height: 1.72; color: var(--text); max-width: 68ch; overflow-wrap: break-word; }
.hc-prose > * + * { margin-top: 1.05em; }
.hc-prose h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin-top: 2em; padding-top: .2em; scroll-margin-top: 92px; }
.hc-prose h3 { font-size: 1.14rem; font-weight: 700; line-height: 1.3; margin-top: 1.7em; scroll-margin-top: 92px; }
.hc-prose h2 + *, .hc-prose h3 + * { margin-top: .6em; }
.hc-prose > :first-child { margin-top: 0; }
.hc-prose a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(11, 125, 94, .35); text-underline-offset: 3px; }
.hc-prose a:hover { text-decoration-color: currentColor; }
.hc-prose strong { font-weight: 700; color: var(--heading); }
.hc-prose code { font: 500 .88em var(--font-mono); background: #E6EEEC; color: var(--ink); padding: .14em .4em; border-radius: 6px; overflow-wrap: anywhere; }
.hc-prose ul, .hc-prose ol { margin-bottom: 0; padding-left: 1.35em; }
.hc-prose li + li { margin-top: .45em; }
.hc-prose li > p { margin: 0; }
.hc-prose li > * + * { margin-top: .55em; }
.hc-prose li > ul, .hc-prose li > ol { margin-top: .45em; }
.hc-prose ul > li::marker { color: var(--jade); }

/* Numbered steps: the number sits in a small chat-bubble. */
.hc-prose ol.hc-steps { list-style: none; padding-left: 0; counter-reset: hc-step; }
.hc-prose ol.hc-steps > li { counter-increment: hc-step; position: relative; padding-left: 2.9em; min-height: 2em; }
.hc-prose ol.hc-steps > li + li { margin-top: .9em; }
.hc-prose ol.hc-steps > li::before { content: counter(hc-step); position: absolute; left: 0; top: -.05em; width: 2.05em; height: 2.05em; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 .82em/1 var(--font-body); font-variant-numeric: tabular-nums; border-radius: 11px 11px 11px 4px; }
.hc-prose ol.hc-steps > li > p + p { color: var(--muted); }

.hc-note { border: 1px solid #BFE8D7; background: var(--jade-tint); color: #064C39; border-radius: var(--bubble); padding: 14px 18px; }
.hc-note > * + * { margin-top: .6em; }
.hc-note strong { color: inherit; }
.hc-note a { color: inherit; }
.hc-note-tip { background: var(--blue-tint); border-color: #C4DAFB; color: #17437F; }
.hc-note-important, .hc-note-warning { background: var(--papaya-tint); border-color: #FBCDBC; color: #7A2A10; }
.hc-prose .hc-note code { background: rgba(255, 255, 255, .6); color: inherit; }

.hc-code { background: var(--ink); color: #E4F1EE; border-radius: 16px 16px 16px 5px; padding: 16px 18px; overflow-x: auto; font: 500 .9rem/1.6 var(--font-mono); -webkit-overflow-scrolling: touch; }
.hc-prose .hc-code code { background: none; color: inherit; padding: 0; font: inherit; overflow-wrap: normal; white-space: pre; }
.hc-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.hc-table table { border-collapse: collapse; width: 100%; font-size: .96rem; line-height: 1.5; }
.hc-table th, .hc-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); min-width: 7.5em; }
.hc-table th { background: var(--mist); font-weight: 700; color: var(--heading); font-size: .86rem; letter-spacing: .01em; white-space: nowrap; }
.hc-table tr:last-child td { border-bottom: 0; }
.hc-img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }

/* ---------- Feedback, previous/next, related ---------- */
.hc-feedback { margin-top: 44px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 7px; display: grid; gap: 12px; scroll-margin-top: 92px; }
.hc-feedback h2 { font-size: 1.15rem !important; font-weight: 800; letter-spacing: -.02em; }
.hc-feedback p { color: var(--muted); }
.hc-fb-form { display: grid; gap: 10px; }
.hc-fb-form label { font-weight: 600; color: var(--ink); }
.hc-fb-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-fb-row .btn { min-height: 44px; min-width: 88px; }
.hc-fb-row input { flex: 1; min-width: 200px; min-height: 44px; font-size: 1rem; }

.hc-prevnext { display: grid; gap: 12px; margin-top: 28px; }
.hc-prevnext a { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; color: var(--ink); transition: border-color .18s; }
.hc-prevnext a:hover { border-color: var(--jade); }
.hc-prevnext small { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hc-prevnext strong { font-weight: 700; line-height: 1.35; }
.hc-next { text-align: right; border-radius: 16px 16px 5px 16px !important; }
.hc-prevnext > span { display: none; }

.hc-related { margin-top: 40px; }
.hc-related h2 { font-size: 1.2rem !important; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.hc-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hc-related a { display: grid; gap: 2px; padding: 12px 16px; border-left: 3px solid var(--jade-bright); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--ink); }
.hc-related a:hover { background: var(--jade-tint); }
.hc-related strong { font-weight: 700; line-height: 1.35; }
.hc-related small { color: var(--muted); font-size: .84rem; }

/* ---------- Side navigation (wide screens) ---------- */
.hc-side h2 { font: 700 .76rem/1 var(--font-body) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.hc-side ul, .hc-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hc-side a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .93rem; line-height: 1.4; }
.hc-side a span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.hc-side a:hover { background: rgba(15, 46, 51, .06); }
.hc-side a[aria-current], .hc-side a.is-current { background: var(--jade-tint); color: var(--jade-dark); }
.hc-toc a { border-left: 2px solid var(--line); border-radius: 0 10px 10px 0; }
.hc-toc a.is-current { border-left-color: var(--jade); }

@media (min-width: 640px) {
  .hc-popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-contact { grid-template-columns: auto minmax(0, 1fr); padding: 26px 28px; }
  .hc-contact-actions { grid-column: 2; }
  .hc-prevnext { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-prevnext > span { display: block; }
  .hc-top { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .hc-top .hc-search { width: 340px; }
}
@media (min-width: 1000px) {
  .hc-popular { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hc-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hc-contact { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hc-contact-actions { grid-column: auto; }
  .hc-layout { grid-template-columns: minmax(0, 46rem) minmax(200px, 260px); justify-content: space-between; gap: 56px; }
  .hc-side { display: block; position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; padding-bottom: 8px; }
  .hc-layout.has-toc .hc-toc-inline { display: none; }
}
@media (min-width: 1300px) {
  .hc-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .hc *, .hc *::before, .hc *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .hc-cat:hover, .hc-popular a:hover { transform: none; }
}
@media print {
  .lp-nav, .lp-footer, .hc-top, .hc-side, .hc-feedback, .hc-prevnext, .hc-related, .hc-contact, .hc-toc-inline { display: none !important; }
  .hc-layout { display: block; }
  .hc-code { background: none; color: #000; border: 1px solid #999; }
}
