/* GLIME Documentation page. Loads after how-it-works.css (variables, container, buttons, footer). */

.docs-hero { padding: 64px 0 34px; }
.docs-hero h1 { margin: 14px 0; font-size: clamp(2.1rem, 8vw, 3.8rem); line-height: 1.05; letter-spacing: -0.05em; max-width: 820px; }
.docs-hero h1 span { color: var(--cyan); }
.docs-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.75; }

.docs-layout { display: grid; gap: 22px; padding-bottom: 70px; }

/* table of contents */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.toc summary { cursor: pointer; list-style: none; font-family: "DM Mono", monospace; font-size: 0.68rem; letter-spacing: .12em; color: var(--cyan); padding: 4px 4px 8px; }
.toc summary::-webkit-details-marker { display: none; }
.toc nav { display: grid; gap: 2px; }
.toc a { display: block; padding: 8px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 0.78rem; font-weight: 600; }
.toc a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.toc a.active { color: #021014; background: linear-gradient(105deg, var(--green), var(--cyan)); }
.toc .grp { margin: 10px 10px 4px; color: var(--dim); font-family: "DM Mono", monospace; font-size: 0.58rem; letter-spacing: .12em; }

/* content */
.doc-body { min-width: 0; }
.doc-section { padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.doc-section:first-child { border-top: 0; padding-top: 0; }
.doc-section h2 { margin: 8px 0 12px; font-size: clamp(1.5rem, 5.5vw, 2.2rem); letter-spacing: -0.045em; line-height: 1.1; }
.doc-section h3 { margin: 26px 0 8px; font-size: 1.08rem; letter-spacing: -0.03em; }
.doc-section p { margin: 0 0 12px; color: var(--muted); font-size: 0.88rem; line-height: 1.78; max-width: 780px; }
.doc-section p b, .doc-section li b { color: var(--text); }
.doc-section ul, .doc-section ol { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 0.86rem; line-height: 1.75; max-width: 780px; }
.doc-section li { margin-bottom: 6px; }
.doc-section code { padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.07); color: var(--cyan); font-family: "DM Mono", monospace; font-size: 0.78em; }

.callout { margin: 16px 0; padding: 14px 16px; border-radius: 12px; max-width: 780px; font-size: 0.82rem; line-height: 1.65; color: var(--muted); border: 1px solid rgba(82,232,255,0.28); background: rgba(82,232,255,0.06); }
.callout b { color: var(--cyan); }
.callout.good { border-color: rgba(80,245,168,0.3); background: rgba(80,245,168,0.06); } .callout.good b { color: var(--green); }
.callout.warn { border-color: rgba(255,200,87,0.35); background: rgba(255,200,87,0.06); } .callout.warn b { color: var(--amber); }

.flow-steps { display: grid; gap: 8px; margin: 16px 0; max-width: 780px; counter-reset: fs; }
.flow-steps li { list-style: none; counter-increment: fs; position: relative; padding: 12px 14px 12px 50px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.flow-steps li::before { content: counter(fs); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #021014; background: linear-gradient(135deg, var(--green), var(--cyan)); font-family: "DM Mono", monospace; font-size: 0.66rem; }
.flow-steps { padding-left: 0 !important; }

.doc-table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; max-width: 780px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; min-width: 460px; }
.doc-table th, .doc-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.doc-table th { color: var(--cyan); font-family: "DM Mono", monospace; font-size: 0.62rem; letter-spacing: .08em; background: rgba(255,255,255,0.03); }
.doc-table td { color: var(--muted); }
.doc-table td:first-child { color: var(--text); font-weight: 700; white-space: nowrap; }
.doc-table tr:last-child td { border-bottom: 0; }

.faq-d { display: grid; gap: 10px; max-width: 780px; margin-top: 10px; }
.faq-d details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq-d summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 0.86rem; display: flex; justify-content: space-between; gap: 12px; }
.faq-d summary::-webkit-details-marker { display: none; }
.faq-d summary::after { content: "+"; color: var(--cyan); font-size: 1.15rem; font-weight: 400; }
.faq-d details[open] summary::after { content: "−"; }
.faq-d details p { padding: 0 16px 14px; margin: 0; font-size: 0.82rem; }

.doc-cta { margin-top: 20px; padding: 22px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px; background: linear-gradient(105deg, rgba(80,245,168,0.10), rgba(82,232,255,0.08), rgba(166,140,255,0.09)); border: 1px solid rgba(82,232,255,0.23); }
.doc-cta h3 { margin: 0 0 4px; font-size: 1.2rem; }
.doc-cta p { margin: 0; }

@media (min-width: 650px) {
  .doc-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 960px) {
  .docs-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 44px; align-items: start; }
  .toc { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; }
  .toc summary { pointer-events: none; }
}
