/* ============================================================================
   Reference pages (docs.html, faq.html, apis.html) -- text-only layouts that
   extend the shared design system in site.css. No images anywhere.
   ============================================================================ */

.doc-layout {
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 56px;
  max-width: 1140px; margin: 0 auto; padding: 24px 24px 80px;
}
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 24px; } }

/* Table of contents */
.toc { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }
@media (max-width: 900px) { .toc { position: static; max-height: none; border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px 20px; background: var(--panel); } }
.toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mist-dim); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc > ol > li { margin: 0 0 4px; }
.toc a { display: block; text-decoration: none; color: var(--mist); font-size: 13.5px; line-height: 1.4; padding: 5px 10px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.toc a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.toc a.active { color: var(--sky-bright); border-left-color: var(--sky); background: rgba(47,211,95,0.08); }
.toc > ol > li > a { font-weight: 600; }
.toc ol ol { margin: 2px 0 8px 12px; }
.toc ol ol a { font-size: 12.5px; color: var(--mist-dim); }

/* Article text */
.doc-body { min-width: 0; }
.doc-body section { padding-top: 12px; margin-bottom: 44px; scroll-margin-top: 84px; }
.doc-body h2 { font-size: 1.7rem; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--panel-border); }
.doc-body h3 { font-size: 1.15rem; margin: 30px 0 10px; scroll-margin-top: 84px; color: #fff; }
.doc-body h4 { font-size: 1rem; margin: 22px 0 8px; color: var(--sky-bright); }
.doc-body p { margin: 0 0 14px; font-size: 15.5px; }
.doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 22px; color: var(--mist); line-height: 1.7; font-size: 15.5px; }
.doc-body li { margin-bottom: 6px; }
.doc-body li > ul, .doc-body li > ol { margin: 6px 0 4px; }
.doc-body a { color: var(--sky-bright); }
.doc-body strong { color: #fff; }
.doc-body code, .kbd {
  font-family: 'Consolas', 'SFMono-Regular', monospace; font-size: 0.88em;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  padding: 1px 7px; border-radius: 5px; color: #e8ebef; white-space: nowrap;
}

/* Call-out boxes */
/* Buttons inside article text: the generic ".doc-body a" link color above would
   otherwise win over the button's own text color (blue text on a blue button). */
.doc-body a.btn, .doc-body a.btn:hover { color: #fff; text-decoration: none; }
.doc-body a.btn-primary { text-shadow: 0 1px 2px rgba(14,15,17,0.55); }

.note, .warn, .tip {
  border-radius: 10px; padding: 14px 18px; margin: 0 0 18px; font-size: 14.5px; line-height: 1.65; color: var(--mist);
  border: 1px solid var(--panel-border); border-left-width: 4px; background: rgba(255,255,255,0.03);
}
.note { border-left-color: var(--sky); }
.tip { border-left-color: var(--green); }
.warn { border-left-color: var(--orange); }
.note strong, .tip strong, .warn strong { display: inline; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--panel-border); border-radius: 10px; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--panel-border); color: var(--mist); }
.doc-body th { background: rgba(255,255,255,0.05); color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.doc-body tr:last-child td { border-bottom: none; }
.doc-body td:first-child { color: #fff; font-weight: 600; }
.tag-free, .tag-paid, .tag-key {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin: 0 4px 4px 0; white-space: nowrap;
}
.tag-free { background: rgba(0,230,118,0.12); color: var(--green); border: 1px solid rgba(0,230,118,0.35); }
.tag-paid { background: rgba(255,170,0,0.12); color: var(--orange); border: 1px solid rgba(255,170,0,0.35); }
.tag-key { background: rgba(47,211,95,0.12); color: var(--sky-bright); border: 1px solid rgba(47,211,95,0.35); }

/* FAQ accordions */
.faq-group { margin-bottom: 40px; scroll-margin-top: 84px; }
.faq-group > h2 { font-size: 1.4rem; margin-bottom: 14px; }
details.faq { border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
details.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; font-size: 15.5px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 20px; color: var(--sky-bright); flex-shrink: 0; }
details.faq[open] summary::after { content: '\2212'; }
details.faq[open] summary { border-bottom: 1px solid var(--panel-border); }
details.faq .answer { padding: 16px 20px 6px; }
details.faq .answer p, details.faq .answer ul, details.faq .answer ol { font-size: 15px; }

.faq-index { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; padding: 0; list-style: none; }
.faq-index a { display: inline-block; text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--panel-border); background: rgba(255,255,255,0.04); color: var(--mist); font-size: 13.5px; font-weight: 600; }
.faq-index a:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

.single-col { max-width: 900px; margin: 0 auto; padding: 24px 24px 80px; }
.updated { font-size: 13px; color: var(--mist-dim); margin-top: 14px; }

/* The documentation page: parts, chapter leads, a folding contents and its filter */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toc-find { display: block; margin: 0 0 10px; }
.toc-find input { width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--panel-border); background: rgba(255,255,255,0.04); color: #fff; font: inherit; font-size: 13px; }
.toc-find input::placeholder { color: var(--mist-dim); }
.toc-find input:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.toc-part { margin: 16px 0 4px; }
.toc-part:first-child { margin-top: 0; }
.toc-part span { display: block; padding: 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky-bright); }
.toc-ch > ol { display: none; }
.toc-ch.open > ol, .toc.filtering .toc-ch > ol { display: block; }
.toc.searching > ol { display: none; }
.toc-results a { border-left: 0; border-radius: 8px; padding: 8px 10px; margin: 0 0 4px; }
.toc-results a b { display: block; color: #fff; font-size: 13.5px; }
.toc-results a small { display: block; color: var(--sky-bright); font-size: 11px; margin: 1px 0 3px; }
.toc-results a span { display: block; color: var(--mist-dim); font-size: 12px; line-height: 1.45; }
.toc-results mark { background: rgba(47,211,95,0.25); color: #fff; border-radius: 3px; padding: 0 1px; }
.toc-res-n { font-size: 12px; color: var(--mist-dim); margin: 0 0 8px; padding: 0 10px; }
details.more { border: 1px solid var(--panel-border); border-radius: 10px; background: var(--panel); margin: 14px 0 18px; }
details.more > summary { cursor: pointer; list-style: none; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--sky-bright); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+'; display: inline-block; width: 18px; }
details.more[open] > summary::before { content: '\2212'; }
details.more[open] > summary { border-bottom: 1px solid var(--panel-border); }
details.more > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.more > :last-child { margin-bottom: 14px; }
.part-banner { margin: 56px 0 28px; padding: 22px 26px; border: 1px solid var(--panel-border); border-left: 4px solid var(--sky); border-radius: 12px; background: linear-gradient(90deg, rgba(47,211,95,0.12), rgba(47,211,95,0.02)); }
.part-banner:first-child { margin-top: 0; }
.part-banner .part-no { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky-bright); margin-bottom: 4px; }
.part-banner strong { display: block; font-size: 1.5rem; color: #fff; line-height: 1.25; }
.part-banner p { margin: 8px 0 0; font-size: 15px; color: var(--mist); }
.chapter-lead { margin: -4px 0 18px; font-size: 16.5px; line-height: 1.65; color: var(--mist); }
.chapter-lead p { font-size: 16.5px; }
.chapter-lead p:last-child { margin-bottom: 0; }
a.alias { display: block; height: 0; overflow: hidden; scroll-margin-top: 84px; }
