/* ═══════════════════════════════════════════════════════════
   Android Tutorial v2 — Editorial Premium UI
   ═══════════════════════════════════════════════════════════ */

.and-tut-page {
    --and-radius: 16px;
    --and-radius-lg: 24px;
    --and-radius-xl: 32px;
    --and-border: color-mix(in srgb, var(--mk-text-muted, #94a3b8) 18%, transparent);
    --and-glass: color-mix(in srgb, var(--mk-pub-card, #0f172a) 82%, transparent);
    --and-text: var(--mk-text, #f8fafc);
    --and-muted: var(--mk-text-muted, #94a3b8);
    --and-android: #3ddc84;
    --and-android-deep: #1faa59;
    --and-purple: var(--mk-purple, #7c3aed);
    --and-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --mk-site-header-h: 3.55rem;
    --and-rail-top: 4.75rem;
}

.and-tut-page .main-content { padding: 0; }

/* ─── Breadcrumb ─── */
.and-tut-crumb {
    position: relative;
    z-index: 2;
    padding: 0.65rem 0 0;
}

.and-tut-crumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0 0 0.65rem;
    font-size: 0.76rem;
    color: var(--and-muted);
}

.and-tut-crumb-list li:not(:last-child)::after {
    content: '›';
    margin-inline-start: 0.5rem;
    opacity: 0.45;
}

.and-tut-crumb-list a {
    color: var(--and-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.and-tut-crumb-list a:hover { color: var(--and-purple); }

/* ─── Hero ─── */
.and-tut-hero {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2rem) 0 clamp(2.5rem, 5vw, 3.5rem);
    overflow: clip;
}

.and-tut-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--mk-bg, #070b17);
}

.and-tut-mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}

.and-tut-mesh--1 {
    width: min(55vw, 520px);
    height: min(55vw, 520px);
    top: -18%;
    right: -8%;
    background: radial-gradient(circle, rgba(61, 220, 132, 0.35), transparent 68%);
    animation: and-tut-drift 18s ease-in-out infinite;
}

.and-tut-mesh--2 {
    width: min(48vw, 440px);
    height: min(48vw, 440px);
    bottom: -12%;
    left: -6%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.28), transparent 70%);
    animation: and-tut-drift 22s ease-in-out infinite reverse;
}

.and-tut-mesh--3 {
    width: min(30vw, 280px);
    height: min(30vw, 280px);
    top: 35%;
    left: 38%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 70%);
    animation: and-tut-drift 14s ease-in-out infinite;
    animation-delay: -5s;
}

.and-tut-hero-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes and-tut-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 16px) scale(1.04); }
}

.and-tut-hero-shell {
    position: relative;
    z-index: 1;
}

.and-tut-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 440px);
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

.and-tut-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.and-tut-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--and-android-deep);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--and-android) 35%, transparent);
    background: color-mix(in srgb, var(--and-android) 10%, transparent);
    backdrop-filter: blur(8px);
}

html.mk-public[data-theme="light"] .and-tut-kicker {
    color: #047857;
    background: rgba(5, 150, 105, 0.08);
}

.and-tut-version-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--and-border);
    color: var(--and-muted);
    background: var(--and-glass);
}

.and-tut-hero-copy h1 {
    font-size: clamp(1.75rem, 4.2vw, 2.65rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--and-text);
    margin: 0 0 1rem;
}

.and-tut-title-accent {
    display: block;
    margin-top: 0.2em;
    background: linear-gradient(120deg, var(--and-android) 0%, #a78bfa 45%, var(--and-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.and-tut-lead {
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    line-height: 1.9;
    color: var(--and-muted);
    margin: 0 0 1.35rem;
    max-width: 46ch;
}

.and-tut-highlights {
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.and-tut-highlight {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.84rem;
    color: var(--and-text);
}

.and-tut-highlight-icon {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 0.72rem;
    color: var(--and-android);
    background: color-mix(in srgb, var(--and-android) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--and-android) 22%, transparent);
}

.and-tut-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.and-tut-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.2rem;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    overflow: hidden;
    transition: transform 0.2s var(--and-ease), box-shadow 0.25s, filter 0.2s;
}

.and-tut-btn:hover { transform: translateY(-2px); }
.and-tut-btn:active { transform: translateY(0) scale(0.98); }

