@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=satoshi@300,400,500,700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --accent: #f97316;
    --accent-2: #06b6d4;
    --accent-3: #a855f7;
    --grad: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #a855f7 100%);
    --grad-text-bg: linear-gradient(90deg, #f97316, #ec4899, #a855f7, #06b6d4, #f97316);

    --font-display: 'Clash Display', sans-serif;
    --font-body: 'Satoshi', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: all 0.3s var(--ease-out);

    --radius: 10px;
    --sidebar-w: 260px;
    --rs-w: 240px;
    --nav-h: 60px;
    --green: #22c55e;
    --yellow: #ffb703;
}

[data-theme="light"] {
    --bg: #fafaf9;
    --bg2: #ffffff;
    --bg3: #f4f4f0;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.80);
    --border: rgba(0, 0, 0, 0.07);
    --border-h: rgba(249, 115, 22, 0.45);
    --text: #1a1a14;
    --text2: #52524a;
    --text3: #a3a39a;
    --nav-bg: rgba(250, 250, 249, 0.88);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(249, 115, 22, 0.18);
    --code-bg: #1e1e2e;
}

[data-theme="dark"] {
    --bg: #09090b;
    --bg2: #111116;
    --bg3: #18181f;
    --bg-card: rgba(255, 255, 255, 0.032);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.07);
    --border-h: rgba(249, 115, 22, 0.55);
    --text: #f0f0e8;
    --text2: #a8a89c;
    --text3: #555548;
    --nav-bg: rgba(9, 9, 11, 0.88);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.65);
    --shadow-glow: 0 0 50px rgba(249, 115, 22, 0.12);
    --code-bg: #0d0d16;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

button {
    cursor: pointer;
    font-family: var(--font-body);
}

.montserrat-font {
    font-family: "Montserrat", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "DM Sans", sans-serif !important;
}

p,
span {
    font-family: "Montserrat", sans-serif;
}

/* ── Gradient Text ─────────────────────────────────────────── */
.grad-text {
    background: var(--grad-text-bg);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradShift 6s ease infinite;
}

@keyframes gradShift {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

/* ── Typography ────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.display-xl {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
}

.display-lg {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
}

.display-md {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 600;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(249, 115, 22, 0.08);
    margin-bottom: 18px;
}

.section-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .5;
        transform: scale(0.8)
    }
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;

}

.section {
    padding: 100px 0;
}

.section-sm {
    padding: 60px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px
}

.sec {
    padding: 90px 0
}

.sec-alt {
    background: var(--bg2)
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.35);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(249, 115, 22, 0.45);
}

.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    border-color: transparent;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--bg-glass);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    border-color: var(--border-h);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
}

/* ── Navbar ────────────────────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}

#navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    transition: padding 0.3s ease;
}

#navbar.scrolled .nav-inner {
    /* padding: 14px 0; */
}


.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.nav-logo-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    color: var(--text2);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: rgba(249, 115, 22, 0.08);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-glass);
    color: var(--text);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: rotate(20deg) scale(1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-glass);
    align-items: center;
    justify-content: center;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0 20px;
    border-top: 1px solid var(--border);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text2);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu a:hover {
    color: var(--accent);
    background: rgba(249, 115, 22, 0.06);
}

.whatsapp-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* ══ TUTORIAL LAYOUT ══════════════════════════════════════════ */
.tp-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 0;
    margin: 0 auto;
    padding-top: 70px;
    min-height: 100vh
}

/* ── Left Sidebar ──────────────────────────────────────────── */
.tp-sidebar {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--border);
    background: var(--bg);
    padding: 24px 18px 32px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent
}

.tp-sidebar::-webkit-scrollbar {
    width: 6px
}

.tp-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px
}

.tp-sb-header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px
}

.tp-sb-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 14px;
    transition: var(--transition)
}

.tp-sb-back:hover {
    color: var(--accent)
}

.tp-sb-tut-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(249, 115, 22, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px
}

.tp-sb-tut-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text)
}

.tp-sb-tut-meta {
    font-size: 12px;
    color: var(--text3);
    margin-top: 4px
}

.tp-sb-progress {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px
}

.tp-sb-prog-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 8px;
    font-weight: 500
}

