/* ──────────── Documentation ──────────── */
.docs-wrap { min-height: 100vh; background: #fff; }

/* Docs hero */
.docs-hero { background: linear-gradient(180deg, var(--ld-band) 0%, #fff 100%); padding: 80px 32px 56px; border-bottom: 1px solid var(--gray-200); }
.docs-hero .inner { max-width: 1280px; margin: 0 auto; }
.docs-hero h1 { font-family: var(--serif); font-size: 52px; line-height: 1.05; letter-spacing: -.02em; margin: 18px 0 12px; }
.docs-hero p { font-size: 17px; color: var(--gray-600); margin: 0 0 28px; max-width: 600px; line-height: 1.55; }
.docs-search { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #fff; border: 1px solid var(--gray-300); border-radius: 12px; max-width: 580px; box-shadow: 0 2px 8px rgba(10,20,15,.04); }
.docs-search input { flex: 1; border: 0; outline: 0; font-size: 15px; color: var(--text-primary); background: transparent; font-family: inherit; }
.docs-search .kbd { font-size: 11px; padding: 3px 7px; border: 1px solid var(--gray-200); border-radius: 4px; color: var(--gray-500); font-weight: 600; background: var(--gray-50); }

/* Quick categories */
.docs-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.docs-quick-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: 20px; cursor: pointer; transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease; }
.docs-quick-card:hover { border-color: var(--green-300); transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(10,20,15,.08); }
.docs-quick-card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; margin-bottom: 12px; }
.docs-quick-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.docs-quick-card p { font-size: 13px; color: var(--gray-600); margin: 0; line-height: 1.45; }

/* Body layout */
.docs-body { max-width: 1280px; margin: 0 auto; padding: 56px 32px 96px; display: grid; grid-template-columns: 240px 1fr 240px; gap: 48px; align-items: start; }

/* Sidebar (TOC) */
.docs-toc { position: sticky; top: 24px; padding-right: 16px; max-height: calc(100vh - 48px); overflow-y: auto; }
.docs-toc-group { margin-bottom: 24px; }
.docs-toc h4 { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); margin: 0 0 10px; }
.docs-toc a { display: block; padding: 7px 10px; border-radius: 7px; font-size: 13.5px; color: var(--gray-700); font-weight: 500; border-left: 2px solid transparent; transition: color .12s ease, background .12s ease, border-color .12s ease; }
.docs-toc a:hover { color: var(--text-primary); background: var(--gray-50); }
.docs-toc a.active { color: var(--brand-700); border-left-color: var(--brand-700); background: var(--green-50); font-weight: 600; }

/* Content */
.docs-main { min-width: 0; }
.docs-section { padding: 32px 0; border-bottom: 1px solid var(--gray-100); }
.docs-section:first-child { padding-top: 0; }
.docs-section:last-child { border-bottom: 0; }
.docs-section h2 { font-family: var(--serif); font-size: 34px; line-height: 1.1; letter-spacing: -.015em; margin: 0 0 8px; display: flex; align-items: center; gap: 12px; }
.docs-section .ic-h { width: 42px; height: 42px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; border: 1px solid var(--green-200); }
.docs-section .sub { font-size: 15px; color: var(--gray-600); margin: 0 0 24px; line-height: 1.55; }

.docs-section h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 24px 0 8px; }
.docs-section p { font-size: 14.5px; color: var(--gray-700); line-height: 1.65; margin: 0 0 12px; }
.docs-section ul, .docs-section ol { font-size: 14.5px; color: var(--gray-700); line-height: 1.7; padding-left: 22px; margin: 0 0 14px; }
.docs-section ul li, .docs-section ol li { margin-bottom: 4px; }
.docs-section code { font-family: ui-monospace, monospace; font-size: 13px; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; color: var(--green-800); }
.docs-section pre { background: #0E1612; color: #C9E8A0; padding: 16px 20px; border-radius: 12px; overflow-x: auto; font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.55; margin: 12px 0 18px; }
.docs-section pre .kw { color: #95EAFF; }
.docs-section pre .str { color: #FEC84B; }
.docs-section pre .com { color: #6F8475; }
.docs-section a.docs-link { color: var(--brand-700); font-weight: 600; }
.docs-section a.docs-link:hover { text-decoration: underline; }

/* Status grid */
.docs-status { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 12px 0 20px; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: 10px; background: #fff; }
.status-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success-500); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(7,148,85,.12); }
.status-row .dot.warn { background: var(--warning-500); box-shadow: 0 0 0 4px rgba(220,104,3,.12); }
.status-row .nm { font-weight: 600; font-size: 14px; flex: 1; color: var(--text-primary); }
.status-row .v { font-size: 12px; color: var(--gray-500); font-weight: 600; }

/* FAQ */
.faq-item { border: 1px solid var(--gray-200); border-radius: 12px; margin-bottom: 10px; transition: border-color .12s ease, box-shadow .12s ease; overflow: hidden; }
.faq-item.open { border-color: var(--green-300); box-shadow: 0 4px 12px -4px rgba(10,20,15,.06); }
.faq-q { padding: 16px 20px; display: flex; align-items: center; gap: 14px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--text-primary); width: 100%; text-align: left; }
.faq-q .chev { margin-left: auto; color: var(--gray-500); transition: transform .15s ease; flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(90deg); color: var(--brand-700); }
.faq-q .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; flex-shrink: 0; }
.faq-a { padding: 0 20px 16px 64px; font-size: 14px; color: var(--gray-700); line-height: 1.65; }

/* Support cards */
.support-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.support-card { padding: 22px; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; min-width: 0; }
.support-card .btn { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; margin-bottom: 14px; }
.support-card h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.support-card p { font-size: 13.5px; color: var(--gray-600); line-height: 1.5; margin: 0 0 14px; }
.support-card .row-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gray-500); font-weight: 600; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); }