.and-tut-btn--primary {
    background: linear-gradient(135deg, #8b5cf6, var(--and-purple));
    color: #fff;
    box-shadow: 0 10px 28px -12px rgba(124, 58, 237, 0.55);
}

.and-tut-btn--primary:hover {
    color: #fff;
    box-shadow: 0 14px 32px -10px rgba(124, 58, 237, 0.65);
}

.and-tut-btn--android {
    background: linear-gradient(135deg, #4ade80, var(--and-android-deep));
    color: #052e16;
    font-weight: 700;
    box-shadow: 0 10px 28px -12px rgba(61, 220, 132, 0.45);
}

.and-tut-btn--android:hover { color: #052e16; }

.and-tut-btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
    transform: translateX(-120%);
    animation: and-tut-shine 4s ease-in-out infinite;
}

@keyframes and-tut-shine {
    0%, 70%, 100% { transform: translateX(-120%); }
    85% { transform: translateX(120%); }
}

.and-tut-btn--ghost {
    background: var(--and-glass);
    border-color: var(--and-border);
    color: var(--and-text);
    backdrop-filter: blur(10px);
}

.and-tut-btn--ghost:hover {
    border-color: color-mix(in srgb, var(--and-purple) 35%, transparent);
    color: var(--and-text);
}

/* ─── Device stage ─── */
.and-tut-device-stage {
    position: relative;
    min-height: 400px;
    display: grid;
    place-items: center;
    perspective: 1200px;
}

.and-tut-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--and-purple) 25%, transparent);
    pointer-events: none;
}

.and-tut-orbit--outer {
    width: 92%;
    height: 92%;
    animation: and-tut-spin 48s linear infinite;
}

.and-tut-orbit--inner {
    width: 72%;
    height: 72%;
    border-color: color-mix(in srgb, var(--and-android) 22%, transparent);
    animation: and-tut-spin 32s linear infinite reverse;
}

@keyframes and-tut-spin {
    to { transform: rotate(360deg); }
}

.and-tut-device {
    position: relative;
    z-index: 2;
    transform: rotateY(-8deg) rotateX(4deg);
    transition: transform 0.6s var(--and-ease);
}

.and-tut-device-stage:hover .and-tut-device {
    transform: rotateY(-4deg) rotateX(2deg) translateY(-4px);
}

.and-tut-device-frame {
    width: min(240px, 44vw);
    aspect-ratio: 9 / 19.2;
    padding: 11px;
    border-radius: 36px;
    background: linear-gradient(160deg, #334155 0%, #0f172a 45%, #020617 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 40px 80px -24px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(124, 58, 237, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.and-tut-device-status {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 3;
}

.and-tut-device-status span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.5);
}

.and-tut-device-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: #0b1220;
}

.and-tut-device-shot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.and-tut-device-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%, transparent 100%);
    pointer-events: none;
}

.and-tut-orbit-card {
    position: absolute;
    margin: 0;
    width: 118px;
    z-index: 4;
    animation: and-tut-float 7s ease-in-out infinite;
}

.and-tut-orbit-card--2 { top: 4%; left: -2%; animation-delay: -1s; }
.and-tut-orbit-card--3 { top: 38%; right: -6%; animation-delay: -2.8s; }
.and-tut-orbit-card--4 { bottom: 4%; left: 6%; animation-delay: -4.5s; }

@keyframes and-tut-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.and-tut-orbit-card figcaption {
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--and-muted);
    text-align: center;
    margin-top: 0.4rem;
}

.and-tut-orbit-card--violet .and-tut-shot-btn { box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.35); }
.and-tut-orbit-card--sky .and-tut-shot-btn { box-shadow: 0 8px 24px -8px rgba(56, 189, 248, 0.35); }
.and-tut-orbit-card--rose .and-tut-shot-btn { box-shadow: 0 8px 24px -8px rgba(251, 113, 133, 0.35); }
.and-tut-orbit-card--emerald .and-tut-shot-btn { box-shadow: 0 8px 24px -8px rgba(61, 220, 132, 0.35); }

/* ─── Stats ribbon ─── */
.and-tut-stats--hero {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    list-style: none;
    margin: clamp(2rem, 4vw, 2.75rem) 0 0;
    padding: 0.85rem;
    border-radius: var(--and-radius-lg);
    border: 1px solid var(--and-border);
    background: color-mix(in srgb, var(--and-glass) 90%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.5);
}

.and-tut-stat {
    text-align: center;
    padding: 0.65rem 0.5rem;
    border-inline-end: 1px solid var(--and-border);
}

.and-tut-stat:last-child { border-inline-end: none; }

.and-tut-stat strong {
    display: block;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--and-text);
    margin-bottom: 0.15rem;
}

.and-tut-stat span {
    font-size: 0.72rem;
    color: var(--and-muted);
}

/* ─── Cinema video ─── */
.and-tut-cinema {
    padding: clamp(2rem, 4vw, 3rem) 0;
    border-block: 1px solid var(--and-border);
}

