/* ============================================================================
   WebAcademy — NEO-BRUTALISM DESIGN SYSTEM
   Ultra-vibrant, high-contrast, tactile, responsive & APK-ready
   ========================================================================== */

/* ----------------------------------------------------------------- TOKENS */
:root {
    --font-display: "Space Grotesk", "Plus Jakarta Sans", "IBM Plex Sans", -apple-system, sans-serif;
    --font-body: "Plus Jakarta Sans", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;

    --sidebar-w: 290px;
    --topbar-h: 68px;
    --bottombar-h: 66px;
    --content-max: 1240px;
    --reading-max: 840px;

    /* Neo-Brutalist Border & Radii */
    --bw: 2.5px;
    --bw-thick: 3.5px;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    /* Neo-Brutalist Vivid Pop Palette */
    --neo-yellow: #FFE600;
    --neo-pink: #FF6B8B;
    --neo-cyan: #00F0FF;
    --neo-mint: #4ECCA3;
    --neo-purple: #A78BFA;
    --neo-orange: #FF8400;
    --neo-blue: #38BDF8;
    --neo-lime: #B9F046;
    --neo-red: #FF4757;
    --neo-cream: #FFFDF5;
    --neo-dark: #000000;

    /* Tactile Speed */
    --dur-fast: 90ms;
    --dur: 150ms;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Light Theme (Flagship Neo-Brutalist) */
[data-theme="light"] {
    color-scheme: light;
    --paper: #FFFDF5;         /* Warm retro cream canvas */
    --paper-deep: #F7F2E2;
    --surface: #FFFFFF;
    --surface-2: #FFFBEA;
    --surface-3: #F5EEDB;
    --ink: #000000;           /* Pure crisp black */
    --ink-2: #18181B;
    --muted: #4B5563;
    --faint: #6B7280;
    --line: #000000;
    --line-strong: #000000;

    --accent: #FFE600;
    --accent-strong: #000000;
    --accent-ink: #000000;
    --accent-soft: #FFF9C4;

    --teal: #059669;
    --teal-soft: #D1FAE5;
    --gold: #D97706;
    --gold-soft: #FEF3C7;
    --ok: #16A34A;
    --ok-soft: #DCFCE7;
    --warn: #EA580C;
    --warn-soft: #FFEDD5;
    --err: #DC2626;
    --err-soft: #FEE2E2;
    --info: #2563EB;
    --info-soft: #DBEAFE;

    --code-bg: #121214;
    --code-bg-2: #1A1A1E;
    --code-line: #2D2D35;
    --code-ink: #FFFFFF;
    --code-muted: #9CA3AF;

    --scrim: rgba(0, 0, 0, 0.65);

    /* Solid Hard Shadows (ZERO blur!) */
    --shadow-flat: 2px 2px 0px #000000;
    --shadow-card: 4px 4px 0px #000000;
    --shadow-card-hover: 6px 6px 0px #000000;
    --shadow-btn: 3px 3px 0px #000000;
    --shadow-btn-hover: 5px 5px 0px #000000;
    --shadow-pop: 7px 7px 0px #000000;
    --shadow-1: 3px 3px 0px #000000;
    --shadow-2: 5px 5px 0px #000000;
}

/* Dark Theme (True Cyber-Brutalism: Refined, Deep & High Contrast) */
[data-theme="dark"] {
    color-scheme: dark;
    --paper: #121317;         /* Deep rich charcoal */
    --paper-deep: #0C0D10;
    --surface: #191B22;       /* Elevated dark card surface */
    --surface-2: #222530;     /* Interactive elements */
    --surface-3: #2B2E3C;
    --ink: #FFFFFF;           /* Pure white headings */
    --ink-2: #E2E4E9;         /* High readability body */
    --muted: #9CA3AF;
    --faint: #6B7280;
    --line: #474B59;          /* Crisp visible border with strong contrast */
    --line-strong: #64697B;

    --accent: #FFE600;
    --accent-strong: #FFE600;
    --accent-ink: #000000;
    --accent-soft: #252208;

    --teal: #2DD4BF;
    --teal-soft: #0E2522;
    --gold: #FBBF24;
    --gold-soft: #261F0C;
    --ok: #4ADE80;
    --ok-soft: #0D2616;
    --warn: #FB923C;
    --warn-soft: #2E1B0F;
    --err: #F87171;
    --err-soft: #2E1416;
    --info: #38BDF8;
    --info-soft: #0E2034;

    --code-bg: #0A0B0E;
    --code-bg-2: #14151B;
    --code-line: #242630;
    --code-ink: #F9FAFB;
    --code-muted: #9CA3AF;

    --scrim: rgba(0, 0, 0, 0.85);

    /* Solid Deep Shadow + High-Contrast Cyber Pop */
    --shadow-flat: 2px 2px 0px #000000;
    --shadow-card: 4px 4px 0px #000000;
    --shadow-card-hover: 6px 6px 0px var(--neo-yellow);
    --shadow-btn: 3px 3px 0px #000000;
    --shadow-btn-hover: 4px 4px 0px var(--neo-yellow);
    --shadow-pop: 6px 6px 0px #000000;
    --shadow-1: 3px 3px 0px #000000;
    --shadow-2: 5px 5px 0px var(--neo-yellow);
}

/* ----------------------------------------------------------------- RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--paper);
    color: var(--ink);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--paper);
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

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

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

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

/* ----------------------------------------------------------------- TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.wa-page-head {
    width: 100%;
}
.wa-page-head .wa-page-lead {
    max-width: 960px;
}

.wa-page-title {
    font-size: clamp(1.8rem, 3.8vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.wa-section-title {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    margin: 1.8rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: var(--bw) solid var(--line);
}
.wa-section-head h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 900;
}
.wa-section-head .wa-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.wa-section-head a {
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ----------------------------------------------------------------- BUTTONS & TACTILE CONTROLS */
.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--surface);
    color: var(--ink);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}

.wa-btn:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
    color: var(--ink);
}

.wa-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--line);
}

/* Primary Button (Electric Yellow) */
.wa-btn.primary {
    background: var(--neo-yellow);
    color: #000000;
    border-color: #000000;
}
.wa-btn.primary:hover {
    background: #FFF033;
}

/* Secondary Button (Cyan) */
.wa-btn.secondary {
    background: var(--neo-cyan);
    color: #000000;
    border-color: #000000;
}
.wa-btn.secondary:hover {
    background: #33F3FF;
}

/* Accent Button (Bubblegum Pink) */
.wa-btn.accent {
    background: var(--neo-pink);
    color: #000000;
    border-color: #000000;
}
.wa-btn.accent:hover {
    background: #FF85A2;
}

/* Success Button (Mint Green) */
.wa-btn.success {
    background: var(--neo-mint);
    color: #000000;
    border-color: #000000;
}

/* Danger Button (Neon Red) */
.wa-btn.danger {
    background: var(--neo-red);
    color: #FFFFFF;
    border-color: #000000;
}

.wa-btn.small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0px var(--line);
}

.wa-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Icon Buttons */
.wa-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--surface);
    color: var(--ink);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-iconbtn:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--surface-2);
}
.wa-iconbtn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--line);
}

