/* ==========================================================================
   gapboard.app's written pages (content/ → npm run site): comparisons,
   guides, feature pages. Loaded after site.css, whose header, footer,
   buttons, FAQ and CTA band they reuse; this only adds the reading column.
   Colours are the app's tokens (/css/tokens.css) and site.css's — none here.
   ========================================================================== */

.doc { padding-block: 40px 96px; display: flex; flex-direction: column; gap: 56px; }
.doc > * { width: 100%; max-width: 760px; }
.doc--hub > *, .doc__cta, .doc__faq { max-width: none; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs + .doc__head { margin-top: -32px; }

.doc__head h1 { font-size: clamp(36px, 5.4vw, 56px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.doc__lede { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.doc__meta { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* --- the reading column ---------------------------------------------------- */

.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(24px, 3vw, 30px); line-height: 1.18; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.prose h3 { margin-top: 1.8em; font-size: 19px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose > :first-child { margin-top: 0; }
.prose p { text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--faint); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--pill); border-radius: 6px; padding: 1px 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line-strong); margin-block: 2.4em; }

.prose blockquote {
  margin: 1.4em 0 0; padding: 16px 20px; border-left: 3px solid var(--accent);
  background: var(--card); border-radius: 0 var(--r-card) var(--r-card) 0; color: var(--ink);
}
.prose blockquote > * + * { margin-top: .6em; }

/* the short answer at the top of a page: what an answer engine should quote */
.prose .answer {
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-panel);
  padding: 20px 22px; color: var(--ink); font-size: 16.5px; line-height: 1.6;
}
.prose .answer > b:first-child { display: block; font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--accent-ink); margin-bottom: 6px; }

/* comparison tables scroll sideways on a phone rather than squeezing */
.prose table {
  display: block; overflow-x: auto; border-collapse: collapse; margin-top: 1.4em;
  font-size: 15px; line-height: 1.45; background: var(--card);
  border: 1px solid var(--line-strong); border-radius: var(--r-card);
}
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 150px; }
.prose th { font-size: 13px; font-weight: 800; color: var(--ink); background: var(--surface); }
.prose td:first-child, .prose th:first-child { min-width: 130px; font-weight: 700; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

/* --- after the column: related pages, the hub's list ---------------------- */

.links { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.links a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-card);
  color: var(--ink-2); transition: border-color .2s ease, transform .15s ease;
}
.links a:hover { border-color: var(--accent-line); color: var(--ink-2); transform: translateY(-1px); }
.links small { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); }
.links b { font-size: 16.5px; line-height: 1.3; color: var(--ink); }
.links span { font-size: 14.5px; line-height: 1.5; }
.links--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; margin: 0; }

.doc__faq { margin-top: 8px; }

@media (max-width: 640px) {
  .doc { padding-block: 24px 72px; gap: 44px; }
  .crumbs + .doc__head { margin-top: -24px; }
  .doc__lede { font-size: 17.5px; }
  .prose { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .links a { transition: none; }
}