.tp-sb-prog-label span:last-child {
    color: var(--accent);
    font-weight: 700;
    font-size: 13px
}

.tp-sb-prog-track {
    height: 6px;
    border-radius: 999px;
    background: var(--bg3);
    overflow: hidden
}

.tp-sb-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ec4899);
    width: 0%;
    transition: width .8s var(--ease-out);
    border-radius: 999px
}

.tp-sb-prog-done {
    font-size: 11px;
    color: var(--text3);
    margin-top: 6px
}

.tp-chapters {
    display: flex;
    flex-direction: column;
    gap: 22px
}

.tp-ch-group-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text3);
    padding: 0 10px;
    margin-bottom: 6px
}

.tp-ch-item {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text2);
    transition: var(--transition);
    position: relative;
    line-height: 1.35;
    text-decoration: none
}

.tp-ch-item:hover {
    background: var(--bg-card);
    color: var(--text)
}

.tp-ch-item.active {
    background: linear-gradient(135deg, rgba(249, 115, 22, .12), rgba(236, 72, 153, .08));
    color: var(--text);
    font-weight: 600;
    width: 100%;
    text-align: left;
}

.tp-ch-item.active::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0
}

.tp-ch-num {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg3);
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700
}

.tp-ch-num.done {
    background: #22c55e;
    color: white
}

.tp-ch-item.active .tp-ch-num {
    background: var(--accent);
    color: white
}

.tp-ch-name {
    flex: 1
}

.tp-ch-done-icon {
    color: #22c55e;
    flex: none
}

/* ── Mobile Sidebar Toggle ─────────────────────────────────── */
.tp-mob-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px
}

.tp-mob-chevron {
    margin-left: auto;
    transition: transform .3s
}

/* ── Main Content ──────────────────────────────────────────── */
.tp-main {
    min-width: 0;
    padding: 0 36px 60px
}

.tp-topbar {
    position: sticky;
    top: 70px;
    z-index: 50;
    background: var(--bg);
    padding: 14px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.tp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text3)
}

.tp-breadcrumb a {
    color: var(--text3);
    transition: var(--transition)
}

.tp-breadcrumb a:hover {
    color: var(--accent)
}

.tp-breadcrumb span {
    color: var(--text);
    font-weight: 500
}

.tp-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px
}

.tp-chapter-count {
    font-size: 12px;
    color: var(--text3);
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border)
}

.tp-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    border-radius: 8px;
    transition: var(--transition)
}

.tp-nav-btn:hover {
    border-color: var(--border-h);
    transform: translateY(-1px)
}

.tp-nav-btn-primary {
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: white;
    border-color: transparent
}

.tp-nav-btn-primary:hover {
    filter: brightness(1.08);
    border-color: transparent;
    color: white
}

/* Chapter hero */
.tp-ch-hero {
    margin-bottom: 28px
}

.tp-ch-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px
}

.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600
}

.tp-badge-orange {
    background: rgba(249, 115, 22, .12);
    color: #f97316
}

.tp-badge-green {
    background: rgba(34, 197, 94, .12);
    color: #22c55e
}

.tp-badge-blue {
    background: rgba(59, 130, 246, .12);
    color: #3b82f6
}

.tp-badge-yellow {
    background: rgba(251, 191, 36, .12);
    color: #d97706
}

.tp-badge-python {
    background: rgba(249, 115, 22, .12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, .2)
}

.tp-ch-title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.15
}

.tp-ch-subtitle {
    font-size: 16px;
    color: var(--text2);
    line-height: 1.65;
    max-width: 800px
}

/* Learn box */
.tp-learn-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 32px
}

.tp-learn-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 14px;
    color: var(--text)
}

.tp-learn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px 24px
}

.tp-learn-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--text2);
    line-height: 1.5
}

.tp-icon-green {
    color: #22c55e;
    flex: none;
    margin-top: 2px
}

.tp-icon-accent {
    color: var(--accent)
}

/* Body sections */
.tp-section {
    margin-bottom: 36px;
    scroll-margin-top: 140px
}

.tp-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border)
}

.tp-body-text {
    font-size: 15px;
    color: var(--text2);
    line-height: 1.75;
    margin-bottom: 14px
}

