/* Article pages: fixed left site menu (same as index); no “At a glance” column */
/* Prevent rubber-band / overscroll bounce (match index.html) */
html {
    overscroll-behavior: none;
}
body.article-site {
    padding: 40px 24px;
    overflow-x: hidden;
    overscroll-behavior: none;
}
.article-site .page-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    /* Same as index.html (max-width 1023): reserve space for fixed left menu. */
    padding-left: 280px;
}
/*
 * Privacy (large screens): left menu + main only (no right “At a glance”). Real 264px left flex column,
 * centered row, main max-width = min(720px, 100vw - 336px) — 336 = body horizontal padding + 264 + gap.
 */
@media (min-width: 1024px) {
    body.privacy-page .article-site .page-wrapper {
        padding-left: 0;
        justify-content: center;
    }
    body.privacy-page .article-site .sidebar-left {
        flex: 0 0 264px;
        width: 264px !important;
        min-width: 264px;
        align-items: center;
    }
    body.privacy-page .article-site .article-main-column.article-main-column--single {
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
        max-width: min(720px, calc(100vw - 336px));
        margin-left: 0;
        margin-right: 0;
    }
    body.privacy-page .article-site .article-main-column > .container {
        max-width: min(720px, calc(100vw - 336px));
    }
}
/* Outer column: fills padded region; max-width uses same viewport math as index (no -48px — matches .page-wrapper > .container). */
.article-site .article-main-column {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: min(1100px, calc(100vw - 280px));
    margin-left: auto;
    margin-right: auto;
}
/* Privacy, Support: one column — outer width = index main text width so the card matches KB articles and stays centered on X */
.article-site .article-main-column.article-main-column--single {
    width: 100%;
}
@media (min-width: 1024px) {
    .article-site .article-main-column.article-main-column--single {
        max-width: min(720px, calc(100vw - 560px));
    }
}
@media (max-width: 1023px) {
    .article-site .article-main-column.article-main-column--single {
        max-width: min(720px, calc(100vw - 280px));
    }
}
.article-site .article-main-column > .container {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}
.article-site .article-page {
    max-width: 100%;
}
/*
 * Text column only: mirror index.html .page-wrapper > .container (same breakpoints / formulas).
 */
@media (min-width: 1024px) {
    .article-site .article-page .article-main.container,
    .article-site .article-page .article-main,
    .article-site .article-main-column > .container {
        max-width: min(720px, calc(100vw - 560px));
    }
}
@media (max-width: 1023px) {
    .article-site .article-page .article-main.container,
    .article-site .article-page .article-main,
    .article-site .article-main-column > .container {
        max-width: min(720px, calc(100vw - 280px));
    }
}
/* Same Y / padding / height as index.html .sidebar-left (keep align-items:flex-start: width:0 + center clips left) */
.article-site .sidebar-left {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex: 0 0 0;
    width: 0 !important;
    min-width: 0;
    overflow: visible;
    padding: 76px 20px 28px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    z-index: 10;
    pointer-events: auto;
}
.article-site .sidebar-left-inner,
.article-site .sidebar-right-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px 24px;
    min-width: 216px;
    background: rgba(90, 47, 160, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    margin: 0 14px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
/* “At a glance” — same as index.html */
.article-site .sidebar-right {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 264px;
    flex-shrink: 0;
    padding: 76px 20px 28px;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    height: 100vh;
    z-index: 10;
    pointer-events: auto;
}
@media (min-width: 1024px) {
    .article-site .sidebar-right {
        display: flex !important;
    }
}
@media (max-width: 1023px) {
    .article-site .sidebar-right {
        display: none !important;
    }
}
.article-site .sidebar-right h3 {
    font-size: 0.94rem;
    font-weight: 600;
    color: #66e6f2;
    margin: 0 0 12px 0;
}
.article-site .sidebar-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
}
.article-site .sidebar-highlight svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #66e6f2;
}
.article-site .sidebar-right .app-store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 0.99rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.article-site .sidebar-right .app-store-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.article-site .sidebar-right .app-store-badge svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
.article-site .site-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.article-site .site-nav a,
.article-site .site-nav button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    text-align: left;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    /* Same min-height for <a> and <button> so Support matches other pills */
    min-height: calc(1.35em + 16px);
}
.article-site .site-nav button {
    appearance: none;
    -webkit-appearance: none;
}
.article-site .site-nav a:hover,
.article-site .site-nav button:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}
.article-site .site-nav details {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}
.article-site .site-nav summary {
    list-style: none;
    padding: 8px 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #66e6f2;
    cursor: pointer;
    user-select: none;
}
.article-site .site-nav summary::-webkit-details-marker {
    display: none;
}
.article-site .site-nav summary::after {
    content: " ▾";
    font-size: 0.75rem;
    opacity: 0.85;
}
.article-site .site-nav details[open] summary::after {
    content: " ▴";
}
.article-site .site-nav-submenu {
    margin: 0;
    padding: 4px 0 10px 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.article-site .site-nav-submenu li {
    margin: 0;
}
.article-site .site-nav-submenu a {
    display: block;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 6px 10px 6px 14px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    border-left: 2px solid transparent;
}
.article-site .site-nav-submenu a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #66e6f2;
}

@media (max-width: 400px) {
    .article-site .sidebar-left {
        padding: 60px 8px 20px;
    }
    .article-site .sidebar-left-inner {
        margin: 0 8px;
        padding: 20px 14px;
        min-width: 0;
        max-width: 200px;
    }
    .article-site .page-wrapper {
        padding-left: 216px;
    }
    .article-site .article-main-column {
        max-width: min(1100px, calc(100vw - 216px));
    }
    .article-site .article-main-column.article-main-column--single {
        max-width: min(720px, calc(100vw - 216px));
    }
    .article-site .article-page .article-main.container,
    .article-site .article-page .article-main,
    .article-site .article-main-column > .container {
        max-width: min(720px, calc(100vw - 216px));
    }
}

/* Mobile (≤1023px): hamburger opens left nav; main column full width (no reserved left gutter) */
.mobile-nav-toggle {
    display: none;
}
.mobile-nav-backdrop {
    display: none;
}
@media (max-width: 1023px) {
    body.article-site {
        padding: 56px 16px 24px;
    }
    .article-site .page-wrapper {
        padding-left: 0 !important;
    }
    .article-site .article-main-column {
        max-width: min(1100px, 100%) !important;
    }
    .article-site .article-main-column.article-main-column--single {
        max-width: min(720px, 100%) !important;
    }
    .article-site .article-page .article-main.container,
    .article-site .article-page .article-main,
    .article-site .article-main-column > .container {
        max-width: min(720px, 100%) !important;
    }
    .mobile-nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 220;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        border-radius: 10px;
        background: rgba(90, 47, 160, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.38);
        color: #fff;
        cursor: pointer;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(8px);
    }
    .mobile-nav-toggle:focus {
        outline: 2px solid #66e6f2;
        outline-offset: 2px;
    }
    .mobile-nav-toggle .burger-line {
        display: block;
        width: 20px;
        height: 2px;
        margin: 3px 0;
        background: currentColor;
        border-radius: 1px;
        transition: transform 0.2s, opacity 0.2s;
    }
    body.mobile-nav-open .mobile-nav-toggle .burger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    body.mobile-nav-open .mobile-nav-toggle .burger-line:nth-child(2) {
        opacity: 0;
    }
    body.mobile-nav-open .mobile-nav-toggle .burger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .mobile-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 170;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(2px);
    }
    body.mobile-nav-open .mobile-nav-backdrop {
        display: block;
    }
    .article-site .sidebar-left {
        width: min(280px, 86vw) !important;
        flex: 0 0 auto !important;
        align-items: center;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        will-change: transform;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
    }
    body.mobile-nav-open .article-site .sidebar-left {
        transform: translateX(0);
        z-index: 210;
    }
}
@media (max-width: 768px) {
    body.article-site {
        padding: 52px 12px 16px;
    }
}
@media (min-width: 1024px) {
    .mobile-nav-toggle,
    .mobile-nav-backdrop {
        display: none !important;
    }
    .article-site .sidebar-left {
        transform: none !important;
    }
}
