/* =========================================
   Wisdio Documentation
   Extends the landing-page dark zinc system.
   ========================================= */

.docs-page {
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.08), transparent 36%),
        var(--bg);
}

.docs-page code,
.docs-page pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.nav-link-active {
    color: var(--text) !important;
}

.docs-hero {
    padding: 144px 0 72px;
    border-bottom: 1px solid var(--border);
}

.docs-hero-inner {
    max-width: 900px;
}

.docs-eyebrow,
.section-kicker,
.docs-mini-label,
.docs-sidebar-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.docs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.docs-eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.65);
    content: "";
}

.docs-hero h1 {
    max-width: 760px;
    color: #fff;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.docs-hero p {
    max-width: 720px;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.75;
}

.docs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 72px;
    padding-top: 64px;
    padding-bottom: 112px;
}

.docs-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
}

.docs-sidebar-label {
    display: block;
    margin-bottom: 16px;
}

.docs-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.docs-sidebar a {
    position: relative;
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}

.docs-sidebar a::before {
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: -13px;
    width: 1px;
    background: transparent;
    content: "";
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.docs-sidebar a.active::before {
    background: #fff;
}

.docs-content {
    min-width: 0;
    max-width: 860px;
}

.docs-section {
    padding: 0 0 88px;
    scroll-margin-top: 96px;
}

.docs-section + .docs-section {
    padding-top: 80px;
    border-top: 1px solid var(--border);
}

.section-kicker {
    margin-bottom: 12px;
}

.docs-section h2 {
    color: #fff;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.docs-section h3 {
    margin: 42px 0 16px;
    color: #fff;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.docs-section p {
    margin: 16px 0;
    color: var(--text-secondary);
}

.docs-section p code,
.docs-callout code,
.docs-faq-list code {
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: #e4e4e7;
    font-size: 0.88em;
}

.docs-lead {
    max-width: 760px;
    font-size: 17px;
    line-height: 1.75;
}

.docs-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
    list-style: none;
}

.docs-steps li {
    display: flex;
    gap: 14px;
    min-height: 136px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(24, 24, 27, 0.62);
}

.docs-steps li > span {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.docs-steps strong {
    color: var(--text);
    font-size: 14px;
}

.docs-steps p {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.docs-callout {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
}

.docs-callout-neutral {
    border-color: var(--border);
    background: var(--bg-alt);
}

.docs-callout strong {
    color: #fff;
    font-size: 14px;
}

.docs-callout p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.65;
}

.docs-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 17, 19, 0.78);
}

.docs-table-wrap table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.docs-table-wrap th,
.docs-table-wrap td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

.docs-table-wrap tr:last-child td {
    border-bottom: 0;
}

.docs-table-wrap th {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.docs-table-wrap td {
    color: var(--text-secondary);
}

.docs-table-wrap td:first-child,
.docs-table-wrap td code {
    color: #f4f4f5;
}

.docs-table-compact table {
    min-width: 520px;
}

.docs-badge {
    display: inline-flex;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #e4e4e7;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.docs-badge-soft {
    border-color: var(--border);
    background: transparent;
    color: var(--text-secondary);
}

.docs-code {
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #070708;
}

.docs-code-featured {
    border-color: var(--border-light);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.docs-code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--border);
    background: #111113;
}

