/* ═══════════════════════════════════════════
   KLIDEQ DOCUMENTATION — docs.css
   Extends main styles.css design tokens
   ═══════════════════════════════════════════ */

/* ─── DOCS LAYOUT (3 columns) ─── */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    min-height: 100vh;
    padding-top: 70px; /* navbar height */
}

/* ─── SIDEBAR (left) ─── */
.docs-sidebar {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 2rem 1.25rem 2rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.docs-sidebar::-webkit-scrollbar {
    display: none;
}

.docs-sidebar__search {
    position: relative;
    margin-bottom: 1.5rem;
}

.docs-sidebar__search-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.25rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all 0.2s ease;
}

.docs-sidebar__search-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.docs-sidebar__search-input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(244, 93, 19, 0.1);
}

.docs-sidebar__search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

/* Sidebar sections */
.docs-nav__section {
    margin-bottom: 1.25rem;
}

.docs-nav__section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease;
    user-select: none;
}

.docs-nav__section-title:hover {
    color: rgba(255, 255, 255, 0.6);
}

.docs-nav__section-icon {
    width: 20px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-primary);
    opacity: 0.7;
}

.docs-nav__section-icon svg {
    width: 16px;
    height: 16px;
}

.docs-nav__section-chevron {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
}

.docs-nav__section.collapsed .docs-nav__section-chevron {
    transform: rotate(-90deg);
}

/* Smooth expand/collapse for sidebar links */
.docs-nav__links {
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                margin 0.3s ease;
}

.docs-nav__section.collapsed .docs-nav__links {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

/* Sidebar links */
.docs-nav__links {
    padding-left: 0.25rem;
}

.docs-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.625rem 0.4375rem 2rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.docs-nav__link:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
}

.docs-nav__link--active {
    color: var(--color-primary);
    background: rgba(244, 93, 19, 0.08);
    font-weight: 500;
}

.docs-nav__link--active:hover {
    color: var(--color-primary);
    background: rgba(244, 93, 19, 0.12);
}

/* ─── MAIN CONTENT (center) ─── */
.docs-content {
    min-width: 0;
    padding: 2rem 3rem 4rem;
    max-width: 100%;
}

/* Breadcrumbs */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 1.5rem;
}

.docs-breadcrumb a {
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.15s ease;
}

.docs-breadcrumb a:hover {
    color: var(--color-primary);
}

.docs-breadcrumb__sep {
    font-size: 0.625rem;
    opacity: 0.4;
}

.docs-breadcrumb__current {
    color: rgba(255, 255, 255, 0.7);
}

/* Content typography */
.docs-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.docs-content__subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.docs-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: -0.01em;
    position: relative;
}

.docs-content h2:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.docs-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-content p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.docs-content ul,
.docs-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.docs-content ul {
    list-style: none;
}

.docs-content ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.docs-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.7;
}

.docs-content ol {
    list-style: decimal;
}

.docs-content ol li {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.docs-content ol li::marker {
    color: var(--color-primary);
    font-weight: 600;
}

.docs-content a:not(.docs-card):not(.docs-pager__link):not(.docs-pricing-card) {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(244, 93, 19, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease;
}

.docs-content a:not(.docs-card):not(.docs-pager__link):not(.docs-pricing-card):hover {
    text-decoration-color: var(--color-primary);
}

.docs-content strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.docs-content code {
    padding: 0.15em 0.4em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85em;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--color-primary-hover);
}

/* Anchor links on headings */
.docs-anchor {
    opacity: 0;
    margin-left: 0.375rem;
    color: rgba(255, 255, 255, 0.2);
    text-decoration: none !important;
    transition: opacity 0.15s ease;
    font-weight: 400;
}

.docs-content h2:hover .docs-anchor,
.docs-content h3:hover .docs-anchor {
    opacity: 1;
}

.docs-anchor:hover {
    color: var(--color-primary) !important;
}

/* ─── CALLOUT BOXES ─── */
.docs-callout {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-callout__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.docs-callout__body {
    flex: 1;
    min-width: 0;
}

.docs-callout__body p {
    margin-bottom: 0.5rem;
    font-size: inherit;
}

.docs-callout__body p:last-child {
    margin-bottom: 0;
}

.docs-callout__body ul,
.docs-callout__body ol {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
    font-size: inherit;
}

.docs-callout__body ul:last-child,
.docs-callout__body ol:last-child {
    margin-bottom: 0;
}

.docs-callout--tip {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: rgba(34, 197, 94, 0.85);
}

.docs-callout--info {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: rgba(147, 197, 253, 0.85);
}

.docs-callout--warning {
    background: rgba(244, 93, 19, 0.06);
    border: 1px solid rgba(244, 93, 19, 0.15);
    color: rgba(244, 93, 19, 0.85);
}

.docs-callout--caution {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: rgba(252, 165, 165, 0.85);
}

/* ─── STEP BOXES ─── */
.docs-steps {
    counter-reset: docs-step;
    margin: 1.5rem 0;
}

.docs-step {
    counter-increment: docs-step;
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s ease;
}

.docs-step:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.docs-step__number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(244, 93, 19, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.docs-step__number::before {
    content: counter(docs-step);
}

.docs-step__body h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.375rem;
}

.docs-step__body p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin-bottom: 0;
}

.docs-step__body ul,
.docs-step__body ol {
    margin-top: 0.625rem;
}

/* ─── IMAGE PLACEHOLDERS ─── */
.docs-img-placeholder {
    width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
    padding: 2.5rem 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.015);
    text-align: center;
    transition: border-color 0.2s ease;
}

