/* ============================================
   docs.css – Tutorial page specific styles
   ============================================ */

/* ---- Re-use page-hero from download.css ---- */
.page-hero {
    padding: 12rem 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(59, 130, 246, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 40%, rgba(6, 182, 212, 0.05) 0%, transparent 55%),
        radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: auto, auto, 28px 28px;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.65;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.hero-meta-sep {
    color: #e5e5e5;
    font-size: 0.85rem;
}

/* ---- Platform tabs (re-used from download.css) ---- */
.platform-tabs-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 50;
}

.platform-tabs-bar.is-sticky {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    border-bottom: 1px solid #ebebeb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tabs-placeholder {
    height: 0;
    transition: height 0.1s;
}

.platform-tabs-inner {
    display: flex;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 4rem;
    max-width: 1440px;
    margin: 0 auto;
}

.platform-tabs-inner::-webkit-scrollbar { display: none; }

.platform-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1.1rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.platform-tab svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    opacity: 0.65;
    flex-shrink: 0;
}

.platform-tab img.platform-tab-img {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%);
    opacity: 0.45;
}

.platform-tab:hover img.platform-tab-img {
    opacity: 0.7;
}

.platform-tab.active img.platform-tab-img {
    filter: brightness(0) saturate(100%) invert(50%) sepia(89%) saturate(2064%) hue-rotate(210deg) brightness(103%) contrast(96%);
    opacity: 1;
}

.platform-tab:hover {
    color: var(--text-primary);
    background: #fafafa;
}

.platform-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: none;
}

.platform-tab.active svg { opacity: 1; }

/* ---- Platform Panels ---- */
.platform-panel { display: none; }
.platform-panel.active { display: block; }

/* ---- OS Banner (same as download.css) ---- */
.tutorial-section { padding: 5rem 0 7rem; }

.os-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 0 3rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 3rem;
}

.os-icon-wrap {
    width: 60px;
    height: 60px;
    background: #0a0a0a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.os-icon-wrap svg { width: 32px; height: 32px; }

.os-icon-wrap img.os-icon-img {
    filter: brightness(0) invert(1);
}

.os-banner-text h2 {
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 0.3rem;
}

.os-banner-text p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* ---- iOS Notice ---- */
.ios-notice {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.65;
    margin-bottom: 2rem;
}

/* ---- Quick Steps (3-step overview) ---- */
.quick-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.quick-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
}

.qs-divider {
    width: 2px;
    height: 2rem;
    background: linear-gradient(to bottom, #e5e5e5, transparent);
    margin-left: 1.75rem;
}

.qs-num {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.qs-body { flex: 1; }

.qs-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.qs-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
}

.qs-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-decoration: none;
    transition: gap 0.2s;
}

.qs-link:hover { gap: 0.6rem; }

/* ---- Tutorial Layout (sidebar + content) ---- */
.tutorial-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 4rem;
    align-items: start;
}

/* ---- Tutorial Sidebar ---- */
.tutorial-sidebar {
    position: sticky;
    top: 140px;
    padding: 1.5rem;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ebebeb;
}

.sidebar-link {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    margin-bottom: 0.1rem;
    line-height: 1.4;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: #f0f0f0;
}

.sidebar-link.active {
    color: var(--brand-blue);
    background: rgba(59, 130, 246, 0.07);
    font-weight: 500;
}

/* ---- Tutorial Steps ---- */
.tutorial-content {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.tutorial-step {
    scroll-margin-top: 160px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    background: #0a0a0a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tutorial-step h3 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.2;
}

.tutorial-step > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.tutorial-step > p:last-child { margin-bottom: 0; }

/* ---- Lists ---- */
.tutorial-list, .tutorial-ordered-list {
    margin: 0.75rem 0 1rem 0;
    padding-left: 1.5rem;
}

.tutorial-list { list-style: disc; }
.tutorial-ordered-list { list-style: decimal; }

.tutorial-list li,
.tutorial-ordered-list li {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.tutorial-list li strong,
.tutorial-ordered-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Inline links ---- */
.inline-link {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.inline-link:hover { opacity: 0.75; text-decoration: underline; }

/* ---- Info Boxes ---- */
.info-box {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 1rem 0;
}

.info-box svg { flex-shrink: 0; margin-top: 1px; }

.info-box--tip {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: #1e3a5f;
}

.info-box--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.info-box div code {
    background: rgba(0, 0, 0, 0.07);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ---- Code Blocks ---- */
.code-block {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    margin: 0.5rem 0;
}

.code-block-header {
    background: #f3f4f6;
    border-bottom: 1px solid #e8e8e8;
    padding: 0.55rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
}

.code-block pre {
    margin: 0;
    padding: 1rem 1.25rem;
    background: #fafafa;
    overflow-x: auto;
}

.code-block code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.65;
    color: #1a1a1a;
}

/* ---- Method Cards ---- */
.method-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1rem 0;
}

.method-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.method-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.method-card--recommended {
    border-color: rgba(59, 130, 246, 0.35);
    background: linear-gradient(145deg, #fff 0%, #f5f9ff 100%);
}

.method-badge {
    display: inline-block;
    background: var(--brand-blue);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.method-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

/* ---- Mini FAQ (inside tutorial steps) ---- */
.mini-faq {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-faq-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
}

.mini-faq-q {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.55rem;
}

.mini-faq-a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.mini-faq-a code {
    background: #f3f4f6;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ---- Advanced Grid ---- */
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.advanced-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.2s;
}

.advanced-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
    border-color: #d0d0d0;
}

.advanced-icon {
    width: 44px;
    height: 44px;
    background: #0a0a0a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.advanced-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
    stroke: #fff;
}

.advanced-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
}

.advanced-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .tutorial-layout {
        grid-template-columns: 180px 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 900px) {
    .tutorial-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tutorial-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        padding: 1rem;
    }

    .sidebar-label { display: none; }

    .sidebar-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem;
    }

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

    .advanced-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .page-hero { padding: 10rem 0 0; }
    .page-hero-content { padding-bottom: 3rem; }

    .platform-tabs-inner { padding: 0 1.25rem; }
    .platform-tab { padding: 0.9rem 1rem; font-size: 0.82rem; gap: 6px; }
    .platform-tab svg { width: 15px; height: 15px; }
    .platform-tab img.platform-tab-img { width: 15px; height: 15px; }

    .tutorial-section { padding: 3.5rem 0 5rem; }

    .os-banner { flex-direction: column; align-items: flex-start; gap: 1rem; padding-bottom: 2rem; margin-bottom: 2rem; }

    .quick-step { gap: 1.25rem; }
    .qs-num { width: 3rem; height: 3rem; font-size: 0.82rem; }
    .qs-body h3 { font-size: 1.1rem; }

    .step-header { flex-wrap: wrap; gap: 0.6rem; }
    .tutorial-step h3 { font-size: 1.15rem; }

    .hero-meta-row { gap: 0.5rem; }

    .advanced-card { padding: 1.5rem; }
}