.and-tut-cinema-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
    gap: clamp(1.5rem, 3vw, 2.25rem);
    align-items: center;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: var(--and-radius-xl);
    border: 1px solid var(--and-border);
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, color-mix(in srgb, var(--and-purple) 10%, transparent), transparent 55%),
        var(--and-glass);
    backdrop-filter: blur(12px);
}

.and-tut-cinema-copy h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 800;
    margin: 0.35rem 0 0.6rem;
    color: var(--and-text);
    letter-spacing: -0.02em;
}

.and-tut-cinema-copy p {
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--and-muted);
    margin: 0 0 1rem;
}

.and-tut-cinema-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 0.5rem 2rem;
    min-width: 0;
    overflow: visible;
}

/* ─── Phone video player (عمودی — اسکرین‌رکورد موبایل) ─── */
.and-phone-vid {
    position: relative;
    width: 100%;
    max-width: var(--and-phone-w, 220px);
    margin-inline: auto;
}

.and-phone-vid-shell {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}

.and-phone-vid-device {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 34px;
    background: linear-gradient(155deg, #3f4f63 0%, #1a2332 42%, #0a0f18 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 28px 56px -24px rgba(0, 0, 0, 0.65);
}

.and-phone-vid-speaker {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 28%;
    height: 12px;
    border-radius: 0 0 8px 8px;
    background: #0a0f18;
    z-index: 5;
    pointer-events: none;
}

.and-phone-vid-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 19.5;
    border-radius: 26px;
    overflow: hidden;
    background: #0a0f18;
    isolation: isolate;
}

/* ناحیه امن — محتوا زیر لبه و ناچ نرود */
.and-phone-vid-viewport {
    position: absolute;
    top: 22px;
    right: 7px;
    bottom: 14px;
    left: 7px;
    z-index: 1;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1220;
}

.and-phone-vid-screen--video .and-phone-vid-viewport {
    bottom: 18px;
}

.and-phone-vid-screen.mk-vid-frame {
    aspect-ratio: 9 / 19.5;
    border: none;
    border-radius: 26px;
    box-shadow: none;
}

.and-phone-vid-screen--video .and-phone-vid-viewport,
.and-phone-vid-screen--poster .and-phone-vid-viewport {
    display: block;
}

.and-phone-vid-screen.mk-vid-frame .mk-vid-el,
.and-phone-vid-screen--video .mk-vid-el,
.and-phone-vid-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #0b1220;
}

.and-phone-vid-screen--video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #0b1220;
}

.and-phone-vid-screen--poster {
    background: #0a0f18;
}

.and-phone-vid-poster,
.and-phone-vid-empty {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.and-phone-vid-poster {
    display: block;
}

.and-phone-vid-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #0b1220;
}

.and-phone-vid-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: var(--and-muted);
    font-size: 0.76rem;
    background:
        radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--and-purple) 14%, transparent), transparent 58%),
        #0b1220;
}

.and-phone-vid-play {
    font-size: 0.85rem;
}

.and-phone-vid-badge {
    top: auto;
    bottom: 0.65rem;
    left: 0.65rem;
    right: auto;
    font-size: 0.62rem;
}

.and-phone-vid-poster-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    z-index: 2;
    max-width: calc(100% - 0.75rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.and-phone-vid-empty-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1rem;
    opacity: 0.55;
    border: 1px dashed color-mix(in srgb, var(--and-purple) 35%, transparent);
}

.and-phone-vid-home {
    display: block;
    width: 32%;
    height: 4px;
    margin: 7px auto 2px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.35);
}

.and-phone-vid-shadow {
    position: absolute;
    bottom: -8%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 18%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.and-phone-vid--lg { --and-phone-w: 240px; }
.and-phone-vid--md { --and-phone-w: 168px; }

.and-phone-vid--lg .and-phone-vid-device {
    padding: 12px;
    border-radius: 38px;
}

.and-phone-vid--lg .and-phone-vid-screen {
    border-radius: 30px;
}

.and-phone-vid--lg .and-phone-vid-viewport {
    top: 24px;
    right: 8px;
    bottom: 16px;
    left: 8px;
    border-radius: 20px;
}

.and-phone-vid--lg .and-phone-vid-speaker {
    top: 12px;
    height: 13px;
}

.and-tut-chip--live {
    color: #22c55e;
    border-color: color-mix(in srgb, #22c55e 35%, transparent);
    background: color-mix(in srgb, #22c55e 10%, transparent);
}

.and-tut-chip--live .fa-circle {
    font-size: 0.45rem;
    vertical-align: middle;
}

/* ─── Section heads ─── */
.and-tut-section-kicker {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--and-purple);
    margin-bottom: 0.45rem;
}

.and-tut-section-head {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 2.25rem;
}

.and-tut-section-head--left {
    text-align: right;
    margin-inline: 0 0 2rem;
    max-width: none;
}

.and-tut-section-head h2 {
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem;
    color: var(--and-text);
}

.and-tut-section-head p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--and-muted);
    margin: 0;
}

