/* VIPStreams API docs — calm graphite system */

.docs-body {
    --docs-display: var(--font-display);
    --docs-mono: var(--font-mono);
    --docs-wash: rgba(255, 255, 255, 0.04);
    --docs-link: #c5d0db;
    --docs-link-hover: #f0f3f6;
    --docs-link-line: rgba(200, 245, 66, 0.4);
    --docs-link-line-hover: rgba(200, 245, 66, 0.75);
    --docs-code-fg: #d8dee6;
    --docs-muted-label: #8b95a1;
    --docs-panel: rgba(20, 24, 29, 0.92);
    scroll-behavior: smooth;
}

.docs-page {
    padding-bottom: 80px;
    max-width: 820px;
}

.docs-hero {
    padding: 44px 0 32px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    animation: docs-fade-up 0.5s ease both;
}

@keyframes docs-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.docs-hero-brand {
    font-family: var(--docs-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 8vw, 3.5rem);
    line-height: 0.95;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.docs-hero-tag {
    font-family: var(--docs-display);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0 0 18px;
}

.docs-lead {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
    max-width: 34rem;
    line-height: 1.7;
}

.docs-lead code,
.docs-copy code,
.docs-list code,
.docs-steps code {
    color: var(--docs-code-fg);
    background: var(--docs-wash);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    font-family: var(--docs-mono);
}

.docs-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    position: sticky;
    top: 12px;
    z-index: 40;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 16px 18px 16px 16px;
    background: linear-gradient(
        135deg,
        rgba(16, 20, 24, 0.97) 0%,
        rgba(10, 12, 14, 0.94) 100%
    );
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 12px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.docs-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--docs-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.docs-toc a:hover,
.docs-toc a.is-active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-color);
    transform: translateY(-1px);
}

.docs-toc a.is-active {
    color: var(--accent-color);
}

/* Scroll to top — lime CTA kept as sparse accent */
.docs-scroll-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 60;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    color: var(--bg-primary, #0a0c0e);
    background: var(--accent-color);
    border: 1px solid rgba(200, 245, 66, 0.55);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.22s ease,
        visibility 0.28s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
}

.docs-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.docs-scroll-top[hidden] {
    display: inline-flex !important;
}

