      /* ============================================================
         Design premium compartilhado — todos os módulos
         Scoped: body[data-module]
         Zero impacto nos demais módulos
         ============================================================ */

      /* ---- Variáveis da paleta -------------------------------- */
      body[data-module] {
        --bg-page:        #09090f;
        --bg-card:        #0d1117;
        --bg-card-alt:    #111827;
        --bg-step-bar:    #0f1520;
        --border-subtle:  rgba(255, 255, 255, 0.07);
        --border-medium:  rgba(255, 255, 255, 0.12);
        --accent-blue:    #0ea5e9;
        --accent-cyan:    #22d3ee;
        --accent-dot:     #38bdf8;
        --text-primary:   #f1f5f9;
        --text-secondary: #94a3b8;
        --text-muted-p:   #475569;
        --check-color:    #0ea5e9;
        --link-color:     #38bdf8;
      }

      /* ---- Reset de containers globais ----------------------- */
      body[data-module] .module-page { padding-top: 0; }
      body[data-module] .container--narrow {
        max-width: none;
        padding: 0;
        margin: 0;
      }

      /* ---- Gradiente de fundo -------------------------------- */
      body[data-module] .module-layout::before {
        content: '';
        position: fixed;
        top: 0; left: 0;
        width: 55vw; height: 55vh;
        background: radial-gradient(ellipse at 0% 0%,
          rgba(14,165,233,0.06) 0%, transparent 65%);
        pointer-events: none;
        z-index: 0;
      }

      /* ============================================================
         LAYOUT PRINCIPAL (2 colunas)
         ============================================================ */
      .module-layout {
        display: flex;
        gap: 32px;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 24px 80px;
        align-items: flex-start;
        position: relative;
      }

      body[data-module] .module-main {
        flex: 1;
        min-width: 0;
        position: relative;
        z-index: 1;
      }

      body[data-module] .module-sidebar {
        width: 320px;
        flex-shrink: 0;
        position: sticky;
        top: calc(var(--header-height) + 16px);
        max-height: calc(100vh - var(--header-height) - 32px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.07) transparent;
        z-index: 1;
      }

      /* ============================================================
         MODULE HEADER
         ============================================================ */
      .module-header-premium {
        padding: 0 0 32px;
      }

      .module-breadcrumb {
        font-size: 12px;
        color: var(--text-muted-p);
        letter-spacing: 0.02em;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 0;
      }

      .module-breadcrumb a {
        color: var(--text-secondary);
        text-decoration: none;
        transition: color 0.15s;
      }
      .module-breadcrumb a:hover { color: var(--accent-cyan); }

      .module-breadcrumb-sep {
        margin: 0 6px;
        color: var(--text-muted-p);
        opacity: 0.5;
      }

      .module-header-body {
        display: flex;
        align-items: flex-start;
        gap: 28px;
      }

      /* ---- Hexágono com Tux ---------------------------------- */
      .tux-hex-wrapper {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
        position: relative;
        filter: drop-shadow(0 0 14px rgba(14,165,233,0.35));
      }

      .tux-hex-border {
        position: absolute;
        inset: -2px;
        clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
        background: linear-gradient(145deg, #0ea5e9, rgba(14,165,233,0.25));
        width: 124px;
        height: 124px;
      }

      .tux-hex {
        position: relative;
        width: 120px;
        height: 120px;
        clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
        background: linear-gradient(145deg, #0f2744, #0a1628);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
        overflow: hidden;
      }

      .tux-hex svg {
        width: 70px;
        height: 80px;
      }

      /* ---- Header texto -------------------------------------- */
      .module-header-text { flex: 1; min-width: 0; }

      /* ---- Badges ------------------------------------------- */
      .badge-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 14px;
      }

      .badge {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        padding: 4px 10px;
        border-radius: 4px;
        border: 1px solid;
      }

      .badge-iniciante {
        color: #34d399;
        border-color: rgba(52,211,153,0.35);
        background: rgba(52,211,153,0.08);
      }

      .badge-fundamental {
        color: var(--accent-blue);
        border-color: rgba(14,165,233,0.35);
        background: rgba(14,165,233,0.08);
      }

      .badge-progresso {
        color: var(--text-secondary);
        border-color: var(--border-subtle);
        background: transparent;
      }

      .badge-progresso strong { color: var(--accent-cyan); }

      /* ---- Título e subtítulo -------------------------------- */
      .module-title {
        font-family: 'Space Grotesk', 'Syne', sans-serif;
        font-size: clamp(36px, 5vw, 56px);
        font-weight: 800;
        color: var(--text-primary);
        line-height: 1.05;
        letter-spacing: -0.02em;
        margin: 0 0 10px;
      }

      .module-subtitle {
        font-size: 15px;
        color: var(--text-secondary);
        line-height: 1.6;
        max-width: 560px;
        margin: 0;
      }

      /* ============================================================
         STEP NAVIGATION BAR
         ============================================================ */
      .step-nav {
        display: flex;
        background: var(--bg-step-bar);
        border: 1px solid var(--border-subtle);
        border-radius: 10px;
        padding: 0 4px;
        margin: 28px 0 36px;
        overflow-x: auto;
        scrollbar-width: none;
      }
      .step-nav::-webkit-scrollbar { display: none; }

      .step-item {
        display: flex;
        flex-direction: column;
        padding: 14px 20px;
        cursor: pointer;
        position: relative;
        min-width: 110px;
        border: none;
        border-bottom: 2px solid transparent;
        background: none;
        text-align: left;
        transition: border-color 0.2s, background 0.15s;
        margin-bottom: -1px;
      }

      .step-item + .step-item::before {
        content: '';
        position: absolute;
        left: 0; top: 20%; bottom: 20%;
        width: 1px;
        background: var(--border-subtle);
      }

      .step-item:hover { background: rgba(255,255,255,0.03); }
      .step-item:hover .step-label { color: var(--text-primary); }

      .step-item:focus-visible {
        outline: 2px solid var(--accent-blue);
        outline-offset: -2px;
        border-radius: 8px 8px 0 0;
      }

      .step-number {
        font-size: 11px;
        font-weight: 700;
        font-family: 'IBM Plex Mono', monospace;
        color: var(--text-muted-p);
        margin-bottom: 4px;
        letter-spacing: 0.04em;
        transition: color 0.15s;
      }

      .step-label {
        font-size: 12px;
        color: var(--text-muted-p);
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 130px;
        transition: color 0.15s;
      }

      .step-item.active {
        border-bottom-color: var(--accent-blue);
      }
      .step-item.active .step-number { color: var(--accent-blue); }
      .step-item.active .step-label  { color: var(--text-primary); font-weight: 500; }

      .step-item.done .step-number { color: #34d399; }
      .step-item.done .step-number::after { content: ' ✓'; }
      .step-item.done .step-label  { color: var(--text-secondary); }

      /* ============================================================
         SEÇÕES DE CONTEÚDO
         ============================================================ */
      body[data-module] .content-section {
        padding: 40px 0 36px;
        border-bottom: 1px solid var(--border-subtle);
        scroll-margin-top: calc(var(--header-height) + 16px);
      }

      body[data-module] .flashcards-section,
      body[data-module] .quiz-section {
        padding: 40px 0 36px;
        border-bottom: 1px solid var(--border-subtle);
      }

      body[data-module] .section-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        margin-bottom: 28px;
      }

      .section-kicker {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--accent-cyan);
        font-family: 'IBM Plex Mono', monospace;
        margin: 0 0 8px;
        display: block;
      }

      body[data-module] .section-header h2 {
        font-family: 'Space Grotesk', 'Syne', sans-serif;
        font-size: 28px;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0;
        letter-spacing: -0.01em;
        line-height: 1.2;
      }

      /* ---- Layout texto + diagrama (seção 1) ----------------- */
      .section-text-diagram {
        display: flex;
        gap: 36px;
        align-items: flex-start;
      }
      .section-text-content { flex: 1; min-width: 0; }
      .section-diagram-wrap { flex-shrink: 0; width: 220px; }

      /* ---- Cards de conteúdo --------------------------------- */
      body[data-module] .card {
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-left: 3px solid var(--accent-blue);
        border-radius: 0 8px 8px 0;
        padding: 22px 26px;
        margin-bottom: 14px;
      }

      body[data-module] .card:last-child { margin-bottom: 0; }

      body[data-module] .card-analogy {
        background: rgba(251,191,36,0.04);
        border-color: rgba(251,191,36,0.12);
        border-left-color: #f59e0b;
      }

      body[data-module] .card-warning {
        background: rgba(248,113,113,0.04);
        border-color: rgba(248,113,113,0.12);
        border-left-color: #f87171;
      }

      body[data-module] .card-example {
        background: rgba(34,211,238,0.03);
        border-color: rgba(34,211,238,0.10);
        border-left-color: var(--accent-cyan);
      }

      body[data-module] .card-summary {
        background: rgba(14,165,233,0.04);
        border-color: rgba(14,165,233,0.12);
        border-left-color: var(--accent-blue);
      }

      /* Label interna dos cards */
      body[data-module] .card-label {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--accent-cyan);
        font-family: 'IBM Plex Mono', monospace;
        margin-bottom: 14px;
      }

      body[data-module] .card-label::before {
        content: '';
        display: inline-block;
        width: 7px; height: 7px;
        background: var(--accent-cyan);
        border-radius: 2px;
        flex-shrink: 0;
      }

      body[data-module] .card-analogy .card-label {
        color: #f59e0b;
      }
      body[data-module] .card-analogy .card-label::before { background: #f59e0b; }

      body[data-module] .card-warning .card-label {
        color: #f87171;
      }
      body[data-module] .card-warning .card-label::before { background: #f87171; }

      body[data-module] .card-example .card-label { color: var(--accent-cyan); }
      body[data-module] .card-summary .card-label { color: var(--accent-blue); }
      body[data-module] .card-summary .card-label::before { background: var(--accent-blue); }

      /* Bullets com ✓ */
      body[data-module] .card ul {
        list-style: none;
        padding: 0;
        margin: 10px 0 0;
      }

      body[data-module] .card li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 5px 0;
        font-size: 14.5px;
        color: var(--text-secondary);
        line-height: 1.5;
        margin-top: 0;
      }

      body[data-module] .card li::before {
        content: '✓';
        color: var(--check-color);
        font-size: 12px;
        font-weight: 700;
        margin-top: 3px;
        flex-shrink: 0;
      }

      body[data-module] .card p {
        font-size: 14.5px;
        color: var(--text-secondary);
        line-height: 1.65;
        margin: 0 0 10px;
      }
      body[data-module] .card p:last-child { margin-bottom: 0; }

      body[data-module] .card a { color: var(--link-color); }

      /* Card Conceito-chave (analogia): ícone de lâmpada */
      body[data-module] .card-analogy .card-label::before {
        content: '';
        background: #f59e0b;
      }

      /* Key concept card */
      .key-concept-card {
        display: flex;
        gap: 16px;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: 10px;
        padding: 20px 22px;
        margin-top: 20px;
      }

      .key-concept-icon {
        width: 40px; height: 40px;
        flex-shrink: 0;
        background: rgba(14,165,233,0.1);
        border: 1px solid rgba(14,165,233,0.25);
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        font-size: 18px;
      }

      .key-concept-body {}

      .key-concept-title {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        color: var(--text-secondary);
        margin: 0 0 7px;
      }

      .key-concept-text {
        font-size: 14px;
        color: var(--text-secondary);
        line-height: 1.6;
        margin: 0;
      }

      /* Blockquote */
      body[data-module] .editorial-quote {
        border-left: 3px solid rgba(14,165,233,0.4);
        padding: 12px 18px;
        margin: 14px 0;
        color: var(--text-secondary);
        font-style: italic;
        font-size: 14px;
        background: rgba(14,165,233,0.03);
        border-radius: 0 6px 6px 0;
      }

      /* ============================================================
         SIDEBAR CARDS
         ============================================================ */
      .sidebar-card {
        background: var(--bg-card-alt);
        border: 1px solid var(--border-subtle);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 14px;
      }

      .sidebar-card:last-child { margin-bottom: 0; }

      .sidebar-card-title {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--text-muted-p);
        margin: 0 0 16px;
      }

      /* ---- Card progresso ------------------------------------ */
      .progress-ring-wrapper {
        display: flex;
        justify-content: center;
        margin-bottom: 14px;
      }

      /* O texto SVG do anel mantém classe .lm-ring-pct para o JS */
      .lm-ring-fill {
        transition: stroke-dashoffset 0.5s ease;
      }

      .progress-meta {
        display: flex;
        flex-direction: column;
        gap: 7px;
        font-size: 12.5px;
        color: var(--text-secondary);
        margin-bottom: 16px;
      }

      .progress-meta-item {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .progress-done-count { color: var(--accent-blue); font-weight: 600; }

      .btn-continue {
        display: block;
        width: 100%;
        padding: 11px 16px;
        background: var(--accent-blue);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-align: center;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s, transform 0.1s;
      }

      .btn-continue:hover  { background: #0284c7; text-decoration: none; }
      .btn-continue:active { transform: scale(0.98); }
      .btn-continue:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }

      /* ---- Card tópicos -------------------------------------- */
      .lesson-topics {
        list-style: none;
        padding: 0;
        margin: 0;
      }

      .lesson-topic-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 6px;
        font-size: 13px;
        color: var(--text-secondary);
        border-bottom: 1px solid var(--border-subtle);
        text-decoration: none;
        transition: color 0.15s;
        cursor: pointer;
      }

      .lesson-topic-item:last-child { border-bottom: none; }
      .lesson-topic-item:hover { color: var(--text-primary); text-decoration: none; }
      .lesson-topic-item:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; border-radius: 4px; }

      .topic-radio {
        width: 16px; height: 16px;
        border-radius: 50%;
        border: 1.5px solid var(--text-muted-p);
        flex-shrink: 0;
        margin-top: 2px;
        transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
      }

      .lesson-topic-item.done .topic-radio {
        background: var(--accent-blue);
        border-color: var(--accent-blue);
        box-shadow: inset 0 0 0 3px var(--bg-card-alt);
      }

      .topic-label { line-height: 1.4; }

      .lesson-topic-item.done .topic-label {
        color: var(--text-muted-p);
        text-decoration: line-through;
        text-decoration-color: var(--text-muted-p);
      }

      /* ---- Card tempo ---------------------------------------- */
      .time-card-content {
        display: flex;
        align-items: center;
        gap: 14px;
      }

      .time-icon {
        width: 44px; height: 44px;
        border-radius: 50%;
        border: 1.5px solid var(--border-medium);
        display: flex; align-items: center; justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
      }

      .time-value {
        font-family: 'Space Grotesk', 'Syne', sans-serif;
        font-size: 26px;
        font-weight: 700;
        color: var(--text-primary);
        line-height: 1;
        margin: 0 0 3px;
      }

      .time-desc {
        font-size: 11px;
        color: var(--text-muted-p);
        margin: 0;
      }

      /* ============================================================
         BOTÕES ANTERIOR / PRÓXIMO (step nav)
         ============================================================ */
      .module-nav-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-top: 40px;
        padding-top: 24px;
        border-top: 1px solid var(--border-subtle);
      }

      .step-counter-label {
        font-size: 12px;
        color: var(--text-muted-p);
        font-family: 'IBM Plex Mono', monospace;
        white-space: nowrap;
      }

      .btn-nav {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 11px 22px;
        border-radius: 8px;
        font-size: 13.5px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, transform 0.15s, opacity 0.15s;
        text-decoration: none;
        border: none;
      }

      .btn-nav-prev {
        background: transparent;
        border: 1px solid var(--border-medium);
        color: var(--text-secondary);
      }

      .btn-nav-prev:hover:not(:disabled) {
        background: rgba(255,255,255,0.05);
        color: var(--text-primary);
        text-decoration: none;
      }

      .btn-nav-prev:disabled {
        opacity: 0.3;
        cursor: not-allowed;
      }

      .btn-nav-next {
        background: var(--accent-blue);
        color: #fff;
      }

      .btn-nav-next:hover {
        background: #0284c7;
        transform: translateX(2px);
        text-decoration: none;
      }

      .btn-nav-prev:focus-visible,
      .btn-nav-next:focus-visible {
        outline: 2px solid var(--accent-cyan);
        outline-offset: 2px;
      }

      /* Nav de módulos (kept for main.js, hidden visually) */
      body[data-module] .module-nav { display: none; }

      /* ============================================================
         mark-studied override
         ============================================================ */
      body[data-module] .mark-studied {
        flex-shrink: 0;
        padding: 8px 14px;
        border-radius: 6px;
        border: 1px solid var(--border-medium);
        background: transparent;
        color: var(--text-muted-p);
        font-size: 11px;
        font-family: 'IBM Plex Mono', monospace;
        cursor: pointer;
        transition: border-color 0.15s, color 0.15s, background 0.15s;
        white-space: nowrap;
      }

      body[data-module] .mark-studied:hover,
      body[data-module] .mark-studied.studied {
        border-color: rgba(14,165,233,0.45);
        color: var(--accent-blue);
        background: rgba(14,165,233,0.06);
      }

      /* ============================================================
         RESPONSIVO
         ============================================================ */
      @media (max-width: 960px) {
        .module-layout {
          flex-direction: column-reverse;
          padding: 24px 20px 64px;
        }

        body[data-module] .module-sidebar {
          width: 100%;
          position: static;
          max-height: none;
          overflow-y: visible;
          display: flex;
          flex-wrap: wrap;
          gap: 12px;
        }

        .sidebar-card { flex: 1; min-width: 200px; margin-bottom: 0; }
        .module-title { font-size: clamp(32px, 6vw, 44px); }
      }

      @media (max-width: 680px) {
        .section-text-diagram { flex-direction: column; }
        .section-diagram-wrap { width: 100%; }
        .module-layout { padding: 20px 16px 56px; }
        .module-header-body { flex-direction: column; gap: 20px; }
        .tux-hex-wrapper { width: 90px; height: 90px; }
        .tux-hex { width: 90px; height: 90px; }
        .tux-hex-border { width: 94px; height: 94px; }
        .step-item { min-width: 80px; padding: 10px 12px; }
        .step-label { display: none; }
        body[data-module] .module-sidebar { flex-direction: column; }
        .sidebar-card { flex: none; width: 100%; }
      }

      @media (prefers-reduced-motion: reduce) {
        .lm-ring-fill { transition: none; }
        .btn-nav-next:hover { transform: none; }
      }
