/* help.css: the Support hub, User guide and How-to pages. Loads AFTER
   legal.css and reuses its tokens (:root), header, footer, .doc column and
   .callout. Nothing here restyles the legal pages: every rule is scoped to a
   class only the help pages use. Dials: variance 4, motion 2 (hover and
   focus only), density 5. */

/* ── Accessibility helpers ─────────────────────────────────────────────── */

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 160ms var(--ease);
}
.skip:focus { top: 12px; outline: 2px solid var(--teal-bright); outline-offset: 2px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Help navigation (under the header) ────────────────────────────────── */

.help-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line-faint);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.help-nav a {
  color: var(--mute);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.help-nav a[aria-current="page"],
.help-nav a[aria-current="true"] { color: var(--paper); border-color: var(--teal); }
.help-nav .store { margin-left: auto; color: var(--teal-dim); }
@media (hover: hover) and (pointer: fine) {
  .help-nav a:hover { color: var(--teal); }
}
.help-nav a:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 3px; }
@media (max-width: 520px) {
  .help-nav .store { margin-left: 0; flex-basis: 100%; }
}

/* ── Breadcrumbs ───────────────────────────────────────────────────────── */

.crumbs {
  margin-bottom: 18px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: '/'; color: var(--cold-dim, #3D4049); }
main.doc .crumbs a { color: var(--mute); border-bottom: 1px solid var(--line); }
.crumbs [aria-current="page"] { color: var(--soft); }

/* ── Kicker line above an h1 (hub pages) ───────────────────────────────── */

.kicker {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 14px;
}

/* ── On this page ──────────────────────────────────────────────────────── */

.toc {
  margin-top: 32px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.toc-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
main.doc .toc ul { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px 20px; }
@media (min-width: 560px) { main.doc .toc ul { grid-template-columns: 1fr 1fr; } }
main.doc .toc li { padding-left: 0; margin-bottom: 4px; font-size: 15px; }
main.doc .toc li::before { content: none; }
main.doc .toc a { border-bottom-color: transparent; }

/* ── Index rows (hub pages): number, title, one line of context ────────── */

.rows {
  list-style: none;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.rows li { border-bottom: 1px solid var(--line); }
main.doc .rows a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 4px 12px;
  padding: 16px 4px;
  border-bottom: 0;
  color: inherit;
}
.rows .idx {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.06em;
}
.rows .row-title {
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.rows .row-note {
  grid-column: 2 / 3;
  font-size: 14px;
  line-height: 1.55;
  color: var(--soft);
}
.rows .row-go {
  grid-row: 1 / 3;
  grid-column: 3 / 4;
  align-self: center;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--mute);
  transition: transform 200ms var(--ease), color 200ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  main.doc .rows a:hover .row-title { color: var(--teal); }
  main.doc .rows a:hover .row-go { color: var(--teal); transform: translateX(3px); }
}
main.doc .rows a:active .row-go { transform: translateX(1px); }
main.doc .rows a:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: -2px; border-radius: 6px; }

/* ── Numbered steps ────────────────────────────────────────────────────── */

main.doc ol.steps {
  list-style: none;
  counter-reset: step;
  margin-top: 8px;
  padding-left: 0;
}
main.doc ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 48px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--soft);
  max-width: 66ch;
}
main.doc ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--teal-dim);
}
main.doc ol.steps > li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 26px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
main.doc ol.steps > li:last-child::after { content: none; }
main.doc ol.steps > li:last-child { padding-bottom: 4px; }

/* ── Inline app labels and paths ───────────────────────────────────────── */

.ui {
  display: inline;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--paper);
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.92em;
  white-space: nowrap;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.path { white-space: normal; }
.path .to { color: var(--mute); margin: 0 4px; }
@media (max-width: 420px) { .ui { white-space: normal; } }

/* ── Tier tags ─────────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.tag.pro { color: var(--teal); border-color: rgba(0,229,160,0.35); }

/* ── Plan comparison table ─────────────────────────────────────────────── */

.table-wrap {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
table.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.plan-table caption {
  caption-side: top;
  text-align: left;
  padding: 14px 16px 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  background: var(--surface);
}
table.plan-table th,
table.plan-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line-faint);
  line-height: 1.45;
}
table.plan-table thead th {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  background: var(--surface);
}
table.plan-table thead th:last-child { color: var(--teal); }
table.plan-table tbody th { font-weight: 500; color: var(--paper); }
table.plan-table td { color: var(--soft); font-variant-numeric: tabular-nums; }
table.plan-table td.none { color: var(--mute); }
table.plan-table td:last-child { color: var(--paper); }
@media (max-width: 480px) {
  table.plan-table { font-size: 14px; }
  table.plan-table th, table.plan-table td { padding: 11px 10px; }
}

/* ── Definition-style fact list (what feeds a number) ──────────────────── */

main.doc dl.facts { margin-top: 10px; border-top: 1px solid var(--line-faint); }
main.doc dl.facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-faint);
}
@media (min-width: 600px) { main.doc dl.facts > div { grid-template-columns: 180px 1fr; gap: 16px; } }
main.doc dl.facts dt { font-weight: 500; color: var(--paper); font-size: 15px; }
main.doc dl.facts dd { color: var(--soft); font-size: 15px; line-height: 1.6; }

/* ── Small print under a section ───────────────────────────────────────── */

main.doc p.fine { font-size: 14px; color: var(--mute); margin-top: 12px; }

main.doc h2.section { scroll-margin-top: 24px; }
main.doc h3.subsection { scroll-margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  .skip, .help-nav a, .rows .row-go, main.doc a { transition: none; }
}
