/* Help centre (scripts/generate-help-pages.mjs). Brand tokens from tailwind.config.js. */
.help {
  --brand: #FA7764;
  --brand-ink: #C94F3D;   /* coral text and buttons: 4.6:1 on white */
  --brand-deep: #A33B2D;
  --brand-50: #FFF5F3;
  --brand-100: #FFEBE7;
  --cream: #FFF5E6;
  --cream-50: #FFFAF5;
  --line: #F3E6D3;
  --ink: #111827;
  --muted: #4B5563;
  --soft: #6B7280;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.6;
}
.help *, .help *::before, .help *::after { box-sizing: border-box; }
.help a { color: var(--brand-ink); }
.help a:hover { color: var(--brand-deep); }
.help a:focus-visible, .help button:focus-visible, .help input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.help h1, .help h2, .help h3 { color: var(--ink); }
.help-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.help-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .help-wrap { padding: 0 16px; } }

.help-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  background: var(--brand-ink); color: #fff !important; border: 0; font: inherit; font-weight: 600;
  padding: 10px 22px; border-radius: 12px; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(250, 119, 100, .3); transition: background 200ms ease-in-out, transform 200ms ease-in-out;
}
.help-btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.help-btn--dark { background: var(--ink); box-shadow: none; }
.help-btn--dark:hover { background: #000; }

.help-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-deep); }
.help-lead { margin: 0; font-size: 19px; color: var(--muted); text-wrap: pretty; }
.help-h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
.help-sub { margin: 0 0 28px; color: var(--muted); font-size: 18px; }

/* Hero */
.help-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-50) 100%); }
.help-hero::before, .help-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.help-hero::before { width: 420px; height: 420px; background: var(--brand); opacity: .18; top: -120px; left: -80px; }
.help-hero::after { width: 360px; height: 360px; background: #FFB3A6; opacity: .35; top: 40px; right: -60px; }
.help-hero__inner { position: relative; z-index: 1; max-width: 896px; margin: 0 auto; padding: 80px 16px 72px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.help-hero h1 { margin: 0; font-size: clamp(2.25rem, 4vw + 1rem, 4rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.help-hero h1 u { text-decoration-color: var(--brand); text-decoration-thickness: 6px; text-underline-offset: 8px; }
.help-pills { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); }
.help-pill { text-decoration: none; color: #374151 !important; background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.help-pill:hover { border-color: var(--brand-ink); }

/* Search */
.help-search { position: relative; width: 100%; text-align: left; }
.help-search--large { max-width: 680px; margin-top: 8px; }
.help-search__field { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--soft); }
.help-search--large .help-search__field { border-radius: 16px; padding: 8px 8px 8px 20px; box-shadow: 0 10px 30px rgba(17, 24, 39, .08); }
.help-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 11px 0; color: var(--ink); }
.help-search--large input { font-size: 17px; }
.help-search input:focus { outline: none; }
.help-search__field:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.help-search__results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(17, 24, 39, .14); max-height: 420px; overflow-y: auto; }
.help-search__results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink) !important; }
.help-search__results a:hover, .help-search__results a[aria-selected="true"] { background: var(--brand-50); }
.help-search__results strong { display: block; font-weight: 600; line-height: 1.35; }
.help-search__results span { font-size: 13px; color: var(--soft); }
.help-search__results .help-search__empty { padding: 12px; color: var(--muted); font-size: 15px; }

