/* Help Center (help.html). Dark mode: the app has no dark theme of its own, so this page re-defines the shared colour variables for dark screens. */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1623;
    --surface: #172033;
    --surface-alt: #1B263B;
    --text: #E6EBF3;
    --muted: #A3B0C4;
    --border: #2B3850;
    --primary: #8EB0F5;
    --primary-dark: #6E94E0;
    --accent: #3CBDC0;
    --accent-tint: #16343A;
    --link: #5FD0D4;
    --hover-grey: #1F2B42;
    --chip: #22304A;
  }
  .help-brand { background: #fff; border-radius: 8px; padding: 4px 8px; }
  .help-page .pub-signin { color: var(--text); border-color: var(--border); }
}
.help-page { overflow-x: hidden; }
.help-wrap { max-width: 760px; }
.help-header-title { font-family: "Fraunces", Georgia, serif; font-size: 18px; color: var(--primary); flex: 1; }
.help-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.help-search input { width: 100%; font-size: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.help-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.help-count { min-height: 1.4em; margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.help-notice { background: var(--accent-tint); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.help-none { padding: 16px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); }
.help-loading { color: var(--muted); }
.help-error { color: var(--negative); padding: 12px; border: 1px solid var(--negative); border-radius: 8px; }

.help-cat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.help-cat > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 14px 16px; min-height: 48px; font-weight: 600; font-size: 17px; color: var(--primary); }
.help-cat > summary::-webkit-details-marker { display: none; }
.help-cat > summary::before, .help-q > summary::before { content: "\25B8"; color: var(--muted); flex: none; transition: transform .15s; }
.help-cat[open] > summary::before, .help-q[open] > summary::before { transform: rotate(90deg); }
.help-cat-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.help-cat-count { flex: none; font-weight: 500; font-size: 13px; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 2px 10px; }
.help-cat-intro { margin: 0; padding: 0 16px 8px 36px; color: var(--muted); font-size: 14px; }
.help-cat-body { padding: 0 8px 8px; }

.help-q { border-top: 1px solid var(--border); }
.help-q > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 12px 10px; min-height: 44px; font-weight: 600; font-size: 15.5px; color: var(--text); overflow-wrap: anywhere; }
.help-q > summary::-webkit-details-marker { display: none; }
.help-q > summary:focus-visible, .help-cat > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.help-q.help-target { background: var(--accent-tint); border-radius: 8px; }
.help-answer { padding: 0 12px 16px 30px; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.help-answer p { margin: 0 0 10px; }
.help-answer ul, .help-answer ol { margin: 0 0 10px; padding-left: 22px; }
.help-answer li { margin-bottom: 6px; }
.help-answer h4 { margin: 14px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.help-who { display: inline-block; background: var(--chip); border-radius: 8px; padding: 6px 10px; font-size: 14px; margin: 0 0 12px; }
.help-see { background: var(--accent-tint); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 12px; }
.help-see p:last-child { margin-bottom: 0; }
.help-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.help-unreviewed { color: #B3470F; font-weight: 600; margin: 0; }
@media (prefers-color-scheme: dark) { .help-unreviewed { color: #F2A06B; } }
.help-answer button, .help-related a { font-size: 13px; }
.help-actions button { background: transparent; color: var(--link); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-height: 36px; cursor: pointer; }
.help-related { margin-top: 12px; font-size: 14px; }
.help-related a { margin-right: 10px; }
.help-hidden { display: none !important; }

@media (max-width: 600px) {
  .help-answer { padding-left: 14px; }
  .help-cat-intro { padding-left: 16px; }
  .help-header-title { font-size: 16px; }
  .help-q > summary, .help-actions button { min-height: 44px; }
}

/* Printing (Prompt 562): the print style shows ONLY #help-print, which help.js keeps up to date (the open answers in full, or the topic list). It never relies on <details> being open. */
.help-print { display: none; }
@media print {
  html, body.help-page { background: #fff !important; color: #000 !important; overflow: visible !important; height: auto !important; }
  .pub-header, .pub-footer, .help-wrap > :not(.help-print) { display: none !important; }
  .pub-main { padding: 0 !important; }
  .help-print { display: block !important; font-size: 12pt; line-height: 1.5; }
  .help-print, .help-print * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
  .help-print h1 { font-size: 20pt; margin: 0 0 8pt; }
  .help-print h2 { font-size: 15pt; margin: 14pt 0 4pt; break-after: avoid; page-break-after: avoid; }
  .help-print h4 { font-size: 11pt; text-transform: uppercase; margin: 10pt 0 3pt; break-after: avoid; page-break-after: avoid; }
  .help-print p { margin: 0 0 6pt; orphans: 3; widows: 3; }
  .help-print ul, .help-print ol { margin: 0 0 6pt; padding-left: 20pt; }
  .help-print li { margin-bottom: 3pt; break-inside: avoid; page-break-inside: avoid; }
  .help-print .help-who { display: inline-block; border: 1px solid #000; padding: 2pt 6pt; }
  .help-print .help-see { border-left: 2pt solid #000; padding-left: 8pt; }
  .print-q { margin-bottom: 18pt; }
  .print-unreviewed { font-weight: 700; }
  .print-checked { font-size: 10pt; }
  .print-link { font-size: 10pt; overflow-wrap: anywhere; word-break: break-all; }
}

/* the help assistant shell (Prompt 590): behind its own switch, off for everyone */
.ha-panel, .ha-help { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card, #fff); }
.ha-title { margin: 0 0 6px; font-size: 18px; }
.ha-note, .ha-count { margin: 0 0 8px; font-size: 13px; color: var(--muted, #5b6b82); }
.ha-label { display: block; font-weight: 600; margin: 6px 0 4px; }
.ha-box textarea { width: 100%; box-sizing: border-box; min-width: 0; font: inherit; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.ha-out { margin-top: 10px; overflow-wrap: anywhere; }
.ha-support { display: inline-block; margin-top: 4px; }
.ha-answer { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ha-from { margin: 0 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.ha-ai-line { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted, #5b6b82); }
.ha-waiting, .ha-notfound { margin: 0 0 8px; }
.ha-support-area { margin-top: 6px; }
.ha-support-btn { max-width: 100%; white-space: normal; }
.ha-box button:disabled { opacity: .6; cursor: not-allowed; }
.ha-mail, .ha-signin { display: inline-block; margin: 4px 0; overflow-wrap: anywhere; }