.and-tut-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.and-tut-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--and-border);
    color: var(--and-muted);
    background: color-mix(in srgb, var(--mk-bg, #070b17) 40%, transparent);
}

.and-tut-chip--sm { font-size: 0.66rem; }
.and-tut-chip--accent {
    color: var(--and-android-deep);
    border-color: color-mix(in srgb, var(--and-android) 30%, transparent);
    background: color-mix(in srgb, var(--and-android) 10%, transparent);
}

/* ─── Video frame shared ─── */
.and-tut-vid-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0b1220;
}

.and-tut-vid-frame video,
.and-tut-vid-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.and-tut-vid-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: grid;
    place-items: center;
}

.and-tut-vid-placeholder-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(61, 220, 132, 0.18), transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(124, 58, 237, 0.15), transparent 50%),
        #0b1220;
}

.and-tut-vid-placeholder-body {
    position: relative;
    text-align: center;
    padding: 1.5rem;
}

.and-tut-vid-play-icon {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    margin-bottom: 0.85rem;
    color: #fff;
    background: linear-gradient(135deg, var(--and-purple), #a78bfa);
    box-shadow: 0 12px 28px -10px rgba(124, 58, 237, 0.55);
}

.and-tut-vid-placeholder-body strong {
    display: block;
    color: var(--and-text);
    margin-bottom: 0.35rem;
}

.and-tut-vid-placeholder-body span,
.and-tut-vid-placeholder-body em {
    display: block;
    font-size: 0.8rem;
    font-style: normal;
    color: var(--and-muted);
}

/* ─── Dock navigation ─── */
.and-tut-dock {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0.55rem 0;
    background: color-mix(in srgb, var(--mk-bg, #070b17) 88%, transparent);
    backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid var(--and-border);
}

html.mk-public[data-theme="light"] .and-tut-dock {
    background: color-mix(in srgb, #f1f5f9 92%, transparent);
}

.and-tut-dock-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.and-tut-dock-label {
    flex-shrink: 0;
    display: none;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--and-muted);
    white-space: nowrap;
}

.and-tut-dock-track {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.and-tut-dock-track::-webkit-scrollbar { display: none; }

.and-tut-dock-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    text-decoration: none;
    color: var(--and-muted);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--and-ease);
}

.and-tut-dock-item:hover {
    color: var(--and-text);
    background: color-mix(in srgb, var(--and-purple) 8%, transparent);
    transform: translateY(-1px);
}

.and-tut-dock-item.is-active {
    color: var(--and-text);
    border-color: color-mix(in srgb, var(--and-purple) 35%, transparent);
    background: color-mix(in srgb, var(--and-purple) 12%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.and-tut-dock-num {
    font-size: 0.65rem;
    font-weight: 800;
    opacity: 0.55;
}

.and-tut-dock-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    border-radius: 8px;
    background: color-mix(in srgb, currentColor 12%, transparent);
}

.and-tut-dock-text {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.and-tut-dock-item--emerald.is-active { border-color: color-mix(in srgb, var(--and-android) 40%, transparent); background: color-mix(in srgb, var(--and-android) 10%, transparent); }
.and-tut-dock-item--sky.is-active { border-color: color-mix(in srgb, #38bdf8 40%, transparent); background: color-mix(in srgb, #38bdf8 10%, transparent); }
.and-tut-dock-item--amber.is-active { border-color: color-mix(in srgb, #fbbf24 40%, transparent); background: color-mix(in srgb, #fbbf24 10%, transparent); }
.and-tut-dock-item--rose.is-active { border-color: color-mix(in srgb, #fb7185 40%, transparent); background: color-mix(in srgb, #fb7185 10%, transparent); }
.and-tut-dock-item--cyan.is-active { border-color: color-mix(in srgb, #22d3ee 40%, transparent); background: color-mix(in srgb, #22d3ee 10%, transparent); }

/* ─── Sections ─── */
.and-tut-section {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.and-tut-section--alt {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--and-purple) 4%, transparent), transparent 40%),
        color-mix(in srgb, var(--mk-bg, #070b17) 50%, transparent);
    border-block: 1px solid var(--and-border);
}

html.mk-public[data-theme="light"] .and-tut-section--alt {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.04), transparent 50%), #f8fafc;
}

/* ─── Video library ─── */
.and-tut-video-library {
    position: relative;
}

.and-tut-video-scroll {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.25rem;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.and-tut-video-scroll::-webkit-scrollbar {
    height: 6px;
}

.and-tut-video-scroll::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--and-purple) 35%, transparent);
    border-radius: 999px;
}

.and-tut-video-tile {
    flex: 0 0 min(260px, 84vw);
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 1.15rem 1rem 1.25rem;
    border-radius: var(--and-radius-lg);
    border: 1px solid var(--and-border);
    background: var(--and-glass);
    transition: transform 0.25s var(--and-ease), border-color 0.25s, box-shadow 0.25s;
}

.and-tut-video-tile:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--and-purple) 28%, transparent);
    box-shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.48);
}

.and-tut-video-tile--featured {
    flex: 0 0 min(280px, 88vw);
    background:
        radial-gradient(ellipse 90% 70% at 50% 0%, color-mix(in srgb, var(--and-purple) 12%, transparent), transparent 55%),
        var(--and-glass);
    border-color: color-mix(in srgb, var(--and-purple) 22%, transparent);
}

.and-tut-video-tile .and-phone-vid {
    --and-phone-w: 200px;
}

.and-tut-video-tile--featured .and-phone-vid {
    --and-phone-w: 220px;
}

.and-tut-video-tile--ready {
    border-color: color-mix(in srgb, #22c55e 25%, transparent);
}

.and-tut-video-tile--poster {
    border-color: color-mix(in srgb, var(--and-android) 22%, transparent);
}

.and-tut-video-tile-body {
    width: 100%;
    text-align: center;
}

.and-tut-video-tile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 0.45rem;
}

.and-tut-video-tile-body h3 {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--and-text);
    line-height: 1.45;
}

.and-tut-video-tile--featured .and-tut-video-tile-body h3 {
    font-size: 1.05rem;
}

.and-tut-video-tile-body p {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--and-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .and-tut-video-scroll {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }

    .and-tut-video-tile,
    .and-tut-video-tile--featured {
        flex: 0 1 calc((100% - 2.5rem) / 3);
        max-width: calc((100% - 2.5rem) / 3);
        min-width: 0;
        scroll-snap-align: unset;
        padding: 1.35rem 1.15rem 1.4rem;
    }

    .and-tut-video-tile .and-phone-vid,
    .and-tut-video-tile--featured .and-phone-vid {
        --and-phone-w: min(100%, 220px);
    }

    .and-tut-video-tile-body h3 {
        font-size: 1.02rem;
    }

    .and-tut-video-tile--featured .and-tut-video-tile-body h3 {
        font-size: 1.08rem;
    }

    .and-tut-video-tile-body p {
        font-size: 0.84rem;
        -webkit-line-clamp: 3;
    }
}

@media (min-width: 1200px) {
    .and-tut-video-library {
        max-width: 1080px;
        margin-inline: auto;
    }

    .and-tut-video-tile,
    .and-tut-video-tile--featured {
        flex: 0 1 calc((100% - 2.5rem) / 3);
        max-width: 340px;
    }

    .and-tut-video-tile .and-phone-vid,
    .and-tut-video-tile--featured .and-phone-vid {
        --and-phone-w: 220px;
    }
}

/* ─── Curriculum rail ─── */
.and-tut-curriculum-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: stretch;
}

.and-tut-rail {
    align-self: stretch;
    min-height: 0;
}

.and-tut-rail-sticky {
    position: sticky;
    top: var(--and-rail-top);
    z-index: 8;
    max-height: calc(100vh - var(--and-rail-top) - 1.25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.and-tut-rail-sticky::-webkit-scrollbar {
    width: 5px;
}

.and-tut-rail-sticky::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--and-purple) 35%, transparent);
    border-radius: 999px;
}

.and-tut-rail-card {
    padding: 1.15rem;
    border-radius: var(--and-radius-lg);
    border: 1px solid var(--and-border);
    background: var(--and-glass);
    backdrop-filter: blur(12px);
}

.and-tut-rail-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--and-muted);
    margin: 0 0 0.85rem;
}