.tp-body-text strong {
    color: var(--text);
    font-weight: 600
}

.tp-inline-code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--bg3);
    color: var(--accent);
    border: 1px solid var(--border)
}

/* Explain list */
.tp-explain-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0
}

.tp-explain-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: start
}

.tp-explain-code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    word-break: break-all
}

.tp-explain-desc {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.55
}

@media(max-width:640px) {
    .tp-explain-item {
        grid-template-columns: 1fr;
        gap: 6px
    }
}

/* Code block */
.tp-code-wrap {
    background: var(--code-bg);
    border-radius: var(--radius-md);
    margin: 16px 0 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .05)
}

.tp-code-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, .25);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    gap: 12px
}

.tp-code-dots {
    display: flex;
    gap: 6px;
    flex: none
}

.tp-code-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%
}

.tp-code-dots span:nth-child(1) {
    background: #ff5f57
}

.tp-code-dots span:nth-child(2) {
    background: #febc2e
}

.tp-code-dots span:nth-child(3) {
    background: #28c840
}

.tp-code-lang {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .5px;
    text-transform: uppercase;
    flex: 1
}

.tp-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .65);
    font-size: 11.5px;
    font-weight: 500;
    transition: var(--transition)
}

.tp-copy-btn:hover {
    background: rgba(255, 255, 255, .12);
    color: white
}

.tp-copy-btn.copied {
    background: rgba(34, 197, 94, .2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, .3)
}

.tp-code {
    padding: 18px 22px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.7;
    color: #cdd6f4;
    overflow-x: auto;
    scrollbar-width: thin;
    background-color: #0D1117;
    margin: 0
}

.tp-code::-webkit-scrollbar {
    height: 6px
}

.tp-code::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 3px
}

.tp-code code {
    font-family: inherit
}

/* Info boxes */
.tp-info-box {
    border-left: 3px solid var(--accent);
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 14px 0;
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6
}

.tp-info-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 12px;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: .5px
}

.tp-info-note {
    border-color: #3b82f6
}

.tp-info-label-note {
    color: #3b82f6
}

.tp-info-warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, .05)
}

.tp-info-label-warning {
    color: #f59e0b
}

.tp-info-tip {
    border-color: #22c55e;
    background: rgba(34, 197, 94, .05)
}

.tp-info-label-tip {
    color: #22c55e
}

/* Summary box */
.tp-summary-box {
    background: linear-gradient(135deg, rgba(249, 115, 22, .06), rgba(168, 85, 247, .04));
    border: 1px solid rgba(249, 115, 22, .15);
    border-radius: var(--radius-md);
    padding: 22px;
    margin: 28px 0
}

.tp-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px
}

.tp-summary-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14.5px;
    color: var(--text2);
    line-height: 1.6
}

.tp-summary-list li {
    padding-left: 22px;
    position: relative
}

.tp-summary-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 700
}

.tp-summary-list strong {
    color: var(--text)
}

/* Quiz */
.tp-quiz-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    margin: 28px 0
}

.tp-quiz-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text);
    margin-bottom: 14px
}

.tp-quiz-q {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 14px;
    font-weight: 500
}

.tp-quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.tp-quiz-opt {
    text-align: left;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    font-family: inherit
}

.tp-quiz-opt:hover:not(.disabled) {
    border-color: var(--border-h);
    transform: translateY(-1px)
}

.tp-quiz-opt.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, .08);
    color: #22c55e
}

.tp-quiz-opt.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, .08);
    color: #ef4444
}

.tp-quiz-opt.disabled {
    opacity: .5;
    pointer-events: none;
    cursor: default
}

.tp-quiz-result {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500
}

.tp-quiz-result.correct {
    color: #22c55e
}

.tp-quiz-result.wrong {
    color: #ef4444
}

@media(max-width:640px) {
    .tp-quiz-options {
        grid-template-columns: 1fr
    }
}

/* Chapter bottom nav */
.tp-ch-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border)
}

.tp-ch-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-align: left;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    width: 100%
}

.tp-ch-nav-btn:hover:not(:disabled) {
    border-color: var(--border-h);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm)
}

.tp-ch-nav-btn span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1
}

.tp-ch-nav-btn small {
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600
}