/* ----------------------------------------------------------------- STICKERS & BADGES */
.wa-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: 2px 2px 0px var(--line);
    background: var(--surface-2);
    color: var(--ink);
    white-space: nowrap;
}
.wa-badge.ok, .wa-badge.done     { background: var(--neo-mint); color: #000000; border-color: #000000; }
.wa-badge.warn, .wa-badge.todo   { background: var(--neo-yellow); color: #000000; border-color: #000000; }
.wa-badge.err                    { background: var(--neo-red); color: #FFFFFF; border-color: #000000; }
.wa-badge.info                   { background: var(--neo-cyan); color: #000000; border-color: #000000; }
.wa-badge.pink                   { background: var(--neo-pink); color: #000000; border-color: #000000; }
.wa-badge.purple                 { background: var(--neo-purple); color: #000000; border-color: #000000; }
.wa-badge.orange                 { background: var(--neo-orange); color: #000000; border-color: #000000; }

.wa-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    border: 1px solid var(--line);
}

/* ----------------------------------------------------------------- CARDS (BASE) */
.wa-card {
    background: var(--surface);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.wa-card:hover {
    box-shadow: var(--shadow-card-hover);
}
.wa-card h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}
.wa-card.flat {
    box-shadow: none;
    background: var(--surface-2);
}
.wa-card.accent {
    border-left: 6px solid var(--neo-yellow);
}

.wa-grid {
    display: grid;
    gap: 16px;
}
.wa-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wa-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wa-grid.auto   { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ----------------------------------------------------------------- SHELL & LAYOUT */
.wa-skip {
    position: absolute;
    top: -9999px;
    left: 20px;
    background: var(--neo-yellow);
    color: #000000;
    padding: 10px 16px;
    border: var(--bw) solid #000;
    border-radius: var(--radius);
    font-weight: 800;
    z-index: 9999;
}
.wa-skip:focus {
    top: 20px;
}

.wa-app {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* Sidebar */
.wa-sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: var(--bw-thick) solid var(--line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    transition: transform var(--dur) var(--ease-out);
}

.wa-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 14px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wa-scrim {
    position: fixed;
    inset: 0;
    background: var(--scrim);
    backdrop-filter: blur(4px);
    z-index: 190;
    cursor: pointer;
}

/* Brand */
.wa-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 12px;
    background: var(--neo-yellow);
    color: #000000;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    text-decoration: none;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-brand:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
}
.wa-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #000000;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0px #FFFFFF;
    flex-shrink: 0;
}
.wa-brand-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #000000;
}

/* Nav Search */
.wa-navsearch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: 2px 2px 0px var(--line);
    margin-bottom: 6px;
}
.wa-navsearch input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    font-weight: 600;
}
.wa-navsearch kbd {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.wa-navresults {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}
.wa-navresult {
    padding: 10px 12px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: 2px 2px 0px var(--line);
    font-size: 0.85rem;
    font-weight: 700;
}
.wa-navresult:hover {
    background: var(--neo-yellow);
    color: #000000;
}
.wa-navresults-empty {
    font-size: 0.8rem;
    color: var(--muted);
    padding: 6px;
}

/* User Card in Sidebar */
.wa-side-user {
    padding: 12px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}
.wa-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wa-avatar-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--bw) solid #000000;
    border-radius: 50%;
    box-shadow: 2px 2px 0px #000000;
    flex-shrink: 0;
}
.wa-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.wa-user-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-guest-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--neo-yellow);
    color: #000000;
    border: 1.5px solid #000000;
    border-radius: var(--radius-pill);
    padding: 1px 6px;
    width: fit-content;
}

/* Nav Groups & Modules in Sidebar */
.wa-nav-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
}
.wa-nav-group-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 6px 8px 2px;
}
.wa-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: all var(--dur-fast);
}
.wa-nav-item:hover {
    background: var(--surface-2);
    border-color: var(--line);
    box-shadow: 2px 2px 0px var(--line);
    transform: translate(-1px, -1px);
}
.wa-nav-item.active {
    background: var(--neo-yellow);
    color: #000000;
    border-color: #000000;
    box-shadow: 3px 3px 0px #000000;
    font-weight: 900;
}

/* Modules Accordions in Sidebar */
.wa-nav-mod {
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 2px 2px 0px var(--line);
    overflow: hidden;
    margin-bottom: 6px;
}
.wa-nav-mod-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 800;
}
.wa-nav-mod-btn:hover {
    background: var(--surface-2);
}
.wa-nav-mod.open .wa-nav-mod-btn {
    background: var(--paper-deep);
    border-bottom: var(--bw) solid var(--line);
}
.wa-nav-mod-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid #000000;
    border-radius: 6px;
    background: var(--neo-yellow);
    color: #000000;
    box-shadow: 1.5px 1.5px 0px #000000;
    font-size: 0.8rem;
    font-weight: 900;
    flex-shrink: 0;
}
/* Multi-Color Module Badges in Sidebar */
.wa-nav-mod:nth-child(6n+1) .wa-nav-mod-icon { background: var(--neo-orange); color: #FFFFFF; }
.wa-nav-mod:nth-child(6n+2) .wa-nav-mod-icon { background: var(--neo-blue); color: #000000; }
.wa-nav-mod:nth-child(6n+3) .wa-nav-mod-icon { background: var(--neo-pink); color: #000000; }
.wa-nav-mod:nth-child(6n+4) .wa-nav-mod-icon { background: var(--neo-mint); color: #000000; }
.wa-nav-mod:nth-child(6n+5) .wa-nav-mod-icon { background: var(--neo-yellow); color: #000000; }
.wa-nav-mod:nth-child(6n+6) .wa-nav-mod-icon { background: var(--neo-purple); color: #000000; }
.wa-nav-mod-name {
    flex: 1;
}
.wa-nav-mod-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
}
.wa-nav-chapters {
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
    gap: 2px;
    background: var(--surface);
}
.wa-nav-chapter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-xs);
    color: var(--ink);
}
.wa-nav-chapter:hover {
    background: var(--surface-2);
}
.wa-nav-chapter.active {
    background: var(--neo-yellow);
    color: #000000;
    font-weight: 800;
    border: 1.5px solid #000000;
    box-shadow: 2px 2px 0px #000000;
}
.wa-nav-chapter.done::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    margin-left: auto;
    display: inline-block;
}

/* Sidebar Footer (Hidden as requested) */
.wa-sidefoot {
    display: none !important;
}

/* ----------------------------------------------------------------- TOPBAR */
.wa-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: var(--bw-thick) solid var(--line);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wa-topbar-start {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wa-sidebar-toggle {
    display: none;
}

.wa-mobile-brand {
    display: none;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
}

.wa-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 800;
}
.wa-crumbs .sep {
    color: var(--muted);
    font-weight: 900;
}

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

.wa-langswitch {
    display: flex;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0px var(--line);
    overflow: hidden;
}
.wa-langswitch button {
    padding: 4px 8px;
    border: none;
    background: var(--surface);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}
.wa-langswitch button.on {
    background: var(--neo-yellow);
    color: #000000;
}

.wa-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    background: var(--surface);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-btn);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ink);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-user-chip:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--surface-2);
}

/* Guest Banner */
.wa-guest-banner {
    background: var(--neo-yellow);
    color: #000000;
    border: var(--bw) solid #000000;
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-btn);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 700;
}
.wa-guest-banner a {
    text-decoration: underline;
    font-weight: 900;
}

/* ----------------------------------------------------------------- MAIN CONTENT CONTAINER */
.wa-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wa-main-inner {
    padding: 32px 36px;
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ----------------------------------------------------------------- DASHBOARD / ACCUEIL */
/* Hero Section */
.wa-hero {
    background: var(--surface);
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    padding: 36px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
    align-items: center;
    gap: 34px;
    background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
    background-size: 18px 18px;
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
}

.wa-overline {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--neo-pink);
    color: #000000;
    padding: 6px 14px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: 3px 3px 0px var(--line);
    margin-bottom: 14px;
}
[data-theme="dark"] .wa-overline {
    background: var(--neo-pink);
    color: #000000;
    border-color: #FFFFFF;
    box-shadow: 3px 3px 0px #FFFFFF;
}

.wa-display {
    font-size: clamp(2.1rem, 4.2vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 14px;
}

.wa-page-lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 640px;
    line-height: 1.6;
}

.wa-hero .wa-page-lead {
    font-size: 1.15rem;
    color: var(--ink-2);
    font-weight: 600;
    max-width: 720px;
    line-height: 1.6;
}
.wa-hero .wa-page-lead strong {
    font-weight: 900;
    color: var(--ink);
    background: var(--neo-yellow);
    padding: 2px 8px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-xs);
    box-shadow: 1.5px 1.5px 0px var(--line);
}
[data-theme="dark"] .wa-hero .wa-page-lead strong {
    color: #000000;
}

.wa-hero-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: #EBF8FF;
    border: var(--bw-thick) solid #000000;
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow-card);
    text-align: center;
}
.wa-hero-side p {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0369A1;
}

.wa-ring {
    --p: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: var(--bw-thick) solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--neo-mint) calc(var(--p, 0) * 1%), #FED7AA 0);
    box-shadow: 3px 3px 0px #000000;
    flex-shrink: 0;
}
.wa-ring-inner {
    width: 82px;
    height: 82px;
    background: #FFFFFF;
    border: var(--bw) solid #000000;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.wa-ring-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1;
}
.wa-ring-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
}

/* Continue Card (Kicker highlight in Pink & Cyan) */
.wa-continue {
    position: relative;
    background: #FFF0F5;
    border: var(--bw-thick) solid #000000;
    border-left: 14px solid var(--neo-pink);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
}
.wa-continue::after {
    content: attr(data-index);
    position: absolute;
    right: 20px;
    bottom: -28px;
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 900;
    color: var(--neo-pink);
    opacity: .14;
    line-height: 1;
    pointer-events: none;
}
.wa-continue-main {
    flex: 1;
    min-width: 260px;
    position: relative;
    z-index: 1;
}
.wa-continue-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--neo-cyan);
    color: #000000;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border: 2px solid #000000;
    border-radius: var(--radius-pill);
    box-shadow: 2px 2px 0px #000000;
    margin-bottom: 8px;
}
.wa-continue-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}
.wa-continue-meta {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #9D174D;
}
.wa-continue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Stats Grid (4 Explosive Colored Cards) */
.wa-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.wa-stat {
    padding: 20px 22px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-stat:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-card-hover);
}

