/* Long-form pages: /guides, /guides/<slug>, /faq, /how-it-works, /changelog.
   Loaded after styles.css; uses its tokens, bar and footer. */

.doc { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: clamp(96px, 11vw, 128px) 0 96px; }
.doc-crumb { margin: 0 0 20px; font-size: 14px; color: var(--fg-3); }
.doc-crumb a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.doc h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.035em; font-weight: 650; line-height: 1.08; margin: 0 0 16px; text-wrap: balance; }
.doc-meta { margin: 0 0 32px; font-family: var(--mono); font-size: 12px; color: var(--fg-3); }
.doc-answer { margin: 0 0 40px; padding: 18px 20px; border-radius: 6px; background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 17px; line-height: 1.55; color: var(--fg); }
.doc-answer p { margin: 0; }
.doc-answer p + p { margin-top: 10px; }
.doc h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.025em; font-weight: 650; line-height: 1.2; margin: 48px 0 14px; scroll-margin-top: 72px; }
.doc h3 { font-size: 18px; letter-spacing: -0.015em; font-weight: 600; margin: 28px 0 10px; scroll-margin-top: 72px; }
.doc p, .doc li { font-size: 16px; line-height: 1.65; color: var(--fg-2); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc a:not(.pill) { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.doc a:not(.pill):hover { text-decoration-color: currentColor; }
.doc code { font-family: var(--mono); font-size: 0.88em; padding: 1px 5px; border-radius: 3px; background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); }
.doc pre { overflow-x: auto; padding: 14px 16px; border-radius: 6px; background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line); }
.doc pre code { padding: 0; box-shadow: none; background: none; }
.doc sup a { text-decoration: none; font-family: var(--mono); font-size: 11px; color: var(--fg-3); }

/* Tables scroll inside their own box on narrow screens, never the page. */
.doc-table { margin: 0 0 20px; overflow-x: auto; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.doc th { font-weight: 600; color: var(--fg); background: var(--bg-raise); white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { color: var(--fg); font-weight: 500; }

.doc-note { margin: 24px 0; padding: 14px 16px; border-left: 2px solid var(--line-strong); background: rgb(255 255 255 / 0.02); }
.doc-note p:last-child { margin-bottom: 0; }

/* Credits block: required on every long-form page. */
.doc-credits { margin: 56px 0 0; padding: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.doc-credits h2 { margin-top: 0; font-size: 18px; }
.doc-credits p { font-size: 14px; }
.doc-credits p:last-child { margin-bottom: 0; }

.doc-sources { margin-top: 48px; }
.doc-sources ol { font-size: 14px; }
.doc-sources li { font-size: 14px; word-break: break-word; }

.doc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 32px 0 0; font-size: 14px; }

/* Guide index cards */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.doc-list li { margin: 0; }
.doc-list a { display: block; padding: 16px 18px; border-radius: 6px; background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none !important; transition: box-shadow 0.15s; }
.doc-list a:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.doc-list b { display: block; color: var(--fg); font-weight: 600; font-size: 16px; }
.doc-list span { display: block; margin-top: 4px; color: var(--fg-2); font-size: 14px; line-height: 1.5; }

/* FAQ */
.doc-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.doc-faq summary { cursor: pointer; color: var(--fg); font-weight: 600; font-size: 16px; line-height: 1.4; }
.doc-faq details > div { padding-top: 10px; }

@media (max-width: 720px) {
  .doc th, .doc td { padding: 8px 10px; }
}

/* Contributors (filled by scripts/contributors.mjs) */
.doc-people { list-style: none; padding: 0 !important; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.doc-people li { margin: 0; }
.doc-people a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border-radius: 10px; background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line); text-decoration: none !important; transition: box-shadow 0.15s; }
.doc-people a:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.doc-people img { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.doc-people span { display: grid; min-width: 0; }
.doc-people b { color: var(--fg); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-people small { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--fg-3); font-size: 12px; font-family: var(--mono); }
.doc-chip { flex: none; padding: 1px 8px; font-family: var(--sans); border-radius: 999px; background: rgb(255 255 255 / 0.1);
  color: var(--fg); font-style: normal; font-size: 11px; font-weight: 600; }
@media (max-width: 480px) { .doc-people { grid-template-columns: 1fr; } }