.tp-ch-nav-btn strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.tp-ch-nav-next {
    text-align: right;
    justify-content: flex-end
}

.tp-ch-nav-next span {
    align-items: flex-end
}

@media(max-width:640px) {
    .tp-ch-nav {
        grid-template-columns: 1fr
    }
}

/* ── Right Sidebar ─────────────────────────────────────────── */
.tp-right-sidebar {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    border-left: 1px solid var(--border);
    padding: 24px 20px 32px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent
}

.tp-right-sidebar::-webkit-scrollbar {
    width: 6px
}

.tp-right-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px
}

.tp-rs-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border)
}

.tp-rs-section:last-child {
    border-bottom: none
}

.tp-rs-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text3);
    margin-bottom: 12px
}

.tp-toc {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.tp-toc-item {
    display: block;
    padding: 7px 10px;
    border-left: 2px solid transparent;
    font-size: 13px;
    color: var(--text2);
    transition: var(--transition);
    line-height: 1.4;
    text-decoration: none;
    font-family: "Montserrat", sans-serif !important;
}

.tp-toc-item:hover {
    color: var(--text);
    border-left-color: var(--border)
}

.tp-toc-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
    background: rgba(249, 115, 22, .05)
}

.tp-rs-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.tp-rs-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text2)
}

.tp-rs-info-val {
    color: var(--text);
    font-weight: 500
}

.tp-share-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 10px
}

.tp-share-btns {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.tp-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    transition: var(--transition);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    width: 100%
}

.tp-share-btn:hover {
    background: var(--bg2);
    border-color: var(--border-h);
    transform: translateX(2px)
}

.tp-share-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    color: var(--accent);
    flex: none
}

.tp-share-twitter .tp-share-icon {
    background: rgba(29, 161, 242, .1);
    color: #1da1f2
}

.tp-share-linkedin .tp-share-icon {
    background: rgba(10, 102, 194, .1);
    color: #0a66c2
}

.tp-share-whatsapp .tp-share-icon {
    background: rgba(37, 211, 102, .1);
    color: #25d366
}

.tp-rs-related-list {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.tp-rs-related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 10px;
    transition: var(--transition);
    color: var(--text);
    text-decoration: none
}

.tp-rs-related-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-h)
}

.tp-rs-rel-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: none
}

.tp-rel-html {
    background: rgba(6, 182, 212, .12)
}

.tp-rel-css {
    background: rgba(38, 77, 228, .12)
}

.tp-rel-js {
    background: rgba(240, 219, 79, .15)
}

.tp-rel-py {
    background: rgba(249, 115, 22, .12)
}

.tp-rs-rel-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3
}

.tp-rs-rel-meta {
    font-size: 11px;
    color: var(--text3);
    margin-top: 2px
}

.tp-rs-cta {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, .12), rgba(168, 85, 247, .08));
    border: 1px solid rgba(249, 115, 22, .2);
    border-radius: var(--radius-md);
    margin-top: 20px
}

.tp-rs-cta-emoji {
    font-size: 30px;
    margin-bottom: 8px
}

.tp-rs-cta-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px
}

.tp-rs-cta-sub {
    font-size: 12.5px;
    color: var(--text2);
    line-height: 1.5;
    margin-bottom: 12px
}

.tp-rs-cta-btn {
    display: inline-block;
    padding: 9px 18px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none
}

.tp-rs-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 72, 153, .3);
    color: white
}

/* ══ PAGE-SPECIFIC: Jump-to-section cards ══════════════════════ */
.py-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
    margin: 24px 0 32px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md)
}

.py-nav-title {
    grid-column: 1/-1;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text3);
    margin-bottom: 4px
}

.py-nav-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .95);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent
}

.py-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    filter: brightness(1.08)
}