/* Distinctive Neo-Brutalist Colors for the 4 Stat Cards */
.wa-stat:nth-child(1) { background: var(--neo-yellow); color: #000000; border-color: #000000; }
.wa-stat:nth-child(2) { background: var(--neo-mint); color: #000000; border-color: #000000; }
.wa-stat:nth-child(3) { background: var(--neo-pink); color: #000000; border-color: #000000; }
.wa-stat:nth-child(4) { background: var(--neo-cyan); color: #000000; border-color: #000000; }

.wa-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}
.wa-stat-label {
    display: block;
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wa-stat-note {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.85;
}

/* Progress Bar */
.wa-progressbar {
    position: relative;
    width: 100%;
    height: 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    box-shadow: 2px 2px 0px var(--line);
    overflow: hidden;
}
.wa-progressbar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--neo-yellow);
    border-right: 2px solid var(--line);
    transition: width 500ms var(--ease);
}
.wa-progressbar.ok > span {
    background: var(--neo-mint);
}

/* Programming Languages Grid (C++, JavaScript, etc.) */
.wa-course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.wa-langcard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    color: var(--ink);
    text-decoration: none;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    position: relative;
}
.wa-langcard:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-card-hover);
    color: var(--ink);
}

/* Personality for Language Cards */
.wa-langcard:nth-child(1) {
    background: #EBF8FF; /* Sky Blue */
    border-color: #000000;
}
.wa-langcard:nth-child(1) .wa-langcard-icon {
    background: var(--neo-blue);
    color: #000000;
}

.wa-langcard:nth-child(2) {
    background: #FFF0F5; /* Bubblegum Pink */
    border-color: #000000;
}
.wa-langcard:nth-child(2) .wa-langcard-icon {
    background: var(--neo-pink);
    color: #000000;
}

.wa-langcard-top {
    display: flex;
    align-items: center;
    gap: 16px;
}
.wa-langcard-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: var(--bw) solid #000000;
    border-radius: var(--radius);
    box-shadow: 3px 3px 0px #000000;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
}
.wa-langcard h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}
.wa-langcard-blurb {
    display: block;
    margin-top: 3px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
}
.wa-langcard-desc {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--ink-2);
}
.wa-langcard-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.wa-langcard-facts span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: 2px 2px 0px var(--line);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}
.wa-langcard-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: var(--bw) dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 900;
}

/* Modules Grid (HTML, CSS, PHP, SQL, etc.) */
.wa-modgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.wa-modcard {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: var(--surface);
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    color: var(--ink);
    text-decoration: none;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.wa-modcard:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-card-hover);
    color: var(--ink);
}

/* Distinctive Neo-Brutalism Colors for Module Cards */
.wa-modcard:nth-child(6n+1) {
    background: #FFF5EB; /* Peach / Coral */
    border-top: 10px solid var(--neo-orange);
}
.wa-modcard:nth-child(6n+1) .wa-modcard-index { background: var(--neo-orange); color: #FFFFFF; }
.wa-modcard:nth-child(6n+1) .wa-nav-mod-icon { background: var(--neo-orange); color: #FFFFFF; }

.wa-modcard:nth-child(6n+2) {
    background: #EBF8FF; /* Sky Blue */
    border-top: 10px solid #0284C7;
}
.wa-modcard:nth-child(6n+2) .wa-modcard-index { background: #0284C7; color: #FFFFFF; }
.wa-modcard:nth-child(6n+2) .wa-nav-mod-icon { background: var(--neo-cyan); color: #000000; }

.wa-modcard:nth-child(6n+3) {
    background: #FFF0F5; /* Bubblegum Pink */
    border-top: 10px solid var(--neo-pink);
}
.wa-modcard:nth-child(6n+3) .wa-modcard-index { background: var(--neo-pink); color: #000000; }
.wa-modcard:nth-child(6n+3) .wa-nav-mod-icon { background: var(--neo-pink); color: #000000; }

.wa-modcard:nth-child(6n+4) {
    background: #ECFDF5; /* Mint Green */
    border-top: 10px solid #059669;
}
.wa-modcard:nth-child(6n+4) .wa-modcard-index { background: #059669; color: #FFFFFF; }
.wa-modcard:nth-child(6n+4) .wa-nav-mod-icon { background: var(--neo-mint); color: #000000; }

.wa-modcard:nth-child(6n+5) {
    background: #FEFCE8; /* Cyber Yellow */
    border-top: 10px solid #CA8A04;
}
.wa-modcard:nth-child(6n+5) .wa-modcard-index { background: var(--neo-yellow); color: #000000; }
.wa-modcard:nth-child(6n+5) .wa-nav-mod-icon { background: var(--neo-yellow); color: #000000; }

.wa-modcard:nth-child(6n+6) {
    background: #F3E8FF; /* Lavender Purple */
    border-top: 10px solid #7C3AED;
}
.wa-modcard:nth-child(6n+6) .wa-modcard-index { background: #7C3AED; color: #FFFFFF; }
.wa-modcard:nth-child(6n+6) .wa-nav-mod-icon { background: var(--neo-purple); color: #000000; }

/* Retro Stamp Index */
.wa-modcard-index {
    position: absolute;
    top: 14px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 8px;
    border: 2px solid #000000;
    border-radius: var(--radius-xs);
    box-shadow: 2px 2px 0px #000000;
}

.wa-modcard-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wa-modcard-head .wa-nav-mod-icon {
    width: 38px;
    height: 38px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 0px var(--line);
    font-size: 1.05rem;
}
.wa-modcard-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}
.wa-modcard-blurb {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}
.wa-modcard-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.wa-modcard-list li {
    display: flex;
    gap: 8px;
    color: var(--ink-2);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
}
.wa-modcard-list li::before {
    content: "►";
    color: var(--line);
    font-size: 0.65rem;
    line-height: 2;
    flex-shrink: 0;
}
.wa-modcard-list li.more {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.wa-modcard-list li.more::before { content: ""; }

.wa-modcard-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: var(--bw) dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 900;
}

/* Recent Activity List */
.wa-recent {
    display: grid;
    gap: 0;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-recent-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: var(--bw) solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    transition: background var(--dur-fast);
}
.wa-recent-row:last-child { border-bottom: 0; }
.wa-recent-row:hover {
    background: var(--neo-yellow);
    color: #000000;
}
.wa-recent-row .wa-badge {
    margin-left: auto;
}

/* ----------------------------------------------------------------- COURSE PAGE (PARCOURS COMPLET) */
.wa-course-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, .65fr);
    gap: 32px;
    padding: 36px;
    margin-bottom: 36px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}
.wa-course-info .wa-page-title { margin: 4px 0 10px; }
.wa-course-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 24px;
}
.wa-course-info .wa-btn-row {
    margin-top: 22px;
    gap: 14px;
}
.wa-course-facts span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: 2px 2px 0px var(--line);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
}
.wa-course-side {
    padding-left: 32px;
    border-left: var(--bw) solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}
.wa-course-side p {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.5;
}

.wa-course-part {
    margin-bottom: 34px;
}
.wa-course-part-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.wa-course-part-num {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: var(--bw) solid #000000;
    border-radius: var(--radius-sm);
    background: var(--neo-yellow);
    color: #000000;
    box-shadow: 2px 2px 0px #000000;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 900;
}
.wa-course-part:nth-child(4n+1) .wa-course-part-num { background: var(--neo-blue); color: #000000; }
.wa-course-part:nth-child(4n+2) .wa-course-part-num { background: var(--neo-mint); color: #000000; }
.wa-course-part:nth-child(4n+3) .wa-course-part-num { background: var(--neo-pink); color: #000000; }
.wa-course-part:nth-child(4n+4) .wa-course-part-num { background: var(--neo-yellow); color: #000000; }
.wa-course-part-head h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 900;
}
.wa-course-part-head .wa-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}
.wa-course-chapters {
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-course-chapter {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: var(--bw) solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    transition: background var(--dur-fast);
}
.wa-course-chapter:last-child { border-bottom: 0; }
.wa-course-chapter:hover {
    background: #FFF0F5;
    color: #000000;
}
.wa-course-chapter:nth-child(2n):hover {
    background: #EBF8FF;
}
.wa-course-chapter:nth-child(3n):hover {
    background: #ECFDF5;
}
.wa-course-chapter-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--muted);
}
.wa-course-chapter-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wa-course-chapter.ghost {
    background: var(--surface-3);
    color: var(--muted);
    cursor: default;
}

.wa-course-projects {
    display: grid;
    gap: 12px;
    padding: 16px;
}
.wa-course-project {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: var(--shadow-btn);
    color: var(--ink);
    text-decoration: none;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-course-project:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--neo-yellow);
    color: #000000;
}
.wa-course-project-index {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* ----------------------------------------------------------------- LESSON READER */
.wa-lesson-head { margin-bottom: 24px; }
.wa-lesson-head .wa-page-title { max-width: 26ch; }
.wa-lesson-sub {
    max-width: 65ch;
    margin-top: 14px;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.6;
}
.wa-lesson-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
}
.wa-lesson-meta span { display: inline-flex; align-items: center; gap: 6px; }

.wa-lesson-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0 20px;
    margin-bottom: 28px;
    border-bottom: var(--bw) solid var(--line);
}

.wa-lesson-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--reading-max)) 260px;
    gap: 48px;
    align-items: start;
}
.wa-lesson-body { min-width: 0; }
.wa-lesson-rail {
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
    display: grid;
    gap: 16px;
}

.wa-rail-card {
    padding: 18px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-rail-card h2 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.wa-objectives {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.wa-objectives li {
    position: relative;
    padding-left: 24px;
    color: var(--ink-2);
    font-size: 0.88rem;
    font-weight: 600;
}
.wa-objectives li::before {
    content: "—";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--ok);
    font-weight: 900;
}

/* Table of Contents */
.wa-toc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.wa-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}
.wa-toc a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}
.wa-toc a:hover {
    background: var(--surface-2);
    color: var(--ink);
}
.wa-toc a.active {
    background: var(--neo-yellow);
    color: #000000;
    font-weight: 900;
    box-shadow: 2px 2px 0px var(--line);
    border: 1.5px solid var(--line);
}

/* Prose Text in Lessons */
.wa-text {
    color: var(--ink-2);
    font-size: 1.08rem;
    line-height: 1.75;
}
.wa-text p { margin-bottom: 1.1em; }
.wa-text code {
    padding: 2px 6px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--surface-2);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 700;
}
.wa-text strong {
    color: var(--ink);
    font-weight: 800;
}

/* Darija Callout (Mint Accent) */
.wa-darija {
    position: relative;
    margin: 20px 0;
    padding: 16px 20px;
    background: var(--teal-soft);
    border: var(--bw) solid var(--line);
    border-left: 8px solid var(--teal);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-btn);
    color: #064E3B;
    font-size: 1.02rem;
    line-height: 1.65;
}
.wa-darija .flag {
    display: inline-block;
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal);
}

