/* ── Layout ──────────────────────────────────────────────────────── */
.docs-wrap {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
}

/* ── Article ─────────────────────────────────────────────────────── */
.docs-article { flex: 1; min-width: 0; }
.docs-article .page-title  { margin-bottom: 0.25rem; }
.docs-article .page-subtitle { margin-bottom: 2.5rem; }

.docs-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    border-radius: var(--radius, 12px);
    background: var(--bg-card, #141414);
    border: 1px solid var(--border-color, rgba(255,255,255,.08));
}
.docs-section:last-child { margin-bottom: 0; }
.docs-section.section-active {
    border-color: rgba(0,187,167,.4);
    box-shadow: 0 0 0 1px rgba(0,187,167,.15);
    transition: border-color .3s, box-shadow .3s;
}

.docs-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 1rem 0;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,.08));
    display: flex;
    align-items: center;
    gap: 0.5rem;
    scroll-margin-top: 1.5rem;
}
.docs-section h2 .sec-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 6px;
    background: rgba(0,187,167,.15);
    color: var(--accent-color, #00bba7);
}
.docs-section h2 .sec-icon svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.docs-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 1.5rem 0 0.5rem 0;
}
.docs-section h3:first-child { margin-top: 0; }

.docs-section p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-color, #b0b0b0);
    margin: 0 0 0.9rem 0;
}
.docs-section p:last-child { margin-bottom: 0; }

.docs-section ul,
.docs-section ol {
    padding-left: 1.4rem;
    margin: 0 0 0.9rem 0;
    color: var(--text-color, #b0b0b0);
    font-size: 0.9375rem;
    line-height: 1.8;
}
.docs-section li { margin-bottom: 0.4rem; }
.docs-section li:last-child { margin-bottom: 0; }
.docs-section strong { color: #fff; font-weight: 600; }
.docs-section em { color: var(--accent-color, #00bba7); font-style: normal; font-weight: 500; }
.docs-section code {
    font-family: 'Courier New', monospace;
    font-size: 0.82em;
    background: rgba(255,255,255,.07);
    color: #e0e0e0;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.1);
}

/* ── Callout boxes ───────────────────────────────────────────────── */
.callout {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
}
.callout svg { width: 18px; height: 18px; min-width: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-info   { background: rgba(0,187,167,.08);  border: 1px solid rgba(0,187,167,.25); color: #b8ede9; }
.callout-info   svg { color: var(--accent-color, #00bba7); }
.callout-warn   { background: rgba(234,179,8,.07);  border: 1px solid rgba(234,179,8,.25); color: #f0d77a; }
.callout-warn   svg { color: #eab308; }
.callout-danger { background: rgba(239,68,68,.07);  border: 1px solid rgba(239,68,68,.25); color: #f8a7a7; }
.callout-danger svg { color: #ef4444; }

/* ── Step list ───────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0.5rem 0 1rem 0; counter-reset: step-ctr; }
.steps li {
    counter-increment: step-ctr;
    position: relative;
    padding-left: 2.1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-color, #b0b0b0);
    line-height: 1.7;
}
.steps li::before {
    content: counter(step-ctr);
    position: absolute;
    left: 0;
    top: 0.18em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-color, #00bba7);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
}

/* ── Feature grid ────────────────────────────────────────────────── */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 0.5rem 0;
}
.feat-card {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
}
.feat-card-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}
.feat-card-title svg { width: 14px; height: 14px; min-width: 14px; color: var(--accent-color, #00bba7); }
.feat-card p { font-size: 0.82rem; margin: 0; color: var(--text-muted, #888); line-height: 1.6; }

/* ── Tables ──────────────────────────────────────────────────────── */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 0.75rem 0;
}
.docs-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted, #888);
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.docs-table td {
    padding: 0.55rem 0.75rem;
    color: var(--text-color, #b0b0b0);
    border-bottom: 1px solid rgba(255,255,255,.04);
    vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table td:first-child { color: #fff; font-weight: 600; white-space: nowrap; }

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1em 0.5em;
    border-radius: 4px;
    vertical-align: middle;
}
.badge-green  { background: rgba(0,187,167,.15);  color: var(--accent-color, #00bba7); border: 1px solid rgba(0,187,167,.3); }
.badge-yellow { background: rgba(234,179,8,.12);  color: #eab308;  border: 1px solid rgba(234,179,8,.3); }
.badge-red    { background: rgba(239,68,68,.1);   color: #f87171;  border: 1px solid rgba(239,68,68,.25); }

/* ── URL anatomy box ─────────────────────────────────────────────── */
.url-box {
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: nowrap;
    line-height: 1.9;
    margin: 0.75rem 0;
}
.url-part-host  { color: #93c5fd; }
.url-part-path  { color: #e0e0e0; }
.url-part-hash  { color: var(--accent-color, #00bba7); font-weight: 700; }
.url-part-label {
    display: block;
    font-family: inherit;
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    margin-top: 0.4rem;
}

/* ── Comparison table ────────────────────────────────────────────── */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 0.75rem 0; }
.cmp-table th {
    padding: 0.5rem 0.9rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted, #888);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.cmp-table th:first-child { text-align: left; }
.cmp-table td {
    padding: 0.5rem 0.9rem;
    color: var(--text-color, #b0b0b0);
    border-bottom: 1px solid rgba(255,255,255,.04);
    text-align: center;
}
.cmp-table td:first-child { text-align: left; color: #fff; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-yes { color: var(--accent-color, #00bba7); font-weight: 700; }
.cmp-no  { color: var(--text-muted, #888); }

/* ── TOC ─────────────────────────────────────────────────────────── */
.docs-toc {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
}
.docs-toc-inner {
    background: var(--bg-card, #141414);
    border: 1px solid var(--border-color, rgba(255,255,255,.08));
    border-radius: var(--radius, 12px);
    padding: 1.25rem;
}
.docs-toc-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted, #888);
    margin: 0 0 0.75rem 0;
}
.docs-toc-nav { display: flex; flex-direction: column; gap: 0.1rem; }
.docs-toc-link {
    display: block;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-color, #b0b0b0);
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.4;
}
.docs-toc-link:hover  { background: rgba(255,255,255,.05); color: #fff; }
.docs-toc-link.active { background: rgba(0,187,167,.12); color: var(--accent-color, #00bba7); font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .docs-wrap        { flex-direction: column; padding: 1.5rem 1rem; }
    .docs-toc         { width: 100%; position: static; }
    .docs-toc-nav     { flex-direction: row; flex-wrap: wrap; gap: 0.3rem; }
}
@media (max-width: 600px) {
    .feat-grid        { grid-template-columns: 1fr 1fr; }
    .docs-section     { padding: 1.25rem; }
}