.and-tut-rail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.and-tut-rail-link {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.5rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.and-tut-rail-link:hover,
.and-tut-rail-link.is-active {
    background: color-mix(in srgb, var(--and-purple) 10%, transparent);
}

.and-tut-rail-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 0.45rem;
    border-radius: 50%;
    background: var(--and-purple);
}

.and-tut-rail-dot--emerald { background: var(--and-android); }
.and-tut-rail-dot--sky { background: #38bdf8; }
.and-tut-rail-dot--amber { background: #fbbf24; }
.and-tut-rail-dot--rose { background: #fb7185; }
.and-tut-rail-dot--cyan { background: #22d3ee; }
.and-tut-rail-dot--violet { background: var(--and-purple); }

.and-tut-rail-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.and-tut-rail-text em {
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 700;
    color: var(--and-muted);
}

.and-tut-rail-text strong {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--and-text);
    line-height: 1.4;
}

.and-tut-rail-progress {
    margin-top: 1rem;
    height: 4px;
    border-radius: 4px;
    background: var(--and-border);
    overflow: hidden;
}

.and-tut-rail-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--and-android), var(--and-purple));
    transition: width 0.15s linear;
}

/* ─── Chapters ─── */
.and-tut-chapter {
    position: relative;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: var(--and-radius-xl);
    border: 1px solid var(--and-border);
    background: var(--and-glass);
    scroll-margin-top: 5.5rem;
    overflow: hidden;
}