/* Definitions & Callouts */
.wa-definition {
    margin: 22px 0;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.wa-definition .hdr {
    padding: 10px 18px;
    border-bottom: var(--bw) solid var(--line);
    background: var(--neo-yellow);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #000000;
}
.wa-definition > div {
    padding: 16px 18px;
    color: var(--ink-2);
    font-size: 0.98rem;
    line-height: 1.65;
}

.wa-callout {
    margin: 20px 0;
    padding: 16px 20px;
    border: var(--bw) solid var(--line);
    border-left: 8px solid var(--info);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--info-soft);
    box-shadow: var(--shadow-btn);
    color: var(--ink-2);
    font-size: 0.98rem;
}
.wa-callout.tip { border-left-color: var(--ok); background: var(--ok-soft); }
.wa-callout.warning { border-left-color: var(--warn); background: var(--warn-soft); }

/* Code Block Terminals */
.wa-pre {
    margin: 22px 0;
    border: var(--bw-thick) solid #000000;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--code-bg);
    box-shadow: var(--shadow-card);
}
.wa-pre .bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px 0 16px;
    border-bottom: var(--bw) solid var(--code-line);
    background: var(--code-bg-2);
    color: var(--code-muted);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}
.wa-pre .bar .lang { color: var(--neo-yellow); }
.wa-pre .bar .cp {
    margin-left: auto;
    border: 1.5px solid var(--code-line);
    border-radius: 5px;
    background: transparent;
    color: var(--code-muted);
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
}
.wa-pre .bar .cp:hover { border-color: var(--neo-yellow); color: #FFF; }
.wa-pre pre {
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    color: var(--code-ink);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* Tables */
.wa-tablewrap {
    margin: 22px 0;
    overflow-x: auto;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.wa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: var(--surface);
}
.wa-table th {
    padding: 12px 16px;
    text-align: left;
    background: var(--surface-2);
    border-bottom: var(--bw) solid var(--line);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.wa-table td {
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--line);
}
.wa-table tr:last-child td { border-bottom: 0; }

/* ----------------------------------------------------------------- EXERCISES & TESTS */
.wa-ex {
    margin-top: 48px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}
.wa-ex .exhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: var(--bw-thick) solid var(--line);
    background: var(--neo-cyan);
    color: #000000;
}
.wa-ex .exhead b {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
}
.wa-ex .exbody { padding: 24px; }

.wa-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-deep);
    margin-bottom: 20px;
    box-shadow: var(--shadow-btn);
}
.wa-levels button {
    flex: 1;
    min-width: 140px;
    min-height: 40px;
    border: var(--bw) solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--dur-fast);
}
.wa-levels button:hover {
    background: var(--surface);
    border-color: var(--line);
}
.wa-levels button.on, .wa-levels button[aria-pressed="true"] {
    background: #000000;
    color: #FFFFFF;
    border-color: #000000;
    box-shadow: 2px 2px 0px #FFE600;
}

.editorhost, .editorhost-mini {
    position: relative;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--code-bg);
    box-shadow: var(--shadow-card);
}
.editorhost { height: 100%; min-height: 440px; }
.editorhost-mini { height: 290px; margin: 14px 0; }

.verdict {
    margin-top: 14px;
    padding: 12px 16px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.92rem;
    box-shadow: var(--shadow-btn);
}
.verdict.pass { background: var(--neo-mint); color: #000000; }
.verdict.fail { background: var(--neo-pink); color: #000000; }

.hints { margin-top: 14px; display: grid; gap: 8px; }
.hint {
    padding: 12px 16px;
    border: var(--bw) solid var(--line);
    border-left: 8px solid var(--neo-yellow);
    background: var(--accent-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: var(--shadow-btn);
    font-size: 0.92rem;
    font-weight: 600;
}
.solution {
    margin-top: 18px;
    padding-top: 16px;
    border-top: var(--bw) dashed var(--line);
}

/* ----------------------------------------------------------------- QUIZ */
.wa-quiz { margin-top: 48px; }
.wa-quizq {
    margin: 20px 0;
    padding: 22px 26px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-quizq:nth-child(3n+1) { border-left: 10px solid var(--neo-blue); }
.wa-quizq:nth-child(3n+2) { border-left: 10px solid var(--neo-mint); }
.wa-quizq:nth-child(3n+3) { border-left: 10px solid var(--neo-pink); }
.wa-quizq .qboard {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
}
.wa-quizq .qn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--neo-pink);
    background: #000000;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}
.wa-quizopts { display: grid; gap: 10px; margin-top: 14px; }
.wa-quizopts label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-btn);
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--dur-fast), background var(--dur-fast);
}
.wa-quizopts label:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--surface-2);
}
.wa-quizopts label:has(input:checked) {
    background: var(--neo-yellow);
    border-color: #000000;
    color: #000000;
    font-weight: 900;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-card);
}
.wa-quizopts input {
    margin-top: 3px;
    accent-color: #000000;
}
.wa-quizopts label.good { background: var(--neo-mint); color: #000000; border-color: #000000; }
.wa-quizopts label.bad  { background: var(--neo-pink); color: #000000; border-color: #000000; }

.wa-quizafter {
    margin: 24px 0;
    padding: 24px 28px;
    background: var(--paper-deep);
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
}

/* ----------------------------------------------------------------- INTERACTIVE LABS */
.wa-lab { margin-top: 24px; }
.wa-lab-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--surface);
    border-bottom: 0;
    box-shadow: var(--shadow-card);
}
.wa-lab-toolbar .spacer { flex: 1; }
.wa-lab-toolbar .wa-select {
    min-height: 40px;
    padding: 0 32px 0 12px;
    font-weight: 700;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-btn);
}
.wa-lab-tabs { display: none; }
.wa-lab-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr);
    min-height: 580px;
    border: var(--bw-thick) solid var(--line);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-lab-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: var(--bw) solid var(--line);
}
.wa-lab-pane:last-child { border-right: 0; }
.wa-lab-pane.guide { background: var(--paper); }
.wa-pane-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-bottom: var(--bw) solid var(--line);
    background: var(--surface-2);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.wa-lab-pane.editor .wa-pane-head {
    background: var(--code-bg-2);
    border-color: var(--code-line);
    color: var(--code-muted);
}
.wa-pane-body { flex: 1; min-height: 0; overflow: auto; }
.wa-lab-pane.guide .wa-pane-body { padding: 16px; }
.wa-guide-tip {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: 2px 2px 0px var(--line);
}
.wa-guide-tip b {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--neo-orange);
}

