/* Help page — a normal scrolling document (not a projector artboard). */

:root {
  /* Palette taken from the Rev. Haidau 80th book cover:
     navy, slate blue, teal and golden yellow. */
  --navy: #1e2440;
  --navy-deep: #171d37;
  --slate: #3f4a68;
  --teal: #2f8a8f;
  --gold: #e8b44c;

  --paper: #f1f5f7;
  --panel: #ffffff;
  --ink: #1a2142;
  --muted: #52607c;
  --rule: #d2dde2;
  --brand: var(--navy);
  --on-brand: #f7f9fb;
  --accent: #e8b44c;          /* decorative bars */
  --link: #17727a;            /* text links, small headings */
  --code-bg: #e6eef1;
  --kbd-bg: #ffffff;
  --kbd-line: #b9c8d0;
  --note-bg: #fbf1d9;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, "Courier New", monospace;
}
:root[data-theme="dark"] {
  --paper: #121832;
  --panel: #1a2142;
  --ink: #f1f5f8;
  --muted: #aebdc9;
  --rule: #2f3961;
  --link: #e8b44c;
  --code-bg: #1d2650;
  --kbd-bg: #232c58;
  --kbd-line: #46528a;
  --note-bg: #262a3a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
.wrap { width: min(1220px, 100% - 48px); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--slate) 0%, var(--navy) 100%); color: var(--on-brand); padding: 56px 0 44px; }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.mark { width: 14px; height: 14px; background: var(--gold); display: block; }
.hero h1 { color: var(--gold); margin-top: 18px; font-size: clamp(40px, 6vw, 68px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.lede { margin-top: 18px; max-width: 760px; font-size: 20px; line-height: 1.55; opacity: .95; }
.lede.small { font-size: 17px; opacity: .85; margin-top: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 34px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; background: rgba(255,255,255,.08); border-left: 5px solid var(--gold); color: var(--on-brand); text-decoration: none; transition: background .2s; }
.card:hover, .card:focus-visible { background: rgba(255,255,255,.16); outline: none; }
.card-k { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.card strong { font-size: 22px; }
.card span:not(.card-k) { font-size: 15px; opacity: .9; line-height: 1.45; }
.card em { margin-top: 6px; font-style: normal; font-weight: 700; font-size: 15px; color: var(--gold); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding: 44px 0 70px; align-items: start; }
.toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
.search input { width: 100%; padding: 11px 14px; font: 16px var(--sans); color: var(--ink); background: var(--panel); border: 2px solid var(--rule); border-radius: 4px; }
.search input:focus { outline: none; border-color: var(--teal); }
.count { min-height: 22px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.toc ol { list-style: none; margin-top: 8px; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 15px; line-height: 1.35; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--link); font-weight: 700; border-left-color: var(--accent); }
.toc-keys { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------- Content ---------- */
.block { padding-bottom: 46px; margin-bottom: 46px; border-bottom: 1px solid var(--rule); }
.block:last-of-type { border-bottom: 0; }
h2 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; padding-left: 18px; border-left: 6px solid var(--accent); margin-bottom: 22px; }
h3 { margin: 30px 0 10px; font-size: 19px; font-weight: 700; color: var(--link); }
p { margin: 0 0 14px; }
ul, ol.steps { margin: 0 0 16px 1.3em; }
li { margin: 6px 0; }
ol.steps { counter-reset: s; list-style: none; margin-left: 0; }
ol.steps li { counter-increment: s; position: relative; padding-left: 46px; margin: 14px 0; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--brand); color: var(--gold); font-weight: 700; font-size: 16px; }
ul.check { list-style: none; margin-left: 0; }
ul.check li { position: relative; padding-left: 34px; }
ul.check li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border: 2px solid var(--teal); }
em { font-style: italic; }
a { color: var(--link); }

code { font: .88em var(--mono); background: var(--code-bg); padding: 2px 6px; border-radius: 3px; }
pre { margin: 12px 0 18px; padding: 16px 18px; background: var(--code-bg); border-left: 4px solid var(--teal); border-radius: 3px; overflow: auto; font: 14px/1.6 var(--mono); }
pre code { background: none; padding: 0; font-size: inherit; }

kbd {
  display: inline-block; min-width: 28px; padding: 2px 8px 3px; margin: 1px 2px; text-align: center;
  font: 700 .85em/1.4 var(--sans); color: var(--ink);
  background: var(--kbd-bg); border: 1px solid var(--kbd-line); border-bottom-width: 3px; border-radius: 5px;
  white-space: nowrap;
}

.note { margin: 18px 0; padding: 14px 18px; background: var(--note-bg); border-left: 5px solid var(--accent); border-radius: 2px; font-size: 16px; }

.table-wrap { overflow-x: auto; margin: 6px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; padding: 10px 14px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--rule); }
td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--rule); }
table.keys td.k { width: 36%; min-width: 210px; white-space: normal; }
table.plain td:first-child { white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--teal) 8%, transparent); }

dl.qa > div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
dl.qa > div:last-child { border-bottom: 0; }
dl.qa dt { font-weight: 700; margin-bottom: 4px; }
dl.qa dd { color: var(--muted); }
:root[data-theme="dark"] dl.qa dd { color: #c6d1dc; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; }

/* Search states */
.hide { display: none !important; }
mark { background: #ffd978; color: #1a2142; padding: 0 2px; border-radius: 2px; }

@media (max-width: 920px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; max-height: none; }
  .toc ol { columns: 2; border-left: 0; }
  .toc a { border-left: 0; margin-left: 0; padding: 5px 0; }
}
@media (max-width: 560px) { body { font-size: 16px; } .toc ol { columns: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Print the guide as a clean cheat sheet */
@media print {
  :root { --paper: #fff; --panel: #fff; --ink: #000; --muted: #444; }
  body { font-size: 12pt; }
  .hero { background: none; color: #000; padding: 0 0 12pt; border-bottom: 3pt solid var(--teal); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cards, .toc, .foot a { display: none; }
  .layout { display: block; padding-top: 12pt; }
  .block { break-inside: avoid-page; padding-bottom: 14pt; margin-bottom: 14pt; }
  .lede { color: #000; opacity: 1; }
  .mark { background: var(--teal); }
  .hero h1 { color: #000; }
  tr, pre, .note { break-inside: avoid; }
}