/* Right rail */
.docs-rail { position: sticky; top: 24px; padding-left: 16px; border-left: 1px solid var(--gray-100); }
.docs-rail h5 { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500); margin: 0 0 10px; }
.docs-rail .help-card { padding: 16px; background: var(--ld-band); border: 1px solid var(--green-200); border-radius: 12px; margin-bottom: 16px; }
.docs-rail .help-card h6 { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.docs-rail .help-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--gray-600); line-height: 1.5; }
.docs-rail .help-card .btn { width: 100%; justify-content: center; font-size: 12.5px; padding: 8px 12px; }
.docs-rail ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.docs-rail ul li a { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-700); font-weight: 500; padding: 6px 10px; border-radius: 6px; transition: background .12s ease, color .12s ease; }
.docs-rail ul li a:hover { background: var(--green-50); color: var(--brand-700); }
.docs-rail ul li a svg { color: var(--gray-500); }
.docs-rail ul li a:hover svg { color: var(--brand-700); }

/* Mini nav */
.docs-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.93); backdrop-filter: blur(12px); border-bottom: 1px solid var(--gray-200); padding: 14px 32px; }
.docs-nav .inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.docs-nav .docs-nav-links { display: flex; gap: 6px; margin-left: auto; }
.docs-nav .docs-nav-links a { padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--gray-700); transition: background .12s ease, color .12s ease; }
.docs-nav .docs-nav-links a:hover, .docs-nav .docs-nav-links a.active { background: var(--green-50); color: var(--brand-700); }