/* Home sections */
.help > section.help-wrap { padding-top: 56px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.help-card {
  display: flex; flex-direction: column; gap: 14px; min-height: 220px; padding: 28px; border-radius: 16px;
  background: #fff; color: var(--ink) !important; text-decoration: none;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 4px 12px rgba(17, 24, 39, .04);
  transition: transform 300ms ease-in-out, box-shadow 300ms ease-in-out;
}
.help-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(17, 24, 39, .1); }
.help-card__icon { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--brand-100); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; }
.help-card__icon--lg { width: 64px; height: 64px; border-radius: 16px; }
.help-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.help-card__title { font-size: 20px; line-height: 1.3; font-weight: 700; }
.help-card__text { color: var(--muted); font-size: 15px; line-height: 1.55; }
.help-card__count { font-size: 14px; font-weight: 600; color: var(--brand-deep); }
.help-card--dark { background: var(--ink); color: #fff !important; }
.help-card--dark .help-card__icon { background: rgba(250, 119, 100, .18); color: #FF8F7D; }
.help-card--dark .help-card__text { color: #D1D5DB; }
.help-card--dark .help-card__count { color: #FF8F7D; }

.help-panel { background: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 40px); box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.help-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.help-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 16px; background: var(--cream-50); border: 1px solid #FDECDD; }
.help-steps a { display: block; color: var(--ink) !important; text-decoration: none; font-weight: 600; line-height: 1.35; }
.help-steps a:hover { text-decoration: underline; }
.help-step__n { flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--brand-ink); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.help-step__meta { font-size: 14px; color: var(--soft); }

/* Article lists */
.help-list { list-style: none; margin: 0; padding: 0; }
.help-list--columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); column-gap: 40px; margin-top: 16px; }
.help-row { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink) !important; transition: background 200ms ease-in-out; }
.help-row:hover { background: var(--brand-50); }
.help-row > svg { flex: none; color: #9CA3AF; }
.help-row__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.help-row__title { font-weight: 600; line-height: 1.4; }
.help-row__meta { font-size: 13px; color: var(--soft); }
.help-row__chevron { color: var(--brand-ink); display: flex; }
.help-tag { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.help-tag--beta { color: #92400E; background: #FEF3C7; }
.help-tag--addon { color: var(--brand-deep); background: var(--brand-100); }
.help-tag--app { color: #1E40AF; background: #DBEAFE; }

/* CTA band */
.help-cta-wrap { padding-top: 56px; padding-bottom: 88px; }
.help-cta { border-radius: 24px; padding: clamp(32px, 5vw, 56px); background: linear-gradient(135deg, var(--brand) 0%, #E56753 100%); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.help-cta h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; font-weight: 700; }
.help-cta p { margin: 0; max-width: 640px; font-size: 18px; color: #2A1410; }

/* Chapter page */
.help-band { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-50) 100%); border-bottom: 1px solid var(--line); }
.help-band__inner { padding-top: 36px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.help-band__inner .help-search { max-width: 560px; }
.help-band__title { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.help-band__title > div { flex: 1 1 400px; }
.help-band h1 { margin: 0 0 4px; font-size: clamp(2rem, 3vw + 1rem, 3rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.help-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--soft); }
.help-crumbs a { text-decoration: none; }
.help-crumbs-wrap { padding-top: 28px; }
.help-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 40px; padding-bottom: 24px; }
.help-layout__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.help-side { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.help-side__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); padding: 0 0 8px; }
.help-side .help-side__label { padding-left: 12px; }
.help-side a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: #374151 !important; }
.help-side a span:last-child { color: var(--soft); }
.help-side a:hover { background: var(--brand-50); }
.help-side a[aria-current="page"] { background: #fff; color: var(--brand-deep) !important; font-weight: 600; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.help-group { background: #fff; border-radius: 16px; padding: 8px 12px; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.help-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 12px 8px; }
.help-group__head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.help-group__head span { font-size: 14px; color: var(--soft); }
.help-group .help-row { border-bottom: 0; border-top: 1px solid #F7EEE2; }
@media (max-width: 860px) { .help-side { max-width: none; } }

/* Article page */
.help-layout--article { padding-top: 20px; padding-bottom: 72px; gap: 48px; }
.help-article { flex: 999 1 600px; min-width: 0; background: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 56px); box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.help-article > h1 { margin: 0 0 16px; font-size: clamp(2rem, 2.5vw + 1rem, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.help-notice { margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; background: #FEF3C7; color: #78350F; font-size: 15px; }
.help-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; }
.help-chip { background: #F3F4F6; color: #374151; padding: 4px 10px; border-radius: 999px; }
.help-chip--brand { background: var(--brand-100); color: var(--brand-deep); }
.help-chip--beta { background: #FEF3C7; color: #92400E; }
.help-permission { margin: 12px 0 0; font-size: 14px; color: var(--soft); }
.help-prose { max-width: 72ch; margin-top: 24px; color: #374151; font-size: 16.5px; }
.help-prose > p:first-child { font-size: 19px; color: #1F2937; }
.help-prose h2 { margin: 40px 0 12px; font-size: 24px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; scroll-margin-top: 96px; }
.help-prose h3 { margin: 24px 0 6px; font-size: 17px; line-height: 1.4; font-weight: 700; }
.help-prose p { margin: 0 0 14px; }
.help-prose ul, .help-prose ol { margin: 0 0 16px; padding-left: 24px; }
.help-prose li { margin: 6px 0; }
.help-prose li > ul, .help-prose li > ol { margin: 6px 0; }
.help-prose strong { color: var(--ink); font-weight: 600; }
.help-prose code { background: var(--cream-50); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.help-prose ol { list-style: none; counter-reset: step; padding-left: 0; }
.help-prose ol > li { counter-increment: step; position: relative; padding-left: 48px; min-height: 32px; margin: 12px 0; }
.help-prose ol > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 999px; background: var(--brand-ink); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.help-prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; display: block; overflow-x: auto; }
.help-prose th, .help-prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-prose th { font-weight: 600; color: var(--ink); }
.help-aside { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 24px; }
.help-toc { display: flex; flex-direction: column; font-size: 15px; }
.help-toc a { text-decoration: none; padding: 5px 0 5px 14px; border-left: 2px solid var(--line); color: var(--muted) !important; }
.help-toc a:hover, .help-toc a.is-active { border-left-color: var(--brand-ink); color: var(--brand-deep) !important; }
.help-toc a.is-active { font-weight: 600; }
.help-box { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 1px 3px rgba(17, 24, 39, .06); }
.help-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.4; }
.help-box ul a { text-decoration: none; font-weight: 500; }
.help-box--dark { background: var(--ink); color: #D1D5DB; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: 14px; }
.help-box__title { color: #fff; font-size: 17px; font-weight: 700; }
@media (max-width: 860px) { .help-aside { max-width: none; } }

@media (prefers-reduced-motion: reduce) {
  .help-card, .help-btn, .help-row { transition: none; }
  .help-card:hover, .help-btn:hover { transform: none; }
}
