/* ═══════════════════════════════════════════════════════════════
   GUIDES - long-form articles under /guides/
   Built by scripts/build-guides.py. Reading column, answer box first,
   then sections, FAQ and related links.
   ═══════════════════════════════════════════════════════════════ */

.gd-wrap { max-width: 46rem; margin-inline: auto; padding-inline: clamp(1.5rem, 5vw, 2rem); }
.gd-wrap--wide { max-width: 1280px; padding-inline: clamp(1.5rem, 5vw, 4rem); }

.gd-hero { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--border); }
.gd-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 1rem;
  text-wrap: balance;
}
.gd-stand { font-size: 1.1875rem; line-height: 1.6; color: rgba(255, 255, 255, 0.78); max-width: 40rem; }
.gd-meta { margin-top: 1.25rem; font-family: var(--mono, monospace); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }

.gd-crumbs { margin-bottom: 1.5rem; font-family: var(--mono, monospace); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.gd-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }
.gd-crumbs li + li::before { content: '/'; margin-right: 0.5rem; opacity: 0.4; }
.gd-crumbs a { color: rgba(255, 255, 255, 0.6); }
.gd-crumbs a:hover { color: var(--primary-lift, #7a7aff); }

.gd-body { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }

.gd-answer,
.gd-toc,
.gd-related {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.gd-answer { border-left: 3px solid var(--primary); }
.gd-answer p { font-size: 1.0625rem; line-height: 1.7; color: #fff; margin: 0; }
.gd-answer-label {
  display: block;
  margin-bottom: 0.625rem;
  font-family: var(--mono, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-lift, #7a7aff);
}
.gd-toc ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.375rem; }
.gd-toc a, .gd-related a { color: rgba(255, 255, 255, 0.8); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 3px; }
.gd-toc a:hover, .gd-related a:hover { color: #fff; text-decoration-color: var(--primary); }
.gd-related ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.375rem; }

.gd-sec { margin-top: clamp(2.5rem, 5vw, 3.5rem); scroll-margin-top: 6rem; }
.gd-sec h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.gd-sec p, .gd-sec li { font-size: 1.0625rem; line-height: 1.75; color: rgba(255, 255, 255, 0.8); }
.gd-sec p + p { margin-top: 1rem; }
.gd-sec ul, .gd-sec ol { margin: 1rem 0; padding-left: 1.25rem; display: grid; gap: 0.625rem; }
.gd-sec strong { color: #fff; font-weight: 600; }
.gd-sec a { color: var(--primary-lift, #7a7aff); text-decoration: underline; text-underline-offset: 3px; }

.gd-fig { margin: 1.75rem 0; }
.gd-fig-row { display: grid; gap: 0.75rem; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.gd-fig img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--border); }
.gd-fig--tall .gd-fig-row { max-width: 36rem; }
.gd-fig--tall .gd-fig-row:has(> img:only-child) { max-width: 17rem; }
.gd-fig figcaption { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.6; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 599px) {
  .gd-fig:not(.gd-fig--tall) .gd-fig-row { grid-auto-flow: row; }
}

.gd-table { margin: 1.25rem 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.gd-table table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: 0.9375rem; }
.gd-table th, .gd-table td { padding: 0.75rem 0.875rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.5; }
.gd-table thead th { font-family: var(--mono, monospace); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); background: var(--surface); }
.gd-table tbody th { color: #fff; font-weight: 600; white-space: nowrap; }
.gd-table td { color: rgba(255, 255, 255, 0.78); }
.gd-table tr:last-child th, .gd-table tr:last-child td { border-bottom: 0; }
.gd-note { font-size: 0.875rem !important; color: rgba(255, 255, 255, 0.5) !important; }

.gd-faq details { border-bottom: 1px solid var(--border); padding-block: 1rem; }
.gd-faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: #fff; list-style: none; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: '+'; float: right; color: var(--primary-lift, #7a7aff); }
.gd-faq details[open] summary::after { content: '\2212'; }
.gd-faq details p { margin-top: 0.75rem; }

.gd-sources li { font-size: 0.9375rem; }

/* Hub */
.gd-cards { display: grid; gap: 1rem; padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }
@media (min-width: 768px) { .gd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gd-card {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: border-color 0.25s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.gd-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.gd-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 1.2; }
.gd-card p { font-size: 0.9375rem; line-height: 1.6; color: rgba(255, 255, 255, 0.7); }
.gd-card-go { margin-top: auto; font-family: var(--mono, monospace); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-lift, #7a7aff); }
.gd-card-go::after { content: ' \2192'; }

@media (prefers-reduced-motion: reduce) { .gd-card { transition: none; } }
