/* CrewChief UK help centre (#451). Standalone and small: help pages don't load the app's stylesheet. */
:root {
  color-scheme: light dark;
  --accent: #c2410c;
  --accent-soft: rgba(194, 65, 12, 0.1);
  --link: #0369a1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #475569;
  --tip: #047857;
  --tip-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --note-bg: #f1f5f9;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.16);
    --link: #7dd3fc;
    --bg: #090d16;
    --surface: #111827;
    --border: #28354e;
    --text: #f8fafc;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --tip: #6ee7b7;
    --tip-bg: rgba(16, 185, 129, 0.12);
    --warn: #fcd34d;
    --warn-bg: rgba(245, 158, 11, 0.12);
    --note-bg: #1f293d;
  }
}
:root[data-theme="dark"] {
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --link: #7dd3fc;
  --bg: #090d16;
  --surface: #111827;
  --border: #28354e;
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --tip: #6ee7b7;
  --tip-bg: rgba(16, 185, 129, 0.12);
  --warn: #fcd34d;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --note-bg: #1f293d;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

.help-top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.help-top-inner { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; min-height: 44px; }
.help-brand-sub { color: var(--accent); font-weight: 600; margin-left: 4px; }
.help-app-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.help-main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.help-hero { text-align: center; padding: 24px 0 8px; }
.help-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 6px; letter-spacing: -0.02em; }
.lede { color: var(--text-2); font-size: 1.05rem; margin: 0 0 16px; }
.help-search input {
  width: 100%; max-width: 560px; min-height: 48px; padding: 10px 16px; font: inherit;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
}
.help-count { color: var(--muted); font-size: 0.9rem; min-height: 1.4em; margin: 8px 0 0; }
.help-install { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }
.help-empty { text-align: center; color: var(--text-2); }
.help-group { margin-top: 32px; }
.help-group h2 { font-size: 1.25rem; margin: 0; }
.help-group-blurb { color: var(--muted); margin: 2px 0 12px; }
.help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.help-card {
  display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s;
}
.help-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.help-card-title { display: block; font-weight: 650; }
.help-card-sum { display: block; color: var(--text-2); font-size: 0.92rem; margin-top: 2px; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; font-size: 0.9rem; }
.crumbs li + li::before { content: "›"; color: var(--muted); margin-right: 6px; }
.article { max-width: 760px; }
.article-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 6px; letter-spacing: -0.02em; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 24px; }
.toc-title { margin: 0 0 4px; font-weight: 650; font-size: 0.9rem; color: var(--muted); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 2px 0; }
.prose h2 { font-size: 1.3rem; margin: 32px 0 8px; padding-top: 8px; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.prose h3 { font-size: 1.05rem; margin: 22px 0 6px; scroll-margin-top: 80px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code { font-size: 0.9em; background: var(--note-bg); padding: 1px 5px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
thead th { background: var(--note-bg); font-weight: 650; color: var(--text); }
tbody th { font-weight: 600; color: var(--text); min-width: 9rem; }
tbody td { color: var(--text-2); }
tbody tr:last-child > * { border-bottom: 0; }
.callout { border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; background: var(--note-bg); color: var(--text-2); border-left: 4px solid var(--muted); }
.callout-tip { background: var(--tip-bg); border-left-color: var(--tip); }
.callout-warn { background: var(--warn-bg); border-left-color: var(--warn); }
.callout-label { color: var(--text); }
.shot { margin: 16px 0 22px; }
.shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.shot-phone img { max-width: min(100%, 360px); }
.shot figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }
.pager { max-width: 760px; display: flex; gap: 12px; margin-top: 36px; }
.pager a { flex: 1; display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-weight: 600; color: var(--text); }
.pager a span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.pager-next { text-align: right; }
.help-foot { border-top: 1px solid var(--border); padding: 20px 16px 32px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.help-foot p { margin: 4px 0; }
@media (max-width: 560px) {
  .help-brand-sub { display: none; }
  .pager { flex-direction: column; }
  .pager-next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .help-card { transition: none; } }