.wa-file-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: var(--bw) solid var(--code-line);
    background: var(--code-bg);
}
.wa-file-tab {
    border: 0;
    border-right: 1.5px solid var(--code-line);
    background: transparent;
    color: var(--code-muted);
    min-height: 38px;
    padding: 0 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.wa-file-tab.active {
    color: #000000;
    background: var(--neo-yellow);
    font-weight: 900;
}
.wa-editor-host { flex: 1; min-height: 0; height: 530px; }
.wa-editor-host .editorhost { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.wa-lab-preview { width: 100%; height: 100%; min-height: 460px; border: 0; background: #FFF; }

.wa-statusline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 6px 14px;
    border-top: var(--bw) solid var(--line);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
}

/* ----------------------------------------------------------------- PROJECTS */
.wa-project {
    margin-bottom: 16px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.wa-project > summary { list-style: none; cursor: pointer; }
.wa-project > summary::-webkit-details-marker { display: none; }
.wa-project-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
}
.wa-project-head:hover { background: var(--surface-2); }
.wa-project:nth-child(3n+1) .wa-project-head { background: #EBF8FF; }
.wa-project:nth-child(3n+2) .wa-project-head { background: #ECFDF5; }
.wa-project:nth-child(3n+3) .wa-project-head { background: #FFF0F5; }
.wa-project-head b {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 900;
}
.wa-project-head .level { margin-left: auto; }
.wa-project[open] .wa-project-head {
    border-bottom: var(--bw) solid var(--line);
    background: var(--neo-yellow);
    color: #000000;
}
.wa-project-intro { padding: 20px 24px; font-weight: 600; line-height: 1.6; }
.wa-step { padding: 20px 24px; border-top: var(--bw) solid var(--line); }
.wa-step:first-child { border-top: 0; }
.wa-step-title {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--neo-pink);
}

/* ----------------------------------------------------------------- GLOSSARY */
.wa-glossary-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 20px 0 28px;
}
.wa-glossletter {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 32px 0 14px;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--ink);
}
.wa-glossletter::after {
    content: "";
    flex: 1;
    height: var(--bw-thick);
    background: var(--line);
}
.wa-gloss {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.wa-kw {
    padding: 18px 20px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-kw:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-card-hover);
}
.wa-kw:nth-child(4n+1) { background: #EBF8FF; border-left: 8px solid var(--neo-blue); }
.wa-kw:nth-child(4n+2) { background: #ECFDF5; border-left: 8px solid var(--neo-mint); }
.wa-kw:nth-child(4n+3) { background: #FFF0F5; border-left: 8px solid var(--neo-pink); }
.wa-kw:nth-child(4n+4) { background: #FEFCE8; border-left: 8px solid var(--neo-yellow); }
.wa-kw b {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 900;
}

/* ----------------------------------------------------------------- NOTES (POST-IT STICKER STYLE) */
.wa-notes-layout {
    display: grid;
    grid-template-columns: minmax(0, 390px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.wa-note-editor {
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
    padding: 24px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.wa-field > label, .wa-field-label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.wa-input, .wa-textarea, .wa-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 600;
    box-shadow: 2px 2px 0px var(--line);
    outline: none;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-input:focus, .wa-textarea:focus, .wa-select:focus {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px var(--neo-yellow);
}
.wa-textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

.wa-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.wa-notecard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius);
    background: #FEF9C3; /* Yellow Post-it */
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-notecard:nth-child(4n+1) { background: #FEF9C3; border-top: 10px solid var(--neo-yellow); }
.wa-notecard:nth-child(4n+2) { background: #FFF0F5; border-top: 10px solid var(--neo-pink); }
.wa-notecard:nth-child(4n+3) { background: #ECFDF5; border-top: 10px solid var(--neo-mint); }
.wa-notecard:nth-child(4n+4) { background: #EBF8FF; border-top: 10px solid var(--neo-blue); } /* Pink */
.wa-notecard:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-card-hover);
}
.wa-notecard h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
}
.wa-note-body {
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
    font-weight: 600;
}
.wa-notecard .foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: var(--bw) dashed var(--line);
}

/* ----------------------------------------------------------------- AUTH & LOGIN VIEW */
.wa-auth-container {
    max-width: 580px;
    width: 100%;
    margin: 20px auto;
}
.wa-auth-card {
    background: var(--surface);
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    padding: 34px;
}
.wa-auth-tabs {
    display: flex;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-deep);
    margin-bottom: 24px;
    box-shadow: var(--shadow-btn);
    overflow: hidden;
}
.wa-auth-tab {
    flex: 1;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-right: var(--bw) solid var(--line);
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--ink);
    cursor: pointer;
    text-transform: uppercase;
    text-align: center;
}
.wa-auth-tab:last-child { border-right: none; }
.wa-auth-tab.active {
    background: var(--neo-yellow);
    color: #000000;
    font-weight: 900;
}
.wa-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}
.wa-label {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
}
.wa-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}
.wa-avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    background: var(--surface);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-avatar-option:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--surface-2);
}
.wa-avatar-option.active {
    background: var(--neo-yellow);
    border-color: #000000;
    box-shadow: 3px 3px 0px #000000;
    font-weight: 900;
}
.wa-avatar-opt-name {
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.1;
}

/* ----------------------------------------------------------------- MOBILE BOTTOM NAV (APK READY) */
.wa-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottombar-h);
    background: var(--surface);
    border-top: var(--bw-thick) solid var(--line);
    box-shadow: 0px -4px 0px var(--line);
    z-index: 250;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wa-bottom-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    user-select: none;
    min-height: 48px;
}
.wa-bottom-item:active {
    background: var(--surface-2);
}
.wa-bottom-item.active {
    color: #000000;
    font-weight: 900;
}
.wa-bottom-item.active .wa-ico {
    background: var(--neo-yellow);
    color: #000000;
    border: 2px solid #000000;
    border-radius: var(--radius-xs);
    box-shadow: 2px 2px 0px #000000;
    padding: 2px;
}
.wa-bottom-item:nth-child(1).active .wa-ico { background: var(--neo-yellow); }
.wa-bottom-item:nth-child(2).active .wa-ico { background: var(--neo-blue); color: #000000; }
.wa-bottom-item:nth-child(3).active .wa-ico { background: var(--neo-mint); }
.wa-bottom-item:nth-child(4).active .wa-ico { background: var(--neo-pink); }
.wa-bottom-item:nth-child(5).active .wa-ico { background: var(--neo-purple); color: #000000; }

/* ----------------------------------------------------------------- DIALOG & TOAST */
.wa-dialog {
    width: min(480px, calc(100vw - 32px));
    padding: 28px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-pop);
}
.wa-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
.wa-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 500;
    max-width: min(390px, calc(100vw - 32px));
    padding: 14px 18px;
    border: var(--bw-thick) solid #000000;
    border-radius: var(--radius);
    background: #000000;
    color: #FFFFFF;
    box-shadow: 4px 4px 0px var(--neo-yellow);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.wa-toast.show { opacity: 1; transform: none; }
.wa-toast.ok   { border-color: #000; box-shadow: 4px 4px 0px var(--neo-mint); }
.wa-toast.err  { border-color: #000; box-shadow: 4px 4px 0px var(--neo-pink); }

/* ----------------------------------------------------------------- RESPONSIVE BREAKPOINTS (APK OPTIMIZED) */
@media (max-width: 1220px) {
    .wa-main-inner { padding: 28px 24px; }
    .wa-topbar { padding: 0 24px; }
    .wa-lesson-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; }
    .wa-lab-grid { grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 1080px) {
    .wa-lab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .wa-lab-pane.guide { grid-column: 1 / -1; border-right: 0; border-bottom: var(--bw) solid var(--line); }
    .wa-notes-layout { grid-template-columns: 1fr; }
    .wa-note-editor { position: static; }
    .wa-hero { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
    .wa-hero-side { flex-direction: row; align-items: center; justify-content: space-around; }
}

@media (max-width: 980px) {
    :root { --sidebar-w: 280px; }
    .wa-sidebar {
        transform: translateX(-105%);
        box-shadow: var(--shadow-pop);
    }
    .wa-sidebar.open { transform: none; }
    .wa-main { margin-left: 0; }
    .wa-sidebar-toggle { display: inline-flex; }
    .wa-mobile-brand { display: inline-flex; }
    .wa-crumbs { display: none; }
    .wa-topbar { padding: 0 16px; }
    .wa-main-inner { padding: 22px 18px calc(var(--bottombar-h) + 24px); }
    .wa-bottom-nav { display: flex; }
    .wa-lesson-layout { grid-template-columns: 1fr; }
    .wa-lesson-rail { position: static; order: -1; }
    .wa-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wa-course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .wa-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .wa-stat { padding: 14px 16px; }
    .wa-stat-value { font-size: 2rem; }
    .wa-hero { padding: 22px 18px; }
    .wa-hero-side { flex-direction: column; }
    .wa-continue { padding: 18px 20px; }
    .wa-modgrid { grid-template-columns: 1fr; }
    .wa-course-hero { grid-template-columns: 1fr; padding: 20px; }
    .wa-course-side { padding-left: 0; border-left: 0; border-top: var(--bw) solid var(--line); padding-top: 18px; }
    .wa-course-chapter { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; }
    .wa-avatar-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .wa-auth-card { padding: 22px 18px; }
}

/* ============================================================================
   SIDEBAR & DASHBOARD SUPER NEO-BRUTALISM OVERHAUL (PINTEREST / BIG CARDS)
   ========================================================================== */

/* --- SIDEBAR QUICK LINKS (.wa-quick) --- */
.wa-quick {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
    margin-bottom: 6px;
    user-select: none;
}
.wa-quick:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--surface-2);
    color: var(--ink);
}
.wa-quick:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #000000;
}
.wa-quick.active {
    background: var(--neo-yellow);
    color: #000000;
    border-color: #000000;
    box-shadow: 3px 3px 0px #000000;
    font-weight: 900;
}
.wa-quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid #000000;
    border-radius: 6px;
    background: var(--surface-2);
    color: #000000;
    box-shadow: 1.5px 1.5px 0px #000000;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.wa-quick-label {
    flex: 1;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-quick .chev {
    margin-left: auto;
    color: var(--muted);
}

/* Distinctive Icons for Sidebar Quicklinks */
.wa-quick[data-route="lab"]:nth-of-type(1) .wa-quick-icon { background: var(--neo-orange); color: #FFF; }
.wa-quick[data-route="lab"]:nth-of-type(2) .wa-quick-icon { background: var(--neo-blue); color: #000; }
.wa-quick[data-route="lab"]:nth-of-type(3) .wa-quick-icon { background: var(--neo-pink); color: #000; }
.wa-quick[data-route="lab"]:nth-of-type(4) .wa-quick-icon { background: var(--neo-mint); color: #000; }
.wa-quick[data-route="lab"]:nth-of-type(5) .wa-quick-icon { background: var(--neo-purple); color: #FFF; }
.wa-quick[data-route="lab"]:nth-of-type(6) .wa-quick-icon { background: var(--neo-yellow); color: #000; }

.wa-quick[data-route="projects"] .wa-quick-icon { background: var(--neo-pink); color: #000; }
.wa-quick[data-route="glossary"] .wa-quick-icon { background: var(--neo-mint); color: #000; }
.wa-quick[data-route="notes"] .wa-quick-icon    { background: var(--neo-yellow); color: #000; }
.wa-quick[data-route="dashboard"] .wa-quick-icon { background: var(--neo-yellow); color: #000; }
.wa-quick[data-route="progress"] .wa-quick-icon  { background: var(--neo-cyan); color: #000; }

/* --- SIDEBAR COURSE LINKS (C++, JS) --- */
.wa-course-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border: var(--bw) solid #000000;
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    margin-bottom: 8px;
    text-decoration: none;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-course-link:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--surface-2);
}
.wa-course-link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.wa-course-link-text b {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 900;
    color: #000000;
    line-height: 1.2;
}
.wa-course-link-text span {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- SIDEBAR SECTION HEADERS (.wa-nav-group) --- */
.wa-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000000;
    background: var(--neo-yellow);
    border: 2px solid #000000;
    border-radius: var(--radius-pill);
    box-shadow: 2px 2px 0px #000000;
    padding: 3px 10px;
    width: fit-content;
    margin: 16px 0 8px;
}
.wa-nav-group:nth-of-type(1) { background: var(--neo-yellow); }
.wa-nav-group:nth-of-type(2) { background: var(--neo-orange); color: #FFFFFF; }
.wa-nav-group:nth-of-type(3) { background: var(--neo-blue); color: #000000; }
.wa-nav-group:nth-of-type(4) { background: var(--neo-mint); }
.wa-nav-group:nth-of-type(5) { background: var(--neo-pink); }

/* --- HERO STICKERS & SOCIAL PROOF --- */
.wa-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.wa-sticker-chip {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--neo-yellow);
    color: #000000;
    padding: 3px 10px;
    border: var(--bw) solid #000000;
    border-radius: var(--radius-pill);
    box-shadow: 2px 2px 0 #000000;
}
.wa-sticker-chip.cyan { background: var(--neo-cyan); }
.wa-hero-social {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}
.wa-avatar-stack {
    display: flex;
    align-items: center;
}
.wa-avatar-stack .wa-avatar-badge:not(:first-child) {
    margin-left: -10px;
}
.wa-social-note {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ink);
}

/* --- CATEGORIES PILLS BAR --- */
.wa-categories-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
    align-items: center;
}
.wa-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--pill-bg, var(--surface));
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-btn);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 900;
    color: #000000;
    text-decoration: none;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-category-pill:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-btn-hover);
}
.wa-category-pill:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #000000;
}
.wa-category-pill .cat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* --- SHOWCASE BIG CARDS (PINTEREST STYLE) --- */
.wa-bigcards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 8px 0 28px;
}
@media (max-width: 1080px) {
    .wa-bigcards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .wa-bigcards-grid { grid-template-columns: 1fr; }
}

.wa-bigcard {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 20px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
    position: relative;
    overflow: hidden;
}
.wa-bigcard:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px #000000;
}

/* Big Card Variants */
.wa-bigcard.orange {
    background: #FF6433;
    color: #FFFFFF;
}
.wa-bigcard.orange .wa-bigcard-title { color: #FFFFFF; }
.wa-bigcard.orange .wa-bigcard-desc  { color: #FFE6DF; }
.wa-bigcard.orange .wa-btn           { background: #FFFFFF; color: #000000; border-color: #000000; }

.wa-bigcard.blue {
    background: #2563EB;
    color: #FFFFFF;
}
.wa-bigcard.blue .wa-bigcard-title   { color: #FFFFFF; }
.wa-bigcard.blue .wa-bigcard-desc    { color: #DBEAFE; }
.wa-bigcard.blue .wa-btn             { background: var(--neo-yellow); color: #000000; border-color: #000000; }

.wa-bigcard.yellow {
    background: #FFD130;
    color: #000000;
}
.wa-bigcard.yellow .wa-bigcard-title { color: #000000; }
.wa-bigcard.yellow .wa-bigcard-desc  { color: #261A00; }
.wa-bigcard.yellow .wa-btn           { background: #000000; color: #FFFFFF; border-color: #000000; }

.wa-bigcard.mint {
    background: #00D09C;
    color: #000000;
}
.wa-bigcard.mint .wa-bigcard-title   { color: #000000; }
.wa-bigcard.mint .wa-bigcard-desc    { color: #022C20; }
.wa-bigcard.mint .wa-btn             { background: #FFFFFF; color: #000000; border-color: #000000; }

.wa-bigcard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.wa-bigcard-sticker {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #000000;
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}
.wa-bigcard-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    border: 1.5px solid #000000;
    box-shadow: 1.5px 1.5px 0 #000000;
}
.wa-bigcard-avatar-wrap {
    margin: 4px 0 10px;
    display: inline-block;
}
.wa-bigcard-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 6px;
}
.wa-bigcard-desc {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}
.wa-bigcard-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 2px dashed rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.wa-price-stamp, .wa-tag-pill, .wa-pill-accent, .wa-avatars-pile {
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    background: #000000;
    color: #FFE600;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

/* --- MODULE CARD BADGES & EXTRAS --- */
.wa-modcard-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.wa-level-badge {
    color: #000000;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
}
.wa-xp-badge {
    color: #000000;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    background: var(--neo-yellow);
    border: 1.5px solid #000000;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 1.5px 1.5px 0 #000000;
}

/* --- THEME SELECTOR CARDS (SETTINGS) --- */
.wa-theme-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}
@media (max-width: 640px) {
    .wa-theme-cards-grid {
        grid-template-columns: 1fr;
    }
}
.wa-theme-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    text-align: left;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast);
}
.wa-theme-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-card-hover);
}
.wa-theme-card.active {
    border-color: var(--line) !important;
    box-shadow: 0 0 0 3px var(--neo-yellow), var(--shadow-pop);
    background: var(--surface-2);
}
.wa-theme-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wa-theme-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wa-card-active-indicator {
    display: inline-block;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    background: var(--neo-mint);
    color: #000000;
    border: 1.5px solid #000000;
    border-radius: var(--radius-xs);
    box-shadow: 1.5px 1.5px 0px #000000;
    letter-spacing: 0.03em;
}
.wa-theme-card-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    margin: 4px 0 2px;
}
.wa-theme-card-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}
.wa-theme-preview {
    height: 48px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
}
.wa-theme-preview.light {
    background: #FFFDF5;
    border-color: #000000;
}
.wa-theme-preview.dark {
    background: #0E0E12;
    border-color: #FFFFFF;
}

/* --- DARK MODE CYBER-BRUTALIST REFINEMENTS --- */
[data-theme="dark"] .wa-sidebar {
    background: #14151B;
    border-right-color: #242630;
}
[data-theme="dark"] .wa-topbar {
    background: #14151B;
    border-bottom-color: #242630;
}
[data-theme="dark"] .wa-quick {
    background: #181920;
    border-color: #2E313C;
    color: #E4E4E7;
}
[data-theme="dark"] .wa-quick:hover {
    background: #21232C;
    border-color: var(--neo-yellow);
    color: #FFFFFF;
    box-shadow: 3px 3px 0px var(--neo-yellow);
}
[data-theme="dark"] .wa-quick.active {
    background: var(--neo-yellow);
    color: #000000;
    border-color: var(--neo-yellow);
}
[data-theme="dark"] .wa-nav-group {
    background: #21232C;
    color: #FFE600;
    border-color: #373A46;
}
[data-theme="dark"] .wa-hero {
    background: #181920;
    border-color: #2E313C;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
}
[data-theme="dark"] .wa-card {
    background: #181920;
    border-color: #2E313C;
}
[data-theme="dark"] .wa-btn {
    border-color: #2E313C;
}
[data-theme="dark"] .wa-btn.primary {
    background: var(--neo-yellow);
    color: #000000;
    border-color: var(--neo-yellow);
}
[data-theme="dark"] .wa-category-pill {
    border-color: #2E313C;
}
[data-theme="dark"] .wa-category-pill:hover {
    border-color: var(--neo-yellow);
    box-shadow: 4px 4px 0px var(--neo-yellow);
}

/* Big Cards in Dark Mode: Rich Glowing Surfaces */
[data-theme="dark"] .wa-bigcard.orange {
    background: #241410;
    border-color: #FF6433;
    color: #FFFFFF;
}
[data-theme="dark"] .wa-bigcard.orange .wa-bigcard-desc { color: #FFC2B3; }
[data-theme="dark"] .wa-bigcard.orange .wa-btn { background: #FF6433; color: #FFFFFF; border-color: #FF6433; }

[data-theme="dark"] .wa-bigcard.blue {
    background: #0E182A;
    border-color: #38BDF8;
    color: #FFFFFF;
}
[data-theme="dark"] .wa-bigcard.blue .wa-bigcard-desc { color: #BAE6FD; }
[data-theme="dark"] .wa-bigcard.blue .wa-btn { background: #38BDF8; color: #000000; border-color: #38BDF8; }

[data-theme="dark"] .wa-bigcard.yellow {
    background: #221C08;
    border-color: #FFE600;
    color: #FFFFFF;
}
[data-theme="dark"] .wa-bigcard.yellow .wa-bigcard-desc { color: #FEF08A; }
[data-theme="dark"] .wa-bigcard.yellow .wa-btn { background: #FFE600; color: #000000; border-color: #FFE600; }

[data-theme="dark"] .wa-bigcard.mint {
    background: #0A201A;
    border-color: #4ECCA3;
    color: #FFFFFF;
}
[data-theme="dark"] .wa-bigcard.mint .wa-bigcard-desc { color: #A7F3D0; }
[data-theme="dark"] .wa-bigcard.mint .wa-btn { background: #4ECCA3; color: #000000; border-color: #4ECCA3; }

/* --- SETTINGS PAGE COMPLETE CSS --- */
.wa-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    margin: 8px 0 32px;
}
.wa-setting {
    width: 100%;
    padding: 28px 30px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-setting-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.wa-setting-head h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
}
.wa-setting-desc {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 20px;
}
.wa-lang-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 768px) {
    .wa-lang-cards-grid {
        grid-template-columns: 1fr;
    }
}
.wa-lang-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    text-align: left;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast);
}
.wa-lang-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-btn-hover);
}
.wa-lang-card.active {
    border-color: var(--neo-mint) !important;
    box-shadow: 0 0 0 2px var(--neo-mint), var(--shadow-card);
    background: var(--surface);
}

/* Switch & Controls */
.wa-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-flat);
}
.wa-switch input { display: none; }
.wa-switch-track {
    width: 44px;
    height: 24px;
    background: var(--muted);
    border-radius: 999px;
    border: 2px solid var(--line);
    position: relative;
    transition: background var(--dur-fast);
    flex-shrink: 0;
}
.wa-switch-track::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform var(--dur-fast);
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.wa-switch input:checked + .wa-switch-track {
    background: var(--neo-mint);
}
.wa-switch input:checked + .wa-switch-track::after {
    transform: translateX(20px);
}
.wa-switch-text {
    display: flex;
    flex-direction: column;
}
.wa-switch-text b {
    font-size: 0.95rem;
    font-weight: 800;
}
.wa-switch-text span {
    font-size: 0.82rem;
    color: var(--muted);
}
.wa-data-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Definition List for Tech Specs & Settings Info */
.wa-kv {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px 18px;
    margin-top: 14px;
    padding: 18px 22px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-flat);
}
.wa-kv dt {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--ink);
    font-size: 0.92rem;
    padding-top: 4px;
}
.wa-kv dd {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
    padding-top: 4px;
    border-bottom: 1.5px dashed var(--line);
    padding-bottom: 10px;
}
.wa-kv dd:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
@media (max-width: 640px) {
    .wa-kv {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .wa-kv dd {
        padding-bottom: 12px;
    }
}

/* --- MOBILE RESPONSIVE ENHANCEMENTS --- */
@media (max-width: 980px) {
    .wa-topbar {
        height: 60px;
        padding: 0 14px;
    }
    .wa-topbar-actions {
        gap: 8px;
    }
    .wa-langswitch {
        display: none; /* Accessible in Settings on mobile */
    }
    .wa-mobile-brand {
        font-size: 1.05rem;
    }
    .wa-hero {
        margin-bottom: 24px;
        padding: 22px 16px;
    }
    .wa-categories-bar {
        margin: 0 0 20px;
        gap: 8px;
    }
    .wa-category-pill {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* --- SIDEBAR BRAND ROW & COLLAPSE (SORTIR LA SIDEBAR) --- */
.wa-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.wa-brand-row .wa-brand {
    margin-bottom: 0;
    flex: 1;
}
.wa-collapse-btn {
    width: 38px;
    height: 38px;
    background: var(--surface);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.wa-collapse-btn:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--neo-yellow);
    color: #000000;
}
.wa-collapse-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--line);
}

/* Sidebar Collapsed State (Desktop & Tablet) */
body.wa-sidebar-collapsed .wa-sidebar {
    transform: translateX(-105%) !important;
    box-shadow: none !important;
}
body.wa-sidebar-collapsed .wa-main {
    margin-left: 0 !important;
}
body.wa-sidebar-collapsed .wa-sidebar-desktop-toggle {
    display: inline-flex !important;
}
.wa-sidebar-desktop-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--neo-yellow);
    color: #000000;
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    cursor: pointer;
    transition: transform var(--dur-fast);
}
.wa-sidebar-desktop-toggle:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
}

/* --- TACTILE QUICKLINK ARROW (PETITE FLECHE) --- */
.wa-quick-arrow {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    background: rgba(0, 0, 0, 0.06);
    color: var(--ink);
    transition: transform var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
    flex-shrink: 0;
}
.wa-quick:hover .wa-quick-arrow {
    transform: translateX(3px);
    background: #000000;
    color: #FFFFFF;
}
.wa-quick.active .wa-quick-arrow {
    background: #000000;
    color: #FFE600;
}
[data-theme="dark"] .wa-quick-arrow {
    background: rgba(255, 255, 255, 0.1);
    color: #E2E4E9;
}
[data-theme="dark"] .wa-quick:hover .wa-quick-arrow {
    transform: translateX(3px);
    background: var(--neo-yellow);
    color: #000000;
}

@media (max-width: 980px) {
    .wa-collapse-btn {
        display: none;
    }
}

/* ============================================================================
   MA PROGRESSION (PROGRESS PAGE) — NEO-BRUTALIST COMPLETE STYLES
   ========================================================================== */

.wa-progress-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    margin: 0 0 40px;
}