.py-nav-card-1 {
    background: linear-gradient(135deg, #f97316, #ec4899)
}

.py-nav-card-2 {
    background: linear-gradient(135deg, #22c55e, #06b6d4)
}

.py-nav-card-3 {
    background: linear-gradient(135deg, #a855f7, #3b82f6)
}

.py-nav-card-4 {
    background: linear-gradient(135deg, #f59e0b, #f97316)
}

.py-nav-card-5 {
    background: linear-gradient(135deg, #ec4899, #a855f7)
}

.py-nav-card-6 {
    background: linear-gradient(135deg, #06b6d4, #22c55e)
}

.py-nav-card-7 {
    background: linear-gradient(135deg, #3b82f6, #a855f7)
}

.py-nav-card-8 {
    background: linear-gradient(135deg, #ef4444, #f97316)
}

.py-nav-card-9 {
    background: linear-gradient(135deg, #8b5cf6, #ec4899)
}

/* ══ Feature cards ═══════════════════════════════════════════════ */
.py-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0
}

.py-feature-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
    transition: var(--transition)
}

.py-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-h)
}

.py-feature-bar {
    height: 4px;
    width: 100%
}

.py-feature-body {
    padding: 14px 14px 16px
}

.py-feature-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text);
    margin-bottom: 6px
}

.py-feature-icon-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px
}

.py-feature-desc {
    font-size: 12.5px;
    color: var(--text2);
    line-height: 1.55
}

/* ══ Uses cards ══════════════════════════════════════════════════ */
.py-uses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin: 20px 0
}

.py-uses-card {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: var(--transition)
}

.py-uses-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-h)
}

.py-uses-icon {
    font-size: 24px;
    margin-bottom: 10px
}

.py-uses-name {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px
}

.py-uses-desc {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5
}

/* ══ Explore tutorials ════════════════════════════════════════ */
.te-explore-section {
    margin: 36px 0 0
}

.te-explore-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text3);
    margin-bottom: 14px
}

.te-explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px
}

.te-explore-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition)
}

.te-explore-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-h)
}

.te-card-css {
    background: rgba(38, 77, 228, .06)
}

.te-card-js {
    background: rgba(247, 223, 30, .06)
}

.te-card-html {
    background: rgba(228, 77, 38, .06)
}

.te-card-python {
    background: rgba(249, 115, 22, .06)
}

.te-card-react {
    background: rgba(97, 218, 251, .06)
}

.te-card-tw {
    background: rgba(6, 182, 212, .06)
}

.te-explore-initial {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex: none
}

.te-card-css .te-explore-initial {
    background: rgba(38, 77, 228, .18);
    color: #5b80f5
}

.te-card-js .te-explore-initial {
    background: rgba(247, 223, 30, .22);
    color: #b59700
}

[data-theme="dark"] .te-card-js .te-explore-initial {
    color: #f7df1e
}

.te-card-html .te-explore-initial {
    background: rgba(228, 77, 38, .18);
    color: #e44d26
}

.te-card-python .te-explore-initial {
    background: rgba(249, 115, 22, .18);
    color: #f97316
}

.te-card-react .te-explore-initial {
    background: rgba(97, 218, 251, .18);
    color: #2390b0
}

[data-theme="dark"] .te-card-react .te-explore-initial {
    color: #61dafb
}

.te-card-tw .te-explore-initial {
    background: rgba(6, 182, 212, .18);
    color: #06b6d4
}

.te-explore-name {
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3
}

.te-explore-meta {
    font-size: 11px;
    color: var(--text3);
    margin-top: 2px
}

/* ══ Comparison table ════════════════════════════════════════ */
.py-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 18px 0
}

.py-compare-table th {
    background: var(--bg3);
    color: var(--text3);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border)
}

.py-compare-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    vertical-align: middle
}

.py-compare-table tr:last-child td {
    border-bottom: none
}

.py-compare-table tr:hover td {
    background: var(--bg3)
}

.py-compare-table td:first-child {
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px
}

/* ══ COURSE PROMOTION CARD — Large & Stunning ════════════════ */
.py-course-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin: 36px 0;
    background: var(--bg-card);
    border: 1px solid var(--border)
}

.py-course-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, .15) 0%, rgba(236, 72, 153, .12) 40%, rgba(168, 85, 247, .10) 70%, rgba(6, 182, 212, .08) 100%);
    pointer-events: none
}

.py-course-card-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f97316' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
}

.py-course-card-inner {
    position: relative;
    z-index: 1;
    padding: 36px 36px 32px
}

.py-course-card-top {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px
}

