/* Help & Tutorials pages (G347). Loaded only by /help/ pages; uses the site tokens from site.css
   (app v4 theme: navy top bar, warm canvas, teal brand) in both themes. */

.help-hero { padding: 56px 0 44px; }
.help-hero h1 { max-width: 860px; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; }
.help-hero-tutorial h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.help-pathway .section-title, .help-browse .section-title, .help-support .section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.help-hero .section-copy { max-width: 720px; margin: 16px 0 0; color: var(--muted); font-size: 18px; }

.help-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 22px; padding: 0; list-style: none; color: var(--muted); font-size: 13px; font-weight: 650; }
.help-breadcrumb li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.help-breadcrumb a { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }
.help-breadcrumb [aria-current] { color: var(--ink); }

.help-draft-marker { display: inline-block; margin: 0 0 12px; padding: 3px 8px; border: 1px dashed #9c6600; border-radius: 6px; background: #fff4cf; color: #422b00; font-size: 12px; font-weight: 800; }
.help-card .help-draft-marker { margin: 12px 0 0; }

/* Search. */
.help-search { max-width: 640px; margin-top: 28px; }
.help-search label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.help-search-row { display: flex; gap: 10px; }
.help-search input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 16px; }
.help-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--brand); }
.help-search-count { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.help-no-results { margin: 24px 0 0; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }

/* Getting Started pathway. */
.help-pathway { background: var(--surface-2); }
.help-path { position: relative; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: stage; }
.help-path-stage { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); counter-increment: stage; }
.help-path-stage + .help-path-stage::before { content: ""; position: absolute; top: -15px; left: 34px; width: 2px; height: 14px; background: var(--brand); }
.help-path-stage h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; letter-spacing: -.01em; }
.help-path-stage h3::before { content: counter(stage); display: grid; flex: none; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 850; }
.help-path-options { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.help-path-option { flex: 1 1 220px; min-width: 0; }
.help-path-choice .help-path-option { padding: 10px; border: 1px dashed var(--line); border-radius: 8px; }
.help-path-label { margin: 0 0 8px; color: var(--brand-strong); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.help-path-or { align-self: center; padding: 4px 10px; border-radius: 999px; background: var(--signal-soft); color: var(--ink); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.help-path-items { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.help-path-items li { flex: 1 1 200px; min-width: 0; }
.help-path-items a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); font-size: 14px; font-weight: 700; }
.help-path-items a:hover { border-color: var(--brand); }
.help-path-items small { color: var(--muted); font-size: 12px; font-weight: 600; }

/* Browse. */
.help-chips ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 30px; padding: 0; list-style: none; }
.help-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 700; }
.help-chips a:hover { border-color: var(--brand); }
.help-chips span { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; }
.help-category { scroll-margin-top: 88px; }
.help-category + .help-category { margin-top: 40px; }
.help-category h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.help-category > p { margin: 6px 0 16px; color: var(--muted); }
.help-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.help-card[hidden] { display: none; }
.help-card-link { display: flex; flex-direction: column; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); }
.help-card-link:hover { border-color: var(--brand); }
.help-card-link h3 { margin: 12px 0 6px; font-size: 17px; letter-spacing: -.01em; }
.help-card-link p { margin: 0; color: var(--muted); font-size: 14px; }
.help-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 12.5px; font-weight: 700; }

.help-support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.help-support-grid li { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.help-support-grid h3 { margin: 0 0 6px; font-size: 16px; }
.help-support-grid p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

/* Tutorial page. */
.help-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 650; }
.help-facts span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding: 44px 0 84px; }
.help-toc { position: sticky; top: 96px; align-self: start; }
.help-toc h2 { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.help-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.help-toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 650; }
.help-toc a:hover { border-left-color: var(--brand); color: var(--ink); }
.help-main { min-width: 0; max-width: 820px; }
.help-section { scroll-margin-top: 88px; }
.help-section + .help-section { margin-top: 44px; }
.help-section h2 { margin: 0 0 14px; font-size: 24px; letter-spacing: -.02em; }
.help-section h3 { margin: 22px 0 8px; font-size: 17px; }
.help-section p, .help-section li { color: color-mix(in srgb, var(--ink) 84%, var(--muted)); }
.help-learn { display: grid; gap: 8px; padding: 0; list-style: none; }
.help-learn li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-weight: 650; }
.help-learn li::before { content: "✓"; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 900; }

.help-video { margin: 0; }
.help-video-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--topbar); aspect-ratio: 16 / 9; }
.help-video-frame video { display: block; width: 100%; height: 100%; }
.help-video figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.help-video-pending, .help-shot-pending, .help-steps-pending { display: grid; min-height: 180px; place-items: center; padding: 24px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 700; text-align: center; }
.help-video-pending { aspect-ratio: 16 / 9; min-height: 0; }
.help-shot-pending { min-height: 120px; margin-top: 12px; }
.help-steps-pending { min-height: 0; }

.help-steps { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; }
.help-step { scroll-margin-top: 88px; }
.help-step h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 18px; }
.help-step-num { display: grid; flex: none; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 14px; font-weight: 850; }
.help-step > p { margin: 0 0 0 44px; }
.help-shot { margin: 14px 0 0; }
.help-shot-frame { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.help-shot-frame img { display: block; width: 100%; height: auto; }
.help-shot-frame:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.help-shot-highlight { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.help-shot-highlight rect { fill: none; stroke: var(--signal); stroke-width: 6; }
.help-shot figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }

.help-result p { padding: 14px 16px; border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--surface-mint); }
.help-issues { display: grid; gap: 10px; margin: 0; }
.help-issues div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.help-issues dt { font-weight: 750; }
.help-issues dd { margin: 4px 0 0; color: var(--muted); }

.help-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.help-mini-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.help-mini-card:hover { border-color: var(--brand); }
.help-mini-card strong { font-size: 15px; }
.help-mini-label { color: var(--brand-strong); font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.help-mini-desc { color: var(--muted); font-size: 13.5px; }
.help-feedback { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.help-feedback h2 { font-size: 20px; }
.help-feedback p:last-child { margin-bottom: 0; }

.help-card-link:focus-visible, .help-mini-card:focus-visible, .help-path-items a:focus-visible, .help-chips a:focus-visible, .help-toc a:focus-visible, .help-breadcrumb a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

@media (max-width: 980px) {
  .help-card-grid, .help-support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  .help-toc { position: static; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .help-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-path-stage { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 680px) {
  .help-hero { padding: 36px 0 32px; }
  .help-hero .section-copy { font-size: 16px; }
  .help-card-grid, .help-support-grid { grid-template-columns: minmax(0, 1fr); }
  .help-search-row { flex-direction: column; }
  .help-toc ol { grid-template-columns: minmax(0, 1fr); }
  .help-step > p { margin-left: 0; }
  .help-path-options { flex-direction: column; }
  .help-path-or { align-self: flex-start; }
  .help-path-option { flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) { .help-card-link, .help-mini-card { transition: none; } }