.and-tut-chapter-glow {
    position: absolute;
    top: -40%;
    right: -20%;
    width: 55%;
    height: 80%;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
}

.and-tut-chapter--emerald .and-tut-chapter-glow { background: rgba(61, 220, 132, 0.25); }
.and-tut-chapter--violet .and-tut-chapter-glow { background: rgba(124, 58, 237, 0.22); }
.and-tut-chapter--sky .and-tut-chapter-glow { background: rgba(56, 189, 248, 0.22); }
.and-tut-chapter--amber .and-tut-chapter-glow { background: rgba(251, 191, 36, 0.2); }
.and-tut-chapter--rose .and-tut-chapter-glow { background: rgba(251, 113, 133, 0.2); }
.and-tut-chapter--cyan .and-tut-chapter-glow { background: rgba(34, 211, 238, 0.2); }

.and-tut-chapter-head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 180px);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.and-tut-chapter-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: var(--and-purple);
    background: color-mix(in srgb, var(--and-purple) 12%, transparent);
}

.and-tut-chapter--emerald .and-tut-chapter-badge { color: var(--and-android-deep); background: color-mix(in srgb, var(--and-android) 12%, transparent); }
.and-tut-chapter--sky .and-tut-chapter-badge { color: #0284c7; background: color-mix(in srgb, #38bdf8 12%, transparent); }
.and-tut-chapter--amber .and-tut-chapter-badge { color: #b45309; background: color-mix(in srgb, #fbbf24 12%, transparent); }
.and-tut-chapter--rose .and-tut-chapter-badge { color: #e11d48; background: color-mix(in srgb, #fb7185 12%, transparent); }
.and-tut-chapter--cyan .and-tut-chapter-badge { color: #0891b2; background: color-mix(in srgb, #22d3ee 12%, transparent); }

.and-tut-chapter-head-main h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.45rem;
    color: var(--and-text);
}

.and-tut-chapter-head-main p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--and-muted);
    margin: 0 0 0.65rem;
}

.and-tut-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--and-purple);
    text-decoration: none;
}

.and-tut-link:hover { text-decoration: underline; }

.and-tut-chapter-cover {
    position: relative;
    aspect-ratio: 9 / 16;
    max-height: 260px;
    padding: 0;
    border: none;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid var(--and-border);
    box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.5);
}

.and-tut-chapter-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--and-ease);
}

.and-tut-chapter-cover:hover img { transform: scale(1.04); }

.and-tut-chapter-cover-cap {
    position: absolute;
    inset: auto 0 0;
    padding: 0.55rem 0.65rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* ─── Timeline lessons ─── */
.and-tut-timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.and-tut-timeline::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    right: 0.55rem;
    width: 2px;
    background: linear-gradient(180deg, var(--and-purple), var(--and-android));
    opacity: 0.35;
    border-radius: 2px;
}

.and-tut-timeline-step {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.65rem 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--and-ease), transform 0.5s var(--and-ease);
}

.and-tut-timeline-step.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.and-tut-timeline-node {
    position: relative;
    z-index: 1;
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--and-purple), #a78bfa);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mk-bg, #070b17) 90%, transparent);
}