.py-course-card-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    flex: none;
    box-shadow: 0 8px 32px rgba(249, 115, 22, .4)
}

.py-course-card-meta {
    flex: 1
}

.py-course-card-eyebrow {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--accent);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px
}

.py-course-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px
}

.py-course-card-sub {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6;
    max-width: 640px
}

.py-course-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border)
}

.py-course-stat {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.py-course-stat-val {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent)
}

.py-course-stat-label {
    font-size: 11px;
    color: var(--text3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em
}

.py-course-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px
}

.py-course-pill {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(249, 115, 22, .1);
    color: var(--accent);
    border: 1px solid rgba(249, 115, 22, .2)
}

.py-course-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center
}

.py-course-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 6px 24px rgba(249, 115, 22, .35);
    white-space: nowrap
}

.py-course-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(249, 115, 22, .45);
    color: #fff
}

.py-course-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 22px;
    border: 1.5px solid var(--border);
    background: var(--bg-glass);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    white-space: nowrap
}

.py-course-btn-secondary:hover {
    border-color: var(--border-h);
    color: var(--accent);
    transform: translateY(-2px)
}

.py-course-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(34, 197, 94, .12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, .2)
}

/* ══ Cheatsheet banner ═══════════════════════════════════════ */
.py-cheatsheet-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(249, 115, 22, .07), rgba(236, 72, 153, .05));
    border: 1px solid rgba(249, 115, 22, .22);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin: 32px 0;
    flex-wrap: wrap
}

.py-cs-icon-wrap {
    width: 44px;
    height: 44px;
    background: rgba(249, 115, 22, .12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex: none
}

.py-cs-text {
    flex: 1;
    min-width: 160px
}

.py-cs-eyebrow {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent);
    margin-bottom: 3px
}

.py-cs-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px
}

.py-cs-sub {
    font-size: 12.5px;
    color: var(--text2)
}

.py-cs-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 9px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex: none
}

.py-cs-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff
}

@media screen and (max-width:768px) {
    .py-cheatsheet-banner {
        flex-direction: column;
        align-items: start;
    }
}

/* ══ Compiler link card ══════════════════════════════════════ */
.py-compiler-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, rgba(34, 197, 94, .08), rgba(6, 182, 212, .06));
    border: 1px solid rgba(34, 197, 94, .25);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin: 24px 0;
    flex-wrap: wrap
}

.py-compiler-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: none
}

.py-compiler-content {
    flex: 1;
    min-width: 160px
}

.py-compiler-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text);
    margin-bottom: 3px
}

.py-compiler-sub {
    font-size: 12.5px;
    color: var(--text2)
}

.py-compiler-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 9px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex: none
}

.py-compiler-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: #fff
}

@media screen and (max-width:768px) {
    .py-compiler-card {
        flex-direction: column;
        align-items: start;
    }
}

/* ══ Syntax tokens ═══════════════════════════════════════════ */
.t-kw {
    color: #89b4fa
}

.t-fn {
    color: #cba6f7
}

.t-str {
    color: #a6e3a1
}

.t-num {
    color: #fab387
}

.t-cmt {
    color: #585b70;
    font-style: italic
}

.t-op {
    color: #89dceb
}

.t-out {
    color: #cdd6f4;
    opacity: .6
}

/* ══ Badges / Tags ═══════════════════════════════════════════ */
.badge-rating {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600
}

.tag-yellow {
    background: rgba(250, 204, 21, 0.15);
    color: #eab308
}

.badge-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600
}

.tag-orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316
}

/* ══ Google Ad placeholder ═══════════════════════════════════ */
.js-ad-block {
    margin: 28px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px dashed var(--border);
    background: var(--bg2)
}

.js-ad-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--text3);
    padding: 5px 12px 4px;
    border-bottom: 1px dashed var(--border);
    background: var(--bg3);
    text-align: center
}

.js-ad-inner {
    position: relative;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center
}

.js-ad-inner::after {
    content: "Ad Space";
    font-size: 11px;
    color: var(--text3);
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}

/* ══ Fade-in ═════════════════════════════════════════════════ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0)
}

/* ══ Responsive ══════════════════════════════════════════════ */
@media(max-width:1180px) {
    .tp-layout {
        grid-template-columns: 260px 1fr
    }

    .tp-right-sidebar {
        display: none
    }
}