/* 1. OVERVIEW HERO CARD */
.wa-progress-hero {
    padding: 28px 30px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.wa-progress-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.wa-progress-hero-titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wa-progress-hero-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--ink);
    margin: 4px 0 2px;
}
.wa-progress-hero-sub {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.45;
}
.wa-progress-hero-pct {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    background: var(--neo-yellow);
    color: #000000;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    flex-shrink: 0;
}
.wa-progress-big-number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}
.wa-progress-big-lbl {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Mega Progress Bar */
.wa-progress-megabar {
    width: 100%;
    height: 24px;
    background: var(--surface-3);
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-flat);
    overflow: hidden;
    position: relative;
}
.wa-progress-megabar-fill {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    background: var(--neo-yellow);
    border-right: var(--bw) solid var(--line);
    border-radius: inherit;
    padding-right: 12px;
    transition: width 600ms var(--ease);
}
.wa-progress-megabar-fill.ok {
    background: var(--neo-mint);
}
.wa-progress-megabar-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 900;
    color: #000000;
}

/* Overview Stat Row */
.wa-progress-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 768px) {
    .wa-progress-hero-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .wa-progress-hero-pct {
        align-self: flex-start;
    }
    .wa-progress-stat-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .wa-progress-stat-row {
        grid-template-columns: 1fr;
    }
}
.wa-stat-card {
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-flat);
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-stat-card:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn);
}
.wa-stat-num {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--ink);
}
.wa-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

