/* User guide: long-form reading on top of the app's own look. Loaded after
   app.css, so it inherits the color tokens and base type and only adds what a
   document needs that a five-tab app never did — a contents list, section
   spacing, a comparison table, and a place for extra depth that does not
   crowd the plain explanation next to it. */

body.guide { padding-bottom: 48px; }

/* ------------------------------------------------------------------ header */

.guide-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.guide-back {
  color: var(--muted); font-size: 14px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px;
  white-space: nowrap;
}
.guide-back:hover, .guide-back:focus { color: var(--text); border-color: var(--accent); }

.guide-hero { padding: 4px 0 28px; }
.guide-hero h1 { font-size: 30px; margin: 18px 0 8px; letter-spacing: -0.02em; }
.guide-hero .why { font-size: 16px; max-width: 62ch; }

/* -------------------------------------------------------------- contents */

.guide-toc {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin: 0 0 32px;
}
.guide-toc h2 {
  margin: 0 0 10px; font-size: 13px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.guide-toc ol {
  margin: 0; padding: 0; list-style: none;
  columns: 2; column-gap: 28px;
}
.guide-toc li { break-inside: avoid; margin-bottom: 6px; }
.guide-toc a { color: var(--text); text-decoration: none; font-size: 14px; }
.guide-toc a:hover, .guide-toc a:focus { color: var(--accent); }

/* -------------------------------------------------------------- sections */

.guide-section { margin: 0 0 40px; scroll-margin-top: 20px; }
.guide-section h2 {
  font-size: 21px; margin: 0 0 6px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.guide-section h3 { font-size: 16px; margin: 22px 0 8px; }
.guide-section p { color: var(--text); font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.guide-section p.why { color: var(--muted); }
.guide-section ul, .guide-section ol.steps { margin: 0 0 14px; padding-left: 22px; }
.guide-section li { font-size: 15px; line-height: 1.6; margin-bottom: 6px; }
.guide-section b { color: var(--text); }

ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li {
  position: relative; padding: 2px 0 2px 42px; margin-bottom: 16px;
}
ol.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}

/* A boxed aside for something worth pausing on -- a rule, not a warning. Reuses
   the app's own card surface rather than inventing a second visual language. */
.guide-note {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 14px 16px; margin: 0 0 16px;
}
.guide-note p:last-child { margin-bottom: 0; }
.guide-note.tip { border-left-color: var(--buy); }
.guide-note.rule { border-left-color: var(--sell); }

/* "For the curious" -- depth without weight. Plain <details>, no JS: this page
   never rebuilds itself the way the app does, so the browser's own open/close
   state is all it needs. */
details.guide-more {
  margin: 4px 0 18px; border: 1px solid var(--line); border-radius: 10px;
  padding: 2px 14px;
}
details.guide-more summary {
  cursor: pointer; padding: 10px 0; font-size: 14px; color: var(--muted);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details.guide-more summary::-webkit-details-marker { display: none; }
details.guide-more summary::before {
  content: "›"; font-size: 16px; line-height: 1; display: inline-block;
  transition: transform 0.15s ease;
}
details.guide-more[open] summary::before { transform: rotate(90deg); }
details.guide-more summary:hover { color: var(--text); }
details.guide-more .inner { padding: 0 0 14px; }
details.guide-more .inner p:last-child { margin-bottom: 0; }
details.guide-more .inner { font-size: 14px; color: var(--muted); line-height: 1.6; }
details.guide-more .inner b { color: var(--text); }

/* ------------------------------------------------------------------- table */

.guide-compare { width: 100%; overflow-x: auto; margin: 0 0 16px; }
.guide-compare table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.guide-compare th, .guide-compare td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.guide-compare th { color: var(--muted); font-weight: 600; font-size: 13px; }
.guide-compare td.yes { color: var(--buy); }
.guide-compare tr:last-child td { border-bottom: none; }

/* Questions now uses .guide-compare, the same table as "How Wirerally
   compares" -- left-justified, same borders, same width. No FAQ-specific
   styling left to keep in step with it. */

/* --------------------------------------------------------------- desktop */

@media (min-width: 720px) {
  .guide-hero h1 { font-size: 36px; }
  .guide-section p, .guide-section li { max-width: 68ch; }
  .guide-toc ol { columns: 3; }
}