@media(max-width:1024px) {

    .nav-links,
    .nav-actions .btn {
        display: none
    }

    .hamburger {
        display: flex
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr
    }
}

@media(max-width:900px) {
    .tp-layout {
        grid-template-columns: 1fr;
        padding-top: 66px
    }

    .tp-sidebar {
        position: fixed;
        top: 66px;
        left: 0;
        width: 300px;
        z-index: 200;
        height: calc(100vh - 66px);
        transform: translateX(-100%);
        transition: transform .3s var(--ease-out);
        box-shadow: var(--shadow-lg);
        border-right: 1px solid var(--border)
    }

    .tp-sidebar.open {
        transform: translateX(0)
    }

    .tp-main {
        padding: 0 20px 60px
    }

    .tp-mob-sidebar-toggle {
        display: flex
    }

    .tp-topbar {
        top: 66px
    }
}

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

    .footer-bottom {
        justify-content: center;
        flex-direction: column
    }

    .py-feature-grid {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:640px) {
    .footer-grid {
        grid-template-columns: 1fr
    }

    .py-nav-grid {
        grid-template-columns: 1fr 1fr
    }

    .py-feature-grid {
        grid-template-columns: 1fr
    }

    .py-uses-grid {
        grid-template-columns: 1fr 1fr
    }

    .py-course-card-top {
        flex-direction: column
    }

    .py-course-card-inner {
        padding: 24px 20px 20px
    }
}



/* ── Footer ───────────────────────────────────── */
footer {
    position: relative;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    color: var(--text);
    overflow: hidden;
}

/* subtle glow */
footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left,
            rgba(249, 115, 22, 0.08),
            transparent 28%),
        radial-gradient(circle at top right,
            rgba(168, 85, 247, 0.08),
            transparent 30%);
    pointer-events: none;
}

/* ── Footer Top ───────────────────────────────── */
.footer-top {
    position: relative;
    z-index: 2;
    padding: 78px 0 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1.4fr;
    gap: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text2);
    max-width: 280px;
    margin-bottom: 24px;
}

/* ── Social Icons ─────────────────────────────── */
.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-social {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-glass);
    color: var(--text2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    display: flex;
    align-items: center;
    justify-content: center;

    transition: var(--transition);
}

.footer-social:hover {
    transform: translateY(-4px);
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* ── Column Title ─────────────────────────────── */
.footer-col-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 22px;
}

/* ── Footer Links ─────────────────────────────── */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    position: relative;
    width: fit-content;
    font-size: 14px;
    color: var(--text2);
    transition: var(--transition);
}

.footer-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links a:hover::after {
    width: 100%;
}

/* ── Newsletter ───────────────────────────────── */
.footer-nl-sub {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 16px;
    line-height: 1.7;
}

.footer-nl-form {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.footer-nl-input {
    flex: 1;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--border);

    background: var(--bg-glass);
    color: var(--text);

    font-size: 13px;
    font-family: var(--font-body);

    outline: none;
    transition: var(--transition);

    backdrop-filter: blur(12px);
}

.footer-nl-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.footer-nl-input::placeholder {
    color: var(--text3);
}

.footer-nl-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: none;
    background: var(--grad);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    flex-shrink: 0;

    transition: var(--transition);
}

.footer-nl-btn:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-glow);
}

/* ── SEO Footer ───────────────────────────────── */
.footer-seo {
    position: relative;
    z-index: 2;

    padding: 12px 0 26px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    background:
        linear-gradient(180deg,
            transparent 0%,
            rgba(249, 115, 22, 0.03) 100%);
}

.footer-seo-block {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.footer-seo-block:last-child {
    border-bottom: none;
}

.footer-seo-block h4 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text);

    margin-bottom: 18px;
}

/* ── SEO Links ────────────────────────────────── */
.footer-seo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    line-height: 2.2;
}

.footer-seo-links a {
    position: relative;

    color: var(--text2);
    font-size: 15px;

    padding-right: 14px;

    transition: var(--transition);
}

.footer-seo-links a::after {
    content: "|";
    position: absolute;
    right: 0;
    color: var(--text3);
}

