/* ══════════════════════════════════════════
   Guide pages — shared styles for
   guides/how-to-use-*.php
   Requires base.css (CSS variables)
══════════════════════════════════════════ */

/* ── Give <main> room to grow (body is flex-column) ── */
body > main {
  flex: 1;
}

/* ── Breadcrumb ── */
.guide-breadcrumb {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .03em;
  color: var(--text-ghost);
}
.guide-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.guide-breadcrumb a:hover { color: var(--accent); }
.guide-breadcrumb-sep { color: var(--border); }

/* ── Content wrapper ── */
.guide-content {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-8);
}

/* ── H1 ── */
.guide-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: var(--space-5);
}

/* Lead paragraph — first <p> immediately after <h1> */
.guide-content h1 + p {
  font-size: 1.02rem;
  color: var(--text-soft);
  line-height: 1.8;
  border-left: 3px solid var(--accent);
  padding-left: var(--space-4);
  margin-bottom: var(--space-7);
}

/* ── H2 section headings ── */
.guide-content h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

/* First H2 — sits closer to the lead paragraph */
.guide-content h1 + p + h2 {
  margin-top: var(--space-5);
}

/* ── H3 FAQ questions / sub-headings ── */
.guide-content h3 {
  font-family: var(--font-body);
  font-size: .97rem;
  font-weight: 500;
  color: var(--text);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

/* ── H4 ── */
.guide-content h4 {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

/* ── Body paragraphs ── */
.guide-content p {
  font-size: .92rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

/* ── Ordered list (step-by-step) ──
   Use position:absolute on ::before so list content
   stays in normal flow — display:grid/flex on li
   turns inline children into grid/flex items, breaking layout. */
.guide-content ol {
  counter-reset: guide-step;
  list-style: none;
  padding-left: 56px; /* 40px circle + 16px gap */
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.guide-content ol > li {
  counter-increment: guide-step;
  position: relative;
  font-size: .92rem;
  color: var(--text-soft);
  line-height: 1.75;
}

.guide-content ol > li::before {
  content: counter(guide-step, decimal-leading-zero);
  position: absolute;
  left: -56px;
  top: 0;
  width: 40px;
  height: 40px;
  line-height: 40px;      /* vertically centers the counter text */
  text-align: center;     /* horizontally centers the counter text */
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  color: var(--accent);
}

/* ── Unordered list ── */
.guide-content ul {
  list-style: none;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.guide-content ul > li {
  position: relative;
  font-size: .92rem;
  color: var(--text-soft);
  line-height: 1.75;
}

.guide-content ul > li::before {
  content: '→';
  position: absolute;
  left: -24px;
  top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .85rem;
}

/* ── Inline elements ── */
.guide-content strong { font-weight: 600; color: var(--text); }
.guide-content em { font-style: italic; }
.guide-content a { color: var(--accent); }
.guide-content a:hover { opacity: .8; text-decoration: none; }

/* ── Blockquote ── */
.guide-content blockquote {
  border-left: 3px solid var(--accent);
  margin: var(--space-5) 0;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.guide-content blockquote p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── HR ── */
.guide-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-7) 0 var(--space-6);
}

/* ── Table ── */
.guide-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin-bottom: var(--space-5);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.guide-content th {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.guide-content td {
  padding: var(--space-2) var(--space-3);
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.guide-content tr:last-child td { border-bottom: none; }
.guide-content tr:hover td { background: var(--bg); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .guide-content {
    padding: var(--space-5) var(--space-4) var(--space-7);
  }
  .guide-breadcrumb {
    padding: var(--space-4) var(--space-4) 0;
  }
}

@media (max-width: 480px) {
  .guide-content ol {
    padding-left: 44px; /* 32px circle + 12px gap */
  }
  .guide-content ol > li::before {
    left: -44px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: .65rem;
  }
}