/* 2. MODULES SECTION & CARDS GRID */
.wa-progress-mod-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wa-progress-mod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 768px) {
    .wa-progress-mod-grid {
        grid-template-columns: 1fr;
    }
}
.wa-progress-mod-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-progress-mod-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-card-hover);
}
.wa-prog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.wa-prog-card-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wa-prog-sticker {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #000000;
    border: var(--bw) solid #000000;
    border-radius: var(--radius-xs);
    box-shadow: 2px 2px 0px #000000;
    letter-spacing: 0.03em;
}
.wa-prog-sticker.orange  { background: var(--neo-orange); }
.wa-prog-sticker.blue    { background: var(--neo-blue); }
.wa-prog-sticker.indigo  { background: #818CF8; }
.wa-prog-sticker.teal    { background: var(--neo-mint); }
.wa-prog-sticker.violet  { background: var(--neo-purple); }
.wa-prog-sticker.rose    { background: var(--neo-pink); }
.wa-prog-sticker.yellow  { background: var(--neo-yellow); }

.wa-prog-mod-pct {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--ink);
}
.wa-prog-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wa-prog-mod-name {
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 900;
    color: var(--ink);
    margin: 0;
}
.wa-prog-mod-blurb {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}
.wa-prog-card-bar-wrap {
    width: 100%;
}
.wa-prog-mod-bar {
    width: 100%;
    height: 14px;
    background: var(--surface-3);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: 1.5px 1.5px 0px var(--line);
    overflow: hidden;
}
.wa-prog-mod-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 400ms var(--ease);
}
.wa-prog-mod-bar-fill.orange  { background: var(--neo-orange); }
.wa-prog-mod-bar-fill.blue    { background: var(--neo-blue); }
.wa-prog-mod-bar-fill.indigo  { background: #818CF8; }
.wa-prog-mod-bar-fill.teal    { background: var(--neo-mint); }
.wa-prog-mod-bar-fill.violet  { background: var(--neo-purple); }
.wa-prog-mod-bar-fill.rose    { background: var(--neo-pink); }
.wa-prog-mod-bar-fill.yellow  { background: var(--neo-yellow); }

.wa-prog-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1.5px dashed var(--line);
}
.wa-prog-card-status {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--muted);
}