.and-tut-chapter--emerald .and-tut-timeline-node { background: linear-gradient(135deg, var(--and-android), var(--and-android-deep)); }
.and-tut-chapter--sky .and-tut-timeline-node { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.and-tut-chapter--amber .and-tut-timeline-node { background: linear-gradient(135deg, #fbbf24, #d97706); }
.and-tut-chapter--rose .and-tut-timeline-node { background: linear-gradient(135deg, #fb7185, #e11d48); }
.and-tut-chapter--cyan .and-tut-timeline-node { background: linear-gradient(135deg, #22d3ee, #0891b2); }

.and-tut-timeline-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: var(--and-radius);
    border: 1px solid var(--and-border);
    background: color-mix(in srgb, var(--mk-bg, #070b17) 35%, transparent);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.and-tut-timeline-card:hover {
    border-color: color-mix(in srgb, var(--and-purple) 25%, transparent);
    box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.4);
}

.and-tut-timeline-thumb {
    aspect-ratio: 9 / 16;
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.and-tut-timeline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.and-tut-timeline-body strong {
    display: block;
    font-size: 0.9rem;
    color: var(--and-text);
    margin-bottom: 0.3rem;
}

.and-tut-timeline-body p {
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--and-muted);
    margin: 0;
}

.and-tut-timeline-cap {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.68rem;
    color: var(--and-muted);
    opacity: 0.85;
}

/* ─── Image interactions ─── */
.and-tut-shot-btn,
.and-tut-masonry-shot,
.and-tut-chapter-cover,
.and-tut-timeline-thumb {
    position: relative;
    display: block;
    width: 100%;
    font-family: inherit;
}

.and-tut-shot-btn {
    padding: 0;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.and-tut-shot-btn img,
.and-tut-masonry-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s var(--and-ease);
}

.and-tut-shot-zoom {
    position: absolute;
    inset: auto auto 0.45rem 0.45rem;
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 0.62rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.and-tut-shot-btn:hover .and-tut-shot-zoom,
.and-tut-chapter-cover:hover .and-tut-shot-zoom { opacity: 1; }

img[data-and-tut-fallback].is-missing {
    min-height: 100px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--and-purple) 12%, transparent), color-mix(in srgb, var(--and-android) 8%, transparent)),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(148, 163, 184, 0.03) 10px, rgba(148, 163, 184, 0.03) 20px);
}

/* ─── Masonry gallery ─── */
.and-tut-gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.and-tut-gallery-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.48rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--and-border);
    background: transparent;
    color: var(--and-muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--and-ease);
}

.and-tut-gallery-pill.is-active {
    color: var(--and-text);
    border-color: color-mix(in srgb, var(--and-purple) 35%, transparent);
    background: color-mix(in srgb, var(--and-purple) 12%, transparent);
    box-shadow: 0 8px 20px -14px rgba(124, 58, 237, 0.45);
}

.and-tut-masonry {
    columns: 4;
    column-gap: 0.85rem;
}

.and-tut-masonry-item {
    break-inside: avoid;
    margin-bottom: 0.85rem;
    border-radius: var(--and-radius);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s var(--and-ease), transform 0.45s var(--and-ease);
}

.and-tut-masonry-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.and-tut-masonry-item.is-hidden { display: none; }

.and-tut-masonry-shot {
    position: relative;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: var(--and-radius);
    overflow: hidden;
    cursor: pointer;
    background: none;
    border: 1px solid var(--and-border);
}

.and-tut-masonry-shot img {
    width: 100%;
    display: block;
    transition: transform 0.4s var(--and-ease);
}

.and-tut-masonry-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1rem 0.75rem;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.75));
    opacity: 0;
    transition: opacity 0.25s;
}

.and-tut-masonry-shot:hover img { transform: scale(1.05); }
.and-tut-masonry-shot:hover .and-tut-masonry-overlay { opacity: 1; }

/* ─── Insights ─── */
.and-tut-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.and-tut-insight {
    padding: 1.35rem 1.25rem;
    border-radius: var(--and-radius-lg);
    border: 1px solid var(--and-border);
    background: var(--and-glass);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s var(--and-ease), transform 0.45s var(--and-ease), border-color 0.2s;
}

.and-tut-insight.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.and-tut-insight:hover {
    border-color: color-mix(in srgb, #fbbf24 30%, transparent);
}

.and-tut-insight-icon {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    color: #fbbf24;
    background: color-mix(in srgb, #fbbf24 12%, transparent);
}

.and-tut-insight h3 {
    font-size: 0.95rem;
    margin: 0 0 0.45rem;
    color: var(--and-text);
}

.and-tut-insight p {
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--and-muted);
    margin: 0;
}

/* ─── Download wrap ─── */
.and-tut-download-wrap {
    border-block: 1px solid var(--and-border);
    background: color-mix(in srgb, var(--and-purple) 4%, transparent);
}

/* ─── FAQ ─── */
.and-tut-faq {
    max-width: 44rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.and-tut-faq-item {
    border-radius: var(--and-radius);
    border: 1px solid var(--and-border);
    background: var(--and-glass);
    overflow: hidden;
    transition: border-color 0.2s;
}

.and-tut-faq-item[open] {
    border-color: color-mix(in srgb, var(--and-purple) 30%, transparent);
}

.and-tut-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--and-text);
    cursor: pointer;
    list-style: none;
}

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

.and-tut-faq-icon {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 0.7rem;
    color: var(--and-purple);
    background: color-mix(in srgb, var(--and-purple) 12%, transparent);
    transition: transform 0.25s var(--and-ease);
}

.and-tut-faq-item[open] .and-tut-faq-icon {
    transform: rotate(45deg);
}

.and-tut-faq-a {
    padding: 0 1.15rem 1rem;
}

