  :root {
    --bg2: #23133a;
    --bg3: #1f1232;
    --bg4: #3a1c6350;
    --border: #3a1c63;
    --border2: #5e309d;
    --amber: #883CF0;
    --amber-dim: #873cf06d;
    --amber-glow: #1f172f;
    --teal: #883CF0;
    --teal-dim: #1f172f;
    --red: #dc143c;
    --green: #77b255;
    --blue: #e95bf6;
    --text: #e8eaf0;
    --text-dim: #c8d6e5;
    --text-muted: #d6d6d6;
    --radius: 6px;
    --sidebar-w: 280px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  .msp-pam-training-guide {
    background: #191127;
    color: var(--text);
    position: relative;
    font-size: 15px;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ---- LAYOUT ---- */
  .shell {
    display: flex;
    min-height: 100vh;
  }

  /* ---- SIDEBAR ---- */
  .sidebar {
    width: var(--sidebar-w);
    background: #180f26;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
  }

  .sidebar::-webkit-scrollbar { width: 4px; }
  .sidebar::-webkit-scrollbar-track { background: transparent; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

  .sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
  }

  .brand-tag {
    font-size: 10px;
    color: var(--amber);
    text-transform: uppercase;
    margin-bottom: 6px;
  }

  .brand-title {
    
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
  }

  .brand-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
    
  }

  .progress-wrap {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
  }

  .progress-label {
    
    font-size: 10px;
    color: var(--text-muted);
    
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
  }

  .progress-bar {
    height: 3px;
    background: #282035;
    border-radius: 2px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a1c63, #684895);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
  }

  .nav-section {
    padding: 12px 0;
    flex: 1;
  }

  .nav-section-label {
    
    font-size: 9px;
    color: var(--text-muted);
    
    text-transform: uppercase;
    padding: 8px 20px 4px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 13px;
    position: relative;
  }

  .nav-item:hover {
    background: #23133a9f;
    color: var(--text);
    border-left-color: var(--border2);
  }

  .nav-item.active {
    background: #23133a;
    color: var(--amber);
    border-left-color: var(--amber);
  }

  .nav-item.done {
    color: var(--green);
  }

  .nav-item.done::after {
    content: '✓';
    position: absolute;
    right: 16px;
    font-size: 11px;
    color: var(--green);
  }

  .nav-num {
    
    font-size: 10px;
    color: var(--text-muted);
    min-width: 18px;
  }

  .nav-item.active .nav-num { color: var(--amber); }
  .nav-item.done .nav-num { color: var(--green); }

  /* ---- MAIN ---- */
  .main {
    /* margin-left: var(--sidebar-w); */
    flex: 1;
    height: 100vh;
    overflow-y: auto;
  }

  /* ---- HERO ---- */
  .hero {
    background: #23133a;
    border-bottom: 1px solid var(--border);
    padding: 56px 56px 48px;
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 500px; height: 500px;
    background: radial-gradient(ellipse at 80% 20%, rgba(186, 35, 245, 0.06) 0%, transparent 60%);
    pointer-events: none;
  }

  .hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
  }

  .eyebrow-badge {
    
    font-size: 10px;
    color: var(--amber);
    background: var(--amber-glow);
    border: 1px solid #3a1c63;
    padding: 4px 10px;
    border-radius: 3px;
    
    text-transform: uppercase;
  }

  .eyebrow-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border2); }

  .eyebrow-meta {
    
    font-size: 10px;
    color: var(--text-muted);
    
  }

  .hero h1 {
    
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    max-width: 720px;
  }

  .hero h1 span { color: var(--amber); }

  .hero-desc {
    margin-top: 16px;
    font-size: 15px;
    color: var(--text-dim);
    max-width: 600px;
    line-height: 1.7;
  }

  .hero-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 36px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 640px;
  }

  .hero-meta-item {
    background: var(--bg3);
    padding: 14px 18px;
  }

  .hero-meta-label {
    
    font-size: 9px;
    color: var(--text-muted);
    
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .hero-meta-value {
    
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
  }

  /* ---- CONTENT AREA ---- */
  .content {
    padding: 48px 56px;
    max-width: 1000px;
  }

  /* ---- MODULE HEADER ---- */
  .module {
    margin-bottom: 64px;
    scroll-margin-top: 24px;
  }

  .module-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }

  .module-number {
    
    font-size: 11px;
    color: var(--amber);
    background: var(--amber-glow);
    border: 1px solid #3a1c63;
    padding: 6px 10px;
    border-radius: 4px;
    
    white-space: nowrap;
    margin-top: 2px;
  }

  .module-title-area h2 {
    
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
  }

  .module-title-area p {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 5px;
  }

  /* ---- CARDS ---- */
  .card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s;
  }

  .card:hover { border-color: var(--border2); }

  .card-icon {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .card h3 {
    
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
  }

  .card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
  }

  .card-accent { border-top: 2px solid var(--amber); }
  .card-accent-teal { border-top: 2px solid var(--teal); }
  .card-accent-blue { border-top: 2px solid var(--blue); }
  .card-accent-red { border-top: 2px solid var(--red); }

  /* ---- CALLOUT ---- */
  .callout {
    border-left: 3px solid var(--amber);
    background: var(--amber-glow);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
  }

  .callout-tip { border-left-color: var(--teal); background: var(--teal-dim); }
  .callout-warn { border-left-color: var(--red); background: #1f1232; }

  .callout-label {
    
    font-size: 9px;
    
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--amber);
  }

  .callout-tip .callout-label { color: var(--teal); }
  .callout-warn .callout-label { color: var(--red); }

  .callout p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
  }

  /* ---- SECTION PROSE ---- */
  .prose h3 {
    
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 10px;
  }

  .prose p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 14px;
  }

  .prose ul {
    list-style: none;
    margin: 8px 0 16px;
    padding: 0;
  }

  .prose ul li {
    font-size: 13.5px;
    color: var(--text-dim);
    padding: 5px 0 5px 20px;
    position: relative;
    line-height: 1.6;
  }

  .prose ul li::before {
    content: '›';
    position: absolute;
    left: 4px;
    color: var(--amber);
    font-weight: 700;
  }

  /* ---- TABS ---- */
  .tabs {
    margin: 24px 0;
  }

  .tab-bar {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
  }

  .tab-btn {
    
    font-size: 11px;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    text-transform: uppercase;
  }

  .tab-btn:hover { color: var(--text-dim); }
  .tab-btn.active { color: var(--amber); border-bottom-color: var(--amber); }

  .tab-panel {
    display: none;
    padding: 24px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .tab-panel.active { display: block; }

  /* ---- CHECKLIST ---- */
  .checklist {
    margin: 16px 0;
  }

  .checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid transparent;
  }

  .checklist-item:hover { background: var(--bg3); }

  .checklist-item.checked {
    background: #77b25520;
    border-color: rgba(76,175,128,0.2);
  }

  .check-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border2);
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 11px;
    color: transparent;
  }

  .checklist-item.checked .check-box {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
  }

  .check-label {
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.5;
  }

  .checklist-item.checked .check-label {
    color: var(--text-muted);
    text-decoration: line-through;
  }

  .check-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    
  }

  /* ---- TABLE ---- */
  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 16px 0;
  }

  .data-table th {
    
    font-size: 10px;
    
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    background: var(--bg3);
    font-weight: 500;
  }

  .data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    vertical-align: top;
  }

  .data-table tr:last-child td { border-bottom: none; }
  .data-table tr:hover td { background: var(--bg3); }

  .tier-badge {
    display: inline-block;
    
    font-size: 9px;
    
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
  }

  .tier-essential { background: #1f12323c; color: var(--blue); }
  .tier-advanced { background: #68489531; color: var(--amber); }
  .tier-elite { background: #77b25520; color: var(--teal); }

  /* ---- PIPELINE ---- */
  .pipeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 24px 0;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .pipe-step {
    flex: 1;
    min-width: 120px;
  }

  .pipe-head {
    display: flex;
    align-items: center;
  }

  .pipe-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg3);
    border: 2px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 12px;
    font-weight: 600;
    color: var(--amber);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
  }

  .pipe-line {
    flex: 1;
    height: 2px;
    background: var(--border2);
    margin-top: 17px;
  }

  .pipe-step:last-child .pipe-line { display: none; }

  .pipe-body {
    padding: 12px 4px 0;
  }

  .pipe-title {
    
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
  }

  .pipe-sub {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
  }

  /* ---- CODE BLOCK ---- */
  .code-block {
    background: #0f0818;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
    overflow-x: auto;
    margin: 16px 0;
    position: relative;
  }

  .code-block .kw { color: var(--amber); }
  .code-block .str { color: var(--teal); }
  .code-block .cm { color: var(--text-muted); }
  .code-block .val { color: var(--blue); }

  .code-label {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 9px;
    color: var(--text-muted);
    
    text-transform: uppercase;
  }

  /* ---- REPORT TEMPLATE ---- */
  .report-template {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 20px 0;
  }

  .report-header {
    background: var(--bg3);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .report-title {
    
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
  }

  .report-date {
    
    font-size: 11px;
    color: var(--text-muted);
  }

  .report-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
  }

  .report-kpi {
    background: var(--bg2);
    padding: 16px 20px;
    text-align: center;
  }

  .report-kpi-val {
    
    font-size: 26px;
    font-weight: 800;
    color: var(--amber);
  }

  .report-kpi-label {
    
    font-size: 9px;
    color: var(--text-muted);
    
    text-transform: uppercase;
    margin-top: 4px;
  }

  .report-section-head {
    padding: 14px 24px;
    background: var(--bg3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    
    font-size: 10px;
    
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .report-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
  }

  .report-row:last-child { border-bottom: none; }

  .report-row .col1 { color: var(--text-dim); }
  .report-row .col2 { color: var(--text-muted);  font-size: 12px; }
  .report-row .status-ok { color: var(--green);  font-size: 12px; }
  .report-row .status-warn { color: var(--amber);  font-size: 12px; }

  /* ---- STAT ROW ---- */
  .stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
  }

  .stat-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-align: center;
  }

  .stat-num {
    
    font-size: 32px;
    font-weight: 800;
    color: var(--amber);
  }

  .stat-label {
    
    font-size: 10px;
    color: var(--text-muted);
    
    text-transform: uppercase;
    margin-top: 6px;
  }

  /* ---- EXPAND ---- */
  .expand-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 10px 0;
    overflow: hidden;
  }

  .expand-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg2);
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
  }

  .expand-trigger:hover { background: var(--bg3); }

  .expand-trigger-title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .expand-tag {
    
    font-size: 9px;
    color: var(--text-muted);
    background: var(--bg4);
    padding: 2px 7px;
    border-radius: 3px;
    
    text-transform: uppercase;
  }

  .expand-arrow {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s;
  }

  .expand-block.open .expand-arrow { transform: rotate(180deg); }

  .expand-body {
    display: none;
    padding: 18px;
    background: #2a1647;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
  }

  .expand-block.open .expand-body { display: block; }

  /* ---- COMPLETE BTN ---- */
  .module-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 11px 20px;
    background: transparent;
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    color: var(--text-dim);
    
    font-size: 11px;
    
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
  }

  .module-complete-btn:hover {
    border-color: var(--green);
    color: var(--green);
    background: #1f1232;
  }

  .module-complete-btn.completed {
    border-color: var(--green);
    color: var(--green);
    background: #23133a;
  }

  /* ---- FOOTER ---- */
  .footer {
    padding: 32px 56px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    font-size: 10px;
    color: var(--text-muted);
    
  }

  /* ---- RESPONSIVE ---- */
  @media (max-width: 900px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .content { padding: 32px 24px; }
    .hero { padding: 36px 24px; }
    .card-grid { grid-template-columns: 1fr; }
    .hero-meta-grid { grid-template-columns: 2fr 2fr; }
    .report-kpi-row { grid-template-columns: 1fr 1fr; }
    .stat-row { grid-template-columns: 1fr; }
  }

  /* ---- ANIMATIONS ---- */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .module { animation: fadeUp 0.4s ease both; }
  .module:nth-child(2) { animation-delay: 0.05s; }
  .module:nth-child(3) { animation-delay: 0.1s; }
  .module:nth-child(4) { animation-delay: 0.15s; }
  .module:nth-child(5) { animation-delay: 0.2s; }
  .module:nth-child(6) { animation-delay: 0.25s; }
  .module:nth-child(7) { animation-delay: 0.3s; }

  /* highlight active pill */
  .pill {
    display: inline-block;
    
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    
    text-transform: uppercase;
  }
  .pill-green { background: #77b25520; color: var(--green); }
  .pill-amber { background: var(--amber-glow); color: var(--amber); }
  .pill-blue { background: #1f172f; color: var(--blue); }
  .pill-red { background: #dc143c2b; color: var(--red); }

  strong { color: var(--text); font-weight: 500; }

  .inline-code {
    
    font-size: 11px;
    background: var(--bg4);
    color: var(--teal);
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid var(--border);
  }


/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #873cf015; }
::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }