@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --accent: #5c6bc0;
    --accent-light: #e8eaf6;
    --fg: #1a1a2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --sidebar-w: 240px;
    --radius: 10px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html,
body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ─── Layout shell ─────────────────────────────────────────── */
.page-shell {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: #f9fafb;
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 0 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.sidebar-brand img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
}

.sidebar-brand .app-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--fg);
    letter-spacing: -0.01em;
}

.sidebar-brand .app-sub {
    font-size: 0.78rem;
    color: var(--muted);
}

.sidebar-nav {
    padding: 1.25rem 0;
    list-style: none;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-nav li a:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

.sidebar-nav li a.active {
    background: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-nav .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.75;
}

/* ─── Main content ─────────────────────────────────────────── */
.content-area {
    flex: 1;
    min-width: 0;
    padding: 2.5rem 2rem 4rem;
}

/* ─── Mobile top bar ────────────────────────────────────────── */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-topbar img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.mobile-topbar .app-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--fg);
}

.mobile-tab-nav {
    display: none;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 57px;
    /* height of mobile-topbar */
    z-index: 49;
}

.mobile-tab-nav ul {
    list-style: none;
    display: flex;
}

.mobile-tab-nav ul li a {
    display: block;
    padding: 0.7rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 3px solid transparent;
}

.mobile-tab-nav ul li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ─── Page header inside content ─────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.page-header .badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

.page-header .updated {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ─── Notice box ────────────────────────────────────────────── */
.notice-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-size: 0.88rem;
    color: #92400e;
    margin-bottom: 2rem;
    line-height: 1.55;
}

/* ─── Warning box ────────────────────────────────────────────── */
.warning-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    font-size: 0.88rem;
    color: #991b1b;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    line-height: 1.55;
    font-weight: 600;
}

/* ─── Screenshots ────────────────────────────────────────────── */
.screenshot-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.25rem;
    margin-bottom: 2rem;
    justify-content: flex-start;
}

.screenshot-step {
    flex: 1;
    min-width: 150px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screenshot-step img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.75rem;
}

.screenshot-step p {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fg);
}


/* ─── Content typography ────────────────────────────────────── */
.doc-content section {
    margin-bottom: 2.25rem;
}

.doc-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 0.9rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--accent);
}

.doc-content ul {
    padding-left: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.doc-content ul li {
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.6;
}

.doc-content ul li strong {
    color: var(--fg);
}

.doc-content ul li a {
    color: var(--accent);
    font-weight: 500;
}

.doc-content .sub-list {
    margin-top: 0.45rem;
    padding-left: 1.1rem;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.doc-content .sub-list li {
    font-size: 0.88rem;
}

/* ─── Section divider ───────────────────────────────────────── */
.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* ─── Footer ────────────────────────────────────────────────── */
.doc-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.83rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

.doc-footer a {
    color: var(--accent);
    font-weight: 500;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-topbar {
        display: flex;
    }

    .mobile-tab-nav {
        display: block;
    }

    .page-shell {
        flex-direction: column;
    }

    .content-area {
        padding: 1.5rem 2.35rem 3rem;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 400px) {
    .content-area {
        padding: 1.25rem 1.25rem 3rem;
    }
}