.docs-scroll-top.is-visible:hover {
    background: var(--accent-secondary, #d4f86a);
    transform: translateY(-2px);
}

.docs-scroll-top:hover {
    background: var(--accent-secondary, #d4f86a);
}

.docs-scroll-top:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .docs-toc {
        top: 8px;
        padding: 14px 14px 14px 14px;
        gap: 8px 10px;
    }
    .docs-toc a { font-size: 12px; }
    .docs-scroll-top {
        right: 14px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }
}

.docs-section {
    margin: 0 0 10px;
    padding: 0;
    border: 1px solid rgba(42, 49, 58, 0.85);
    border-radius: var(--radius-lg);
    background: rgba(14, 17, 21, 0.65);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.docs-section.is-visible {
    animation: docs-section-in 0.45s ease both;
}

@keyframes docs-section-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.docs-section[open] {
    border-color: rgba(200, 245, 66, 0.18);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.docs-section-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.22s ease;
}

.docs-section-summary::-webkit-details-marker {
    display: none;
}

.docs-section-summary:hover {
    background: rgba(200, 245, 66, 0.04);
}

.docs-section[open] .docs-section-summary {
    border-bottom: 1px solid rgba(42, 49, 58, 0.9);
    background: rgba(200, 245, 66, 0.05);
}

.docs-section-chevron {
    width: 0;
    height: 0;
    border-left: 5px solid var(--accent-color);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    flex-shrink: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.docs-section[open] .docs-section-chevron {
    transform: rotate(90deg);
}

.docs-section-summary .docs-h2 {
    margin: 0;
    padding-left: 0;
    border-left: none;
    flex: 1;
}

.docs-section-inner {
    padding: 20px 18px 24px;
    animation: docs-inner-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes docs-inner-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.docs-section--notes {
    border-bottom: 1px solid rgba(42, 49, 58, 0.85);
    padding-bottom: 0;
}

.docs-section-head {
    margin-bottom: 22px;
}

.docs-h2 {
    font-family: var(--docs-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 2px solid rgba(200, 245, 66, 0.55);
    color: var(--text-primary);
}

.docs-h2 .title-accent {
    color: var(--text-tertiary);
    font-weight: 500;
}

.docs-h2 .title-text {
    color: var(--text-primary);
}

.docs-copy {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
    max-width: 40rem;
    line-height: 1.7;
}

.docs-copy--follow { margin-top: 18px; }

.docs-label {
    font-family: var(--docs-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--docs-muted-label);
    margin: 0 0 10px;
}

.docs-label + .docs-code { margin-top: 0; }
.docs-code + .docs-label { margin-top: 22px; }
.docs-aliases + .docs-label { margin-top: 22px; }
.docs-table-wrap + .docs-label { margin-top: 22px; }
.docs-table-wrap + .docs-note { margin-top: 16px; }
.docs-note + .docs-label { margin-top: 22px; }
.docs-copy + .docs-h3,
.docs-list + .docs-h3,
.docs-code + .docs-h3 { margin-top: 28px; }

.docs-h3 {
    font-family: var(--docs-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(42, 49, 58, 0.9);
}

.docs-steps {
    color: var(--text-secondary);
    font-size: 13px;
    padding-left: 1.25rem;
    max-width: 40rem;
    line-height: 1.8;
    margin: 0 0 22px;
}

.docs-steps li {
    margin-bottom: 10px;
}

.docs-steps li::marker {
    color: var(--text-tertiary);
    font-weight: 600;
}

/* In-content links: high contrast on dark (never browser blue) */
.docs-copy a,
.docs-list a,
.docs-steps a,
.docs-note a,
.docs-table a,
.docs-lead a {
    color: var(--docs-link);
    text-decoration: none;
    border-bottom: 1px solid var(--docs-link-line);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.docs-copy a:hover,
.docs-list a:hover,
.docs-steps a:hover,
.docs-note a:hover,
.docs-table a:hover,
.docs-lead a:hover {
    color: var(--docs-link-hover);
    border-bottom-color: var(--docs-link-line-hover);
}

.docs-copy a:focus-visible,
.docs-list a:focus-visible,
.docs-steps a:focus-visible,
.docs-note a:focus-visible,
.docs-table a:focus-visible,
.docs-lead a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.docs-note {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
    max-width: 40rem;
    padding: 14px 16px;
    border-left: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.docs-note code {
    color: var(--docs-code-fg);
    background: var(--docs-wash);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    font-family: var(--docs-mono);
}

.docs-table-wrap {
    overflow-x: auto;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(10, 12, 14, 0.72);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.55;
}

.docs-table th,
.docs-table td {
    padding: 13px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(42, 49, 58, 0.9);
}

.docs-table th {
    font-family: var(--docs-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--docs-muted-label);
    background: var(--docs-panel);
    white-space: nowrap;
}

.docs-table td {
    color: var(--text-secondary);
    font-family: var(--docs-mono);
}

.docs-table td:first-child {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    width: 7.5rem;
}

.docs-table tbody tr:last-child th,
.docs-table tbody tr:last-child td {
    border-bottom: none;
}

.docs-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Resource / path cells: off-white mono, not lime */
.docs-table code {
    color: var(--docs-code-fg);
    font-family: inherit;
    font-size: inherit;
    background: none;
    padding: 0;
}

.docs-code {
    background: rgba(10, 12, 14, 0.85);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    overflow-x: auto;
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-primary);
    font-family: var(--docs-mono);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.docs-code:hover {
    border-color: var(--border-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.docs-code--path {
    color: var(--docs-code-fg);
    background: rgba(10, 12, 14, 0.85);
}

.docs-code code {
    font-family: inherit;
    white-space: pre;
}

.docs-aliases {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.docs-aliases li {
    font-family: var(--docs-mono);
    font-size: 12px;
    color: var(--text-secondary);
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    letter-spacing: 0.03em;
}

.docs-aliases li:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.docs-list {
    color: var(--text-secondary);
    font-size: 13px;
    padding-left: 1.15rem;
    max-width: 40rem;
    line-height: 1.8;
    margin: 0;
}

.docs-list li {
    margin-bottom: 10px;
}

.docs-list li::marker {
    color: var(--text-tertiary);
}

@media (max-width: 640px) {
    .docs-hero { padding: 32px 0 24px; }
    .docs-section-inner { padding: 16px 14px 20px; }
    .docs-section-summary { padding: 14px 14px; }
    .docs-code { font-size: 11px; padding: 14px 16px; }
    .docs-table th,
    .docs-table td { padding: 12px 14px; }
    .docs-note { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .docs-hero,
    .docs-section.is-visible,
    .docs-section-inner {
        animation: none;
    }

    .docs-body {
        scroll-behavior: auto;
    }

    .docs-toc a,
    .docs-scroll-top,
    .docs-code,
    .docs-section {
        transition: none;
    }
}