/* 3. CHAPTERS DETAIL SECTION */
.wa-progress-chap-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wa-progress-chap-card {
    padding: 22px 24px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.wa-progress-filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: var(--bw) solid var(--line);
}
.wa-filter-btn {
    padding: 8px 16px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    color: var(--ink);
    box-shadow: var(--shadow-btn);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}
.wa-filter-btn:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn-hover);
    background: var(--neo-yellow);
    color: #000000;
}
.wa-filter-btn.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.wa-progress-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 6px;
}
.wa-progressrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-flat);
    transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.wa-progressrow:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: var(--shadow-btn);
}
.wa-progressrow-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.wa-progressrow-mod-tag {
    display: inline-block;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    border: 1.5px solid #000000;
    border-radius: var(--radius-xs);
    color: #000000;
    flex-shrink: 0;
    box-shadow: 1px 1px 0px #000000;
}
.wa-progressrow-mod-tag.orange  { background: var(--neo-orange); }
.wa-progressrow-mod-tag.blue    { background: var(--neo-blue); }
.wa-progressrow-mod-tag.indigo  { background: #818CF8; }
.wa-progressrow-mod-tag.teal    { background: var(--neo-mint); }
.wa-progressrow-mod-tag.violet  { background: var(--neo-purple); }
.wa-progressrow-mod-tag.rose    { background: var(--neo-pink); }
.wa-progressrow-mod-tag.yellow  { background: var(--neo-yellow); }

.wa-progressrow-title {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wa-progressrow-title:hover {
    text-decoration: underline;
}
.wa-progressrow-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .wa-progressrow {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .wa-progressrow-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* 4. DANGER ZONE */
.wa-danger-zone {
    margin-top: 10px;
    padding: 24px 28px;
    border: var(--bw-thick) dashed var(--err);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wa-danger-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wa-danger-head h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--err);
    margin: 0;
}
.wa-danger-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

/* 5. LEGACY FALLBACK FOR WA-MINIROW & WA-PROGRESS-OVERVIEW */
.wa-progress-overview {
    padding: 24px 28px;
    border: var(--bw-thick) solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}
.wa-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.wa-overview-head h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
}
.wa-overview-head .pct {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--ink);
}
.wa-minirow {
    display: grid;
    grid-template-columns: 180px 1fr 60px;
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    background: var(--surface);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-btn);
    margin-bottom: 10px;
}
.wa-mininame {
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--ink);
}
.wa-minicount {
    font-size: 0.84rem;
    font-family: var(--font-mono);
    color: var(--muted);
    font-weight: 700;
}
.wa-minibarcell {
    width: 100%;
}
.wa-minibar {
    height: 14px;
    background: var(--surface-3);
    border: var(--bw) solid var(--line);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.wa-minibar i {
    display: block;
    height: 100%;
    background: var(--neo-yellow);
    border-radius: inherit;
    transition: width 400ms var(--ease);
}

/* Dark theme overrides for progress */
[data-theme="dark"] .wa-prog-sticker {
    border-color: #000000;
}
[data-theme="dark"] .wa-progressrow-mod-tag {
    border-color: #000000;
}
[data-theme="dark"] .wa-filter-btn.active {
    background: var(--neo-yellow);
    color: #000000;
    border-color: var(--neo-yellow);
}
[data-theme="dark"] .wa-kv {
    background: #181920;
    border-color: #2E313C;
}
[data-theme="dark"] .wa-kv dt {
    color: #FFFFFF;
}
[data-theme="dark"] .wa-kv dd {
    color: #9CA3AF;
    border-bottom-color: #2E313C;
}
[data-theme="dark"] .wa-card-active-indicator {
    background: var(--neo-mint);
    color: #000000;
    border-color: #000000;
}
[data-theme="dark"] .wa-theme-card.active {
    border-color: var(--neo-mint) !important;
    box-shadow: 0 0 0 3px var(--neo-mint), var(--shadow-card);
}