.docs-code-bar span {
    overflow: hidden;
    color: var(--text-muted);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-copy {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.docs-copy:hover,
.docs-copy.copied {
    border-color: var(--border-light);
    background: var(--surface-hover);
    color: #fff;
}

.docs-code pre {
    overflow-x: auto;
    padding: 22px;
    color: #d4d4d8;
    font-size: 13px;
    line-height: 1.75;
    tab-size: 2;
}

.docs-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.docs-mini-card {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.docs-mini-card .docs-mini-label,
.docs-mini-card strong,
.docs-mini-card p,
.docs-mini-card ul {
    flex-basis: 100%;
}

.docs-mini-card code {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: #d4d4d8;
    font-size: 11px;
}

.docs-status-item {
    display: flex;
    flex-basis: 100%;
    align-items: center;
    gap: 9px;
    color: var(--text-secondary);
    font-size: 12px;
}

.docs-status-item code {
    min-width: 32px;
    text-align: center;
}

.docs-mini-card strong {
    color: #fff;
    font-size: 14px;
}

.docs-mini-card p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.6;
}

.docs-mini-card ul {
    margin: 4px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.docs-timestamp {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: #070708;
    text-align: center;
}

.docs-timestamp code {
    color: #fff;
    font-size: clamp(16px, 4vw, 24px);
    letter-spacing: 0.02em;
}

.docs-time-grid {
    margin-bottom: 36px;
}

.docs-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.docs-command-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 17, 19, 0.76);
}

.docs-command-card > code {
    display: inline-flex;
    padding: 4px 8px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--surface);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.docs-command-card p {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.docs-customization-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
}

.docs-customization-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

.docs-customization-list > div:last-child {
    border-bottom: 0;
}

.docs-customization-list strong {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.docs-customization-list code {
    overflow-x: auto;
    max-width: 58%;
    color: #f4f4f5;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.docs-resource-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.docs-resource-list a {
    position: relative;
    min-height: 118px;
    padding: 18px 44px 18px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 17, 19, 0.76);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.docs-resource-list a::after {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--text-muted);
    content: "↗";
    font-size: 15px;
}

.docs-resource-list a:hover {
    border-color: var(--border-light);
    background: var(--surface);
    transform: translateY(-1px);
}

.docs-resource-list strong,
.docs-resource-list span {
    display: block;
}

.docs-resource-list strong {
    color: #fff;
    font-size: 14px;
}

.docs-resource-list span {
    margin-top: 9px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

.docs-faq-list {
    margin-top: 28px;
    border-top: 1px solid var(--border);
}

.docs-faq-list details {
    border-bottom: 1px solid var(--border);
}

.docs-faq-list summary {
    position: relative;
    padding: 20px 42px 20px 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

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

.docs-faq-list summary::after {
    position: absolute;
    top: 20px;
    right: 4px;
    color: var(--text-muted);
    content: "+";
    font-size: 20px;
    font-weight: 400;
}

.docs-faq-list details[open] summary::after {
    content: "−";
}

.docs-faq-list p {
    max-width: 720px;
    margin: -4px 0 22px;
    font-size: 14px;
    line-height: 1.7;
}

.docs-bottom-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 36px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015)),
        var(--bg-alt);
}

.docs-bottom-cta h2 {
    max-width: 560px;
    margin-top: 8px;
    color: #fff;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.docs-bottom-cta p {
    max-width: 580px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.docs-bottom-cta .btn {
    flex-shrink: 0;
}

.docs-footer {
    padding-top: 0;
}

.docs-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.docs-footer-inner div {
    display: flex;
    gap: 20px;
}

.docs-footer-inner a:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .docs-layout {
        display: block;
        padding-top: 32px;
    }

    .docs-sidebar {
        position: static;
        overflow-x: auto;
        margin-bottom: 56px;
        padding-bottom: 10px;
    }

    .docs-sidebar-label {
        display: none;
    }

    .docs-sidebar nav {
        flex-direction: row;
        width: max-content;
        padding-left: 0;
        border-left: 0;
    }

    .docs-sidebar a {
        border: 1px solid var(--border);
        white-space: nowrap;
    }

    .docs-sidebar a::before {
        display: none;
    }

    .docs-sidebar a.active {
        border-color: var(--border-light);
    }
}

@media (max-width: 640px) {
    .docs-hero {
        padding: 120px 0 56px;
    }

    .docs-hero h1 {
        font-size: 42px;
    }

    .docs-hero p {
        font-size: 16px;
    }

    .docs-hero-actions,
    .docs-hero-actions .btn {
        width: 100%;
    }

    .docs-hero-actions .btn {
        text-align: center;
    }

    .docs-layout {
        padding-bottom: 72px;
    }

    .docs-section,
    .docs-section + .docs-section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .docs-section:first-child {
        padding-top: 0;
    }

    .docs-steps,
    .docs-grid-two,
    .docs-command-grid,
    .docs-resource-list {
        grid-template-columns: 1fr;
    }

    .docs-steps li {
        min-height: auto;
    }

    .docs-code pre {
        padding: 18px;
        font-size: 12px;
    }

    .docs-customization-list > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .docs-customization-list code {
        max-width: 100%;
        text-align: left;
    }

    .docs-bottom-cta {
        align-items: flex-start;
        flex-direction: column;
        padding: 26px;
    }

    .docs-bottom-cta .btn {
        width: 100%;
        text-align: center;
    }

    .docs-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