.docs-img-placeholder:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.docs-img-placeholder__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(244, 93, 19, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--color-primary);
}

.docs-img-placeholder__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.375rem;
}

.docs-img-placeholder__desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* Actual images (when screenshots are added) */
.docs-img {
    width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-screenshot {
    display: block;
    width: 100%;
    max-width: 780px;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 1.5rem auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.docs-screenshot:hover {
    border-color: rgba(244, 93, 19, 0.2);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4);
}

.docs-screenshot-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-screenshot-pair .docs-screenshot {
    max-width: 100%;
    margin: 0;
}

.docs-screenshot-pair__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .docs-screenshot-pair {
        grid-template-columns: 1fr;
    }
}

/* ─── PRICING CARDS ─── */
.docs-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-pricing-card {
    padding: 1.5rem;
    padding-top: 2.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.docs-pricing-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.docs-pricing-card--highlighted {
    border-color: rgba(244, 93, 19, 0.3);
    background: rgba(244, 93, 19, 0.04);
}

.docs-pricing-card--highlighted:hover {
    border-color: rgba(244, 93, 19, 0.45);
    background: rgba(244, 93, 19, 0.06);
}

.docs-pricing-card__badge {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(244, 93, 19, 0.15);
    color: var(--color-primary);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.docs-pricing-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.docs-pricing-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.docs-pricing-card__amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.docs-pricing-card__period {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
}

.docs-pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.docs-pricing-card__features li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.docs-pricing-card__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F45D13' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

@media (max-width: 900px) {
    .docs-pricing {
        grid-template-columns: 1fr;
    }
}

/* ─── FEATURE CARDS (docs homepage) ─── */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-card {
    padding: 1.5rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.docs-card:hover {
    border-color: rgba(244, 93, 19, 0.2);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.docs-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(244, 93, 19, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.docs-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.375rem;
}

.docs-card__desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

/* ─── TABLE OF CONTENTS (right sidebar) ─── */
.docs-toc {
    position: sticky;
    top: 70px;
    align-self: start;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.docs-toc::-webkit-scrollbar {
    display: none;
}

.docs-toc__title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.docs-toc__link {
    display: block;
    padding: 0.3125rem 0 0.3125rem 0.75rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none !important;
    line-height: 1.4;
}

.docs-toc__link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.docs-toc__link--active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.docs-toc__link--h3 {
    padding-left: 1.5rem;
    font-size: 0.75rem;
}

/* ─── PREV/NEXT NAVIGATION ─── */
.docs-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-pager__link {
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.docs-pager__link:hover {
    border-color: rgba(244, 93, 19, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.docs-pager__link--next {
    text-align: right;
}

.docs-pager__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.375rem;
}

.docs-pager__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ─── MOBILE DOCS HEADER BAR ─── */
.docs-mobile-header {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 100;
    height: 48px;
    background: transparent;
    border-bottom: 1px solid transparent;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    transition: background 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
}

.docs-mobile-header.scrolled {
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-mobile-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.docs-mobile-header__toggle:active {
    transform: scale(0.92);
    background: rgba(244, 93, 19, 0.15);
    border-color: rgba(244, 93, 19, 0.3);
    color: var(--color-primary);
}

.docs-mobile-header__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}

.docs-mobile-header__breadcrumb a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.15s;
}

.docs-mobile-header__breadcrumb a:hover {
    color: var(--color-primary);
}

.docs-mobile-header__breadcrumb .docs-mobile-sep {
    font-size: 0.5625rem;
    opacity: 0.4;
    flex-shrink: 0;
}

.docs-mobile-header__breadcrumb .docs-mobile-current {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── SIDEBAR CLOSE BUTTON ─── */
.docs-sidebar__close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
}

.docs-sidebar__close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ff6b6b;
}

/* ─── LEGACY FLOATING TOGGLE (hidden, kept for compat) ─── */
.docs-sidebar-toggle {
    display: none !important;
}

.docs-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.docs-sidebar-overlay.open {
    pointer-events: auto;
    opacity: 1;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 260px 1fr;
    }

    .docs-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Mobile header visible */
    .docs-mobile-header {
        display: flex;
    }

    .docs-layout {
        display: block;
    }

    /* Sidebar — full off-screen */
    .docs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: auto;
        width: min(320px, 85vw);
        height: 100vh;
        height: 100dvh;
        max-height: none;
        z-index: 999;
        background: #0f0f23;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.3s ease;
        padding: 3.5rem 1.25rem 2rem;
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .docs-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.6);
    }

    /* Show close button inside sidebar on mobile */
    .docs-sidebar__close {
        display: flex;
    }

    .docs-toc {
        display: none;
    }

    /* Content — full width, room for mobile header */
    .docs-content {
        padding: 120px 1.25rem 3rem;
        min-width: 0;
        overflow-x: hidden;
    }

    /* Hide desktop breadcrumb on mobile (mobile header has its own) */
    .docs-breadcrumb {
        display: none;
    }

    .docs-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .docs-content h2 {
        font-size: 1.25rem;
    }

    .docs-pager {
        grid-template-columns: 1fr;
    }

    .docs-cards {
        grid-template-columns: 1fr;
    }

    .docs-screenshot {
        max-width: 100%;
    }

    .docs-screenshot-pair {
        grid-template-columns: 1fr;
    }

    .docs-steps {
        padding-left: 0;
    }

    /* Prevent Safari iOS auto-zoom on input focus */
    .docs-sidebar__search-input {
        font-size: 16px;
    }
}

/* ─── DIVIDER ─── */
.docs-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 2rem 0;
}

/* ─── KEYBOARD SHORTCUT BADGE ─── */
.docs-kbd {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.6875rem;
    font-family: var(--font-sans);
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

/* ─── COMPARISON BOXES (good vs bad) ─── */
.docs-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.docs-comparison__bad,
.docs-comparison__good {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
}

.docs-comparison__bad {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.docs-comparison__good {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.docs-comparison__label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.docs-comparison__label svg {
    flex-shrink: 0;
}

.docs-comparison__bad .docs-comparison__label {
    color: rgba(252, 165, 165, 0.8);
}

.docs-comparison__good .docs-comparison__label {
    color: rgba(134, 239, 172, 0.8);
}

.docs-comparison p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
    .docs-comparison {
        grid-template-columns: 1fr;
    }
}

/* ─── FAQ ACCORDION ─── */
.docs-faq-item {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.docs-faq-item summary {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.docs-faq-item[open] {
    border-color: rgba(244, 93, 19, 0.15);
}

/* ─── HUBSPOT CONTACT FORM — dark theme override ─── */
.docs-contact-form {
    margin: 1.5rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.docs-contact-form .hs-form-field {
    margin-bottom: 1.25rem;
}

.docs-contact-form label:not(.hs-form-radio-display):not(.hs-form-checkbox-display) {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: block;
}

.docs-contact-form .hs-input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.docs-contact-form .hs-input:focus {
    outline: none;
    border-color: rgba(244, 93, 19, 0.5);
}

.docs-contact-form .hs-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.docs-contact-form textarea.hs-input {
    min-height: 120px;
    resize: vertical;
}

.docs-contact-form .hs-form-radio-display,
.docs-contact-form .hs-form-checkbox-display {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    cursor: pointer;
}

.docs-contact-form .hs-button {
    background: linear-gradient(135deg, #f45d13, #ff7a33);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.docs-contact-form .hs-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(244, 93, 19, 0.3);
}

.docs-contact-form .hs-error-msgs {
    color: #ff6b6b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    list-style: none;
    padding: 0;
}

.docs-contact-form .submitted-message {
    color: #4caf50;
    font-size: 0.9375rem;
    text-align: center;
    padding: 1.5rem;
}

.docs-contact-form .hs-fieldtype-select .hs-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