.and-tut-faq-a p {
    font-size: 0.86rem;
    line-height: 1.85;
    color: var(--and-muted);
    margin: 0;
}

/* ─── Related + CTA ─── */
.and-tut-related {
    padding: 2.5rem 0;
}

.and-tut-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.and-tut-related-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.2rem;
    border-radius: var(--and-radius-lg);
    border: 1px solid var(--and-border);
    background: var(--and-glass);
    text-decoration: none;
    color: var(--and-text);
    transition: transform 0.25s var(--and-ease), border-color 0.25s, box-shadow 0.25s;
}

.and-tut-related-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--and-purple) 30%, transparent);
    box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.45);
    color: var(--and-text);
}

.and-tut-related-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 1rem;
}

.and-tut-related-icon--violet { color: #a78bfa; background: color-mix(in srgb, #a78bfa 14%, transparent); }
.and-tut-related-icon--emerald { color: var(--and-android); background: color-mix(in srgb, var(--and-android) 14%, transparent); }

.and-tut-related-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.and-tut-related-copy strong { font-size: 0.9rem; }
.and-tut-related-copy span { font-size: 0.76rem; color: var(--and-muted); }
.and-tut-related-arrow { color: var(--and-muted); font-size: 0.8rem; }

.and-tut-cta {
    position: relative;
    padding: clamp(3rem, 6vw, 4.5rem) 0;
    text-align: center;
    overflow: hidden;
}

.and-tut-cta-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 50% 100%, color-mix(in srgb, var(--and-purple) 18%, transparent), transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 20%, color-mix(in srgb, var(--and-android) 10%, transparent), transparent 55%);
    pointer-events: none;
}

.and-tut-cta-inner {
    position: relative;
    z-index: 1;
}

.and-tut-cta-inner h2 {
    font-size: clamp(1.3rem, 2.8vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: var(--and-text);
}

.and-tut-cta-inner p {
    font-size: 0.9rem;
    color: var(--and-muted);
    margin: 0 0 1.5rem;
}

.and-tut-cta-inner .and-tut-hero-actions {
    justify-content: center;
}

/* ─── Lightbox ─── */
.and-tut-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.and-tut-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.and-tut-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
}

.and-tut-lightbox-panel {
    position: relative;
    max-width: min(92vw, 400px);
    z-index: 1;
    animation: and-tut-lb-in 0.35s var(--and-ease);
}

@keyframes and-tut-lb-in {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.and-tut-lightbox-panel img {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--and-radius-lg);
    box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.65);
}

.and-tut-lightbox-title {
    color: #fff;
    text-align: center;
    font-size: 0.88rem;
    margin: 0.75rem 0 0;
}

.and-tut-lightbox-close {
    position: absolute;
    top: -2.75rem;
    left: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

/* ─── Responsive ─── */
@media (min-width: 1100px) {
    .and-tut-dock-label { display: inline-flex; }
}

@media (max-width: 1024px) {
    .and-tut-hero-grid { grid-template-columns: 1fr; }
    .and-tut-device-stage { min-height: 340px; order: -1; }
    .and-tut-stats--hero { grid-template-columns: repeat(2, 1fr); }
    .and-tut-stat:nth-child(2) { border-inline-end: none; }
    .and-tut-stat { border-inline-end: none; border-bottom: 1px solid var(--and-border); padding-bottom: 0.75rem; }
    .and-tut-stat:nth-last-child(-n+2) { border-bottom: none; }
    .and-tut-cinema-panel { grid-template-columns: 1fr; }
    .and-tut-cinema-screen { order: -1; }
    .and-tut-curriculum-layout { grid-template-columns: 1fr; }
    .and-tut-rail { display: none; }
    .and-tut-masonry { columns: 3; }
    .and-tut-insights { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .and-tut-stats--hero { grid-template-columns: 1fr 1fr; }
    .and-tut-chapter-head { grid-template-columns: 1fr; }
    .and-tut-chapter-cover { max-width: 140px; }
    .and-tut-timeline-card { grid-template-columns: 1fr; }
    .and-tut-timeline-thumb { max-width: 90px; }
    .and-tut-masonry { columns: 2; }
    .and-tut-related-grid { grid-template-columns: 1fr; }
    .and-tut-orbit-card { width: 88px; }
    .and-tut-device { transform: none; }
    .and-tut-video-tile,
    .and-tut-video-tile--featured {
        flex: 0 0 min(84vw, 260px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .and-tut-mesh,
    .and-tut-orbit,
    .and-tut-orbit-card,
    .and-tut-btn-glow { animation: none; }
    .and-tut-timeline-step,
    .and-tut-masonry-item,
    .and-tut-insight { opacity: 1; transform: none; }
}