.footer-seo-links a:last-child::after {
    display: none;
}

.footer-seo-links a:hover {
    color: var(--accent);
}

/* ── Footer Bottom ────────────────────────────── */
.footer-bottom {
    padding: 24px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    position: relative;
    z-index: 2;
}

.footer-copy,
.footer-love {
    font-size: 13px;
    color: var(--text3);
}

.footer-copy a,
.footer-love a {
    color: var(--text);
    transition: var(--transition);
}

.footer-copy a:hover,
.footer-love a:hover {
    color: var(--accent);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1100px) {

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 42px;
    }
}

@media (max-width: 768px) {

    .footer-top {
        padding: 60px 0 42px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .footer-desc {
        max-width: 100%;
    }

    .footer-seo-block {
        padding: 22px 0;
    }

    .footer-seo-block h4 {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .footer-seo-links {
        gap: 8px;
        line-height: 2;
    }

    .footer-seo-links a {
        font-size: 13px;
    }

    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}


/* Scroll To Top */

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--grad);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

/* Hover effect */
#scrollTopBtn:hover {
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    /* Smooth animation */
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hide Smoothly */
.whatsapp-btn.hide {
    opacity: 0;
    transform: translateY(40px) scale(0.85);
    pointer-events: none;
}

/* Tooltip */
.wa-tooltip {
    position: absolute;
    right: 60px;
    background: var(--bg2);
    color: var(--text);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);

    opacity: 0;
    transform: translateY(5px);
    transition: var(--transition);
}

.whatsapp-btn:hover .wa-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {

    .nav-links,
    .nav-actions .btn {
        display: none;
    }

    .hamburger {
        display: flex;
    }

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

@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }

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

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

    .footer-bottom {
        justify-content: center;
        flex-direction: column;
    }
}

@media (max-width: 540px) {

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



/* ── Google Review Card ───────────────────────────────────────── */
.review-section {
    margin: 36px 0;
}

.review-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.review-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.review-rating-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #d97706;
}

[data-theme="dark"] .review-rating-badge {
    color: #fbbf24;
}

.review-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.google-review-cta {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(52, 168, 83, 0.08));
    border: 1px solid rgba(66, 133, 244, 0.25);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    margin: 16px 0;
}

.google-review-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: var(--shadow-sm);
}

.google-review-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text);
    margin-bottom: 8px;
}

.google-review-sub {
    font-size: 15px;
    color: var(--text2);
    margin-bottom: 18px;
    line-height: 1.6;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.google-review-stars-big {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 28px;
    margin-bottom: 18px;
    color: #fbbf24;
}

.google-review-count {
    font-size: 14px;
    color: var(--text2);
    margin-left: 8px;
}

.google-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #4285F4, #34A853);
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 18px rgba(66, 133, 244, 0.35);
}

.google-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(66, 133, 244, 0.45);
    color: white;
}


/* ── Community Cards (WhatsApp + Telegram) ────────────────────── */
.community-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.community-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 24px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
    color: inherit;
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.community-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.community-card--wa {
    background: rgba(37, 211, 102, 0.06);
    border-color: rgba(37, 211, 102, 0.2);
}

.community-card--wa:hover {
    border-color: rgba(37, 211, 102, 0.4);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.15);
}

.community-card--tg {
    background: rgba(0, 136, 204, 0.06);
    border-color: rgba(0, 136, 204, 0.2);
}

.community-card--tg:hover {
    border-color: rgba(0, 136, 204, 0.4);
    box-shadow: 0 8px 28px rgba(0, 136, 204, 0.15);
}

.community-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.community-card--wa .community-icon {
    background: rgba(37, 211, 102, 0.15);
}

.community-card--tg .community-icon {
    background: rgba(0, 136, 204, 0.15);
}

.community-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text);
}

.community-desc {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.5;
}

.community-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    transition: var(--transition);
}

.community-card--wa .community-btn {
    background: #25D366;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.community-card--tg .community-btn {
    background: #0088CC;
    box-shadow: 0 4px 14px rgba(0, 136, 204, 0.35);
}

.community-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

@media (max-width: 560px) {
    .community-grid {
        grid-template-columns: 1fr;
    }
}