/* Responsive */
@media (max-width: 1280px) {
  .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .docs-body { grid-template-columns: 220px 1fr; gap: 36px; }
  .docs-rail { display: none; }
  .docs-quick { grid-template-columns: repeat(2, 1fr); }
  .docs-status { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .docs-body { grid-template-columns: 1fr; padding: 32px 20px 64px; }
  .docs-toc { position: static; max-height: none; padding-right: 0; margin-bottom: 24px; }
  .docs-hero { padding: 56px 20px 40px; }
  .docs-hero h1 { font-size: 36px; }
  .docs-quick { grid-template-columns: 1fr; }
  .docs-nav .docs-nav-links { display: none; }
}


/* ──────── Documentation — Dark mode ──────── */
[data-theme="dark"] .docs-wrap { background: var(--bg-primary); }
[data-theme="dark"] .docs-hero { background: linear-gradient(180deg, #0E1218 0%, var(--bg-primary) 100%); border-bottom-color: var(--gray-200); }
[data-theme="dark"] .docs-hero h1 { color: var(--text-primary); }
[data-theme="dark"] .docs-hero p { color: var(--gray-600); }
[data-theme="dark"] .docs-search { background: #14191F; border-color: var(--gray-300); }
[data-theme="dark"] .docs-search input { color: var(--text-primary); }
[data-theme="dark"] .docs-search input::placeholder { color: var(--gray-500); }
[data-theme="dark"] .docs-search .kbd { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-500); }
[data-theme="dark"] .docs-quick-card { background: #14191F; border-color: var(--gray-200); }
[data-theme="dark"] .docs-quick-card h3 { color: var(--text-primary); }
[data-theme="dark"] .docs-quick-card p { color: var(--gray-600); }
[data-theme="dark"] .docs-quick-card .ic { background: rgba(143,184,113,.12); color: var(--green-800); }
[data-theme="dark"] .docs-nav { background: rgba(10,13,18,.85); border-bottom-color: var(--gray-200); }
[data-theme="dark"] .docs-nav .docs-nav-links a { color: var(--gray-700); }
[data-theme="dark"] .docs-nav .docs-nav-links a:hover, [data-theme="dark"] .docs-nav .docs-nav-links a.active { background: rgba(143,184,113,.12); color: var(--green-800); }
[data-theme="dark"] .docs-toc h4 { color: var(--gray-500); }
[data-theme="dark"] .docs-toc a { color: var(--gray-700); }
[data-theme="dark"] .docs-toc a:hover { color: var(--text-primary); background: var(--gray-100); }
[data-theme="dark"] .docs-toc a.active { background: rgba(143,184,113,.12); color: var(--green-800); border-left-color: var(--green-700); }
[data-theme="dark"] .docs-section { border-bottom-color: var(--gray-200); }
[data-theme="dark"] .docs-section h2 { color: var(--text-primary); }
[data-theme="dark"] .docs-section .ic-h { background: rgba(143,184,113,.12); border-color: rgba(143,184,113,.25); color: var(--green-800); }
[data-theme="dark"] .docs-section .sub, [data-theme="dark"] .docs-section p, [data-theme="dark"] .docs-section ul, [data-theme="dark"] .docs-section ol { color: var(--gray-700); }
[data-theme="dark"] .docs-section h3 { color: var(--text-primary); }
[data-theme="dark"] .docs-section code { background: var(--gray-100); color: var(--green-800); }
[data-theme="dark"] .docs-section pre { background: #050708; }
[data-theme="dark"] .docs-section a.docs-link { color: var(--green-800); }
[data-theme="dark"] .status-row { background: #14191F; border-color: var(--gray-200); }
[data-theme="dark"] .status-row .nm { color: var(--text-primary); }
[data-theme="dark"] .status-row .v { color: var(--gray-500); }
[data-theme="dark"] .faq-item { background: #14191F; border-color: var(--gray-200); }
[data-theme="dark"] .faq-item.open { border-color: var(--green-300); }
[data-theme="dark"] .faq-q { color: var(--text-primary); }
[data-theme="dark"] .faq-q .ic { background: rgba(143,184,113,.12); color: var(--green-800); }
[data-theme="dark"] .faq-a { color: var(--gray-700); }
[data-theme="dark"] .support-card { background: #14191F; border-color: var(--gray-200); }
[data-theme="dark"] .support-card h4 { color: var(--text-primary); }
[data-theme="dark"] .support-card p { color: var(--gray-600); }
[data-theme="dark"] .support-card .row-meta { border-top-color: var(--gray-200); color: var(--gray-500); }
[data-theme="dark"] .support-card .ic { background: rgba(143,184,113,.12); color: var(--green-800); }
[data-theme="dark"] .docs-rail { border-left-color: var(--gray-200); }
[data-theme="dark"] .docs-rail .help-card { background: rgba(143,184,113,.08); border-color: rgba(143,184,113,.25); }
[data-theme="dark"] .docs-rail .help-card h6 { color: var(--text-primary); }
[data-theme="dark"] .docs-rail .help-card p { color: var(--gray-600); }
[data-theme="dark"] .docs-rail h5 { color: var(--gray-500); }
[data-theme="dark"] .docs-rail ul li a { color: var(--gray-700); }
[data-theme="dark"] .docs-rail ul li a:hover { background: rgba(143,184,113,.1); color: var(--green-800); }
[data-theme="dark"] .docs-rail ul li a svg { color: var(--gray-500); }
[data-theme="dark"] .docs-rail ul li a:hover svg { color: var(--green-800); }
