  :root {
    --bg-deep: #060b14;
    --bg-panel: #23133a;
    --bg-card: #23133a;
    --bg-highlight: #1f1232;
    --border: #3a1c63;
    --border-bright: #5e309d;
    --accent-primary: #883CF0;
    --accent-secondary: #af62c8;
    --accent-green: #00e5a0;
    --accent-amber: #7b5ea7;
    --accent-red: #ff4466;
    --text-primary: #e8f4ff;
    --text-secondary: #c8d6e5;
    --text-muted: #d6d6d6;
    --text-code: #d6d6d6;
    --glow-primary: 0 0 20px #be52e50f;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  .rdp-proxy-training-guide {
    background: #191127;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    height:100vh;
  }

  /* ── SCANLINE OVERLAY ── */
  .rdp-proxy-training-guide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
    pointer-events: none;
    z-index: 0;
  }

  /* ── HEADER ── */
  .rdp-proxy-training-guide header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #180f26;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
  }

  .header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), #684895);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    box-shadow: var(--glow-primary);
  }

  .brand-text {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
  }

  .brand-sub {
    font-size: 11px;
    color: var(--text-muted);
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .progress-ring {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
  }

  .progress-ring svg { transform: rotate(-90deg); }
  .progress-ring circle { transition: stroke-dashoffset 0.5s ease; }

  .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
  }

  .badge-technical { color: var(--accent-primary); border-color: var(--accent-primary); background: #1f1232; }
  .badge-advanced { color: var(--accent-amber); border-color: var(--accent-amber); background: #1f1232; }

  /* ── HERO ── */
  .hero {
    padding: 80px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
  }

  .hero::after {
    content: 'RDP_PROXY';
    position: absolute;
    right: 40px;
    top: 50px;
    font-size: 120px;
    font-weight: 700;
    color: rgba(255, 0, 238, 0.03);
    pointer-events: none;
    line-height: 1;
  }

  .hero-eyebrow {
    font-size: 11px;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: var(--accent-primary);
  }

  h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-primary);
    max-width: 700px;
    margin-bottom: 24px;
  }

  h1 span { color: var(--accent-primary); }

  .hero-desc {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.75;
  }

  .hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
  }

  .stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
  }

  .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  /* ── NAV TABS ── */
  .nav-strip {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 1;
    background: #180f26;
    backdrop-filter: blur(12px);
  }

  .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-inner::-webkit-scrollbar { display: none; }

  .nav-tab {
    padding: 16px 24px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
  }

  .nav-tab:hover { color: var(--text-secondary); }

  .nav-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
  }

  .nav-tab .tab-num {
    font-size: 10px;
    opacity: 0.5;
  }

  .nav-tab .tab-done {
    width: 14px; height: 14px;
    background: var(--accent-green);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #000;
    font-weight: 700;
  }

  .nav-tab.done .tab-done { display: flex; }
  .nav-tab.done .tab-num { display: none; }

  /* ── MAIN LAYOUT ── */
  .main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
  }

  /* ── SECTIONS ── */
  .section { display: none; }
  .section.active { display: block; animation: fadeUp 0.3s ease; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── SECTION HEADERS ── */
  .section-header {
    margin-bottom: 40px;
  }

  .section-num {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
  }

  h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
  }

  h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
  }

  .section-desc { color: var(--text-secondary); max-width: 700px; }

  /* ── CARDS ── */
  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
  }

  .card:hover { border-color: var(--border-bright); }

  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
  }

  /* ── NETWORK DIAGRAMS ── */
  .diagram-container {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
  }

  .diagram-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(0,200,255,0.04) 0%, transparent 70%);
    pointer-events: none;
  }

  .diagram-label {
    font-size: 10px;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .diagram-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
  }

  /* Inline SVG diagrams */
  .network-svg {
    width: 100%;
    height: auto;
    display: block;
  }

  /* ── CODE BLOCKS ── */
  .code-block {
    background: #0f0818;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.8;
    color: #c8e6ff;
    overflow-x: auto;
    position: relative;
  }

  .code-block .comment { color: var(--text-muted); }
  .code-block .key { color: var(--accent-primary); }
  .code-block .val { color: var(--accent-green); }
  .code-block .str { color: var(--accent-amber); }
  .code-block .kw { color: #c792ea; }

  .code-label {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--text-muted);
  }

  /* ── STEPS ── */
  .steps {
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .step {
    display: flex;
    gap: 24px;
    position: relative;
  }

  .step::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 50px;
    bottom: 0;
    width: 1px;
    background: var(--border);
  }

  .step:last-child::before { display: none; }

  .step-num {
    counter-increment: step;
    flex-shrink: 0;
    width: 40px; height: 40px;
    background: var(--bg-highlight);
    border: 1px solid var(--border-bright);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 4px;
  }

  .step.completed .step-num {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #000;
  }

  .step-content {
    padding-bottom: 32px;
    flex: 1;
  }

  .step-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
  }

  .step-title:hover { color: var(--accent-primary); }

  .step-body {
    color: var(--text-secondary);
    font-size: 14px;
  }

  /* ── TOGGLE STEPS ── */
  .step-collapsible .step-body { display: none; }
  .step-collapsible.open .step-body { display: block; }
  .step-toggle { font-size: 16px; color: var(--text-muted); transition: transform 0.2s; }
  .step-collapsible.open .step-toggle { transform: rotate(180deg); }

  /* ── ALERTS ── */
  .alert {
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 14px;
  }

  .alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
  .alert-body { flex: 1; }
  .alert-title { font-weight: 600; margin-bottom: 4px; }

  .alert-warning {
    background: rgba(255,184,0,0.08);
    border: 1px solid rgba(255,184,0,0.3);
    color: #ffd666;
  }

  .alert-info {
    background: #1f1232;
    border: 1px solid #3a1c63;
    color: #e9f0f4;
  }

  .alert-danger {
    background: rgba(255,68,102,0.08);
    border: 1px solid rgba(255,68,102,0.3);
    color: #ff8099;
  }

  .alert-success {
    background: rgba(0,229,160,0.08);
    border: 1px solid rgba(0,229,160,0.3);
    color: #66ffcc;
  }

  /* ── TABLES ── */
  .tbl-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin: 20px 0;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
  }

  thead th {
    background: #883cf050;
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
  }

  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover td { background: #1f1232; }

  td code {
    font-size: 12px;
    color: var(--accent-green);
    background: #291a3e;
    padding: 2px 6px;
    border-radius: 4px;
  }

  /* ── CHECKLIST ── */
  .checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
  }

  .check-item:hover { border-color: var(--border-bright); }

  .check-box {
    width: 20px; height: 20px;
    flex-shrink: 0;
    border: 2px solid var(--border-bright);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
  }

  .check-item.checked .check-box {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #000;
    font-size: 12px;
    font-weight: 700;
  }

  .check-item.checked .check-text { text-decoration: line-through; opacity: 0.5; }

  .check-text { color: var(--text-secondary); font-size: 14px; flex: 1; }
  .check-label { font-weight: 600; color: var(--text-primary); display: block; margin-bottom: 2px; font-size: 14px; }

  /* ── PILLS / TAGS ── */
  .pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
  }

  .pill-green { background: #23133a; color: var(--accent-green); }
  .pill-amber { background: rgba(255,184,0,0.15); color: var(--accent-amber); }
  .pill-red { background: rgba(255,68,102,0.15); color: var(--accent-red); }
  .pill-blue { background: #23133a; color: var(--accent-primary); }

  /* ── PORT TABLE INDICATORS ── */
  .port-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: pulse 2s infinite;
  }

  .port-dot.active { background: var(--accent-green); }
  .port-dot.secure { background: var(--accent-primary); }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  /* ── AUDIT VIEWER ── */
  .audit-player {
    background: #0f0414;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }

  .audit-toolbar {
    background: var(--bg-highlight);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
  }

  .audit-btn {
    width: 32px; height: 32px;
    border: 1px solid var(--border-bright);
    border-radius: 6px;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
  }

  .audit-btn:hover { background: var(--bg-card); border-color: var(--accent-primary); color: var(--accent-primary); }

  .audit-timeline {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .audit-progress {
    height: 100%;
    background: var(--accent-primary);
    width: 35%;
    border-radius: 2px;
    transition: width 0.1s;
  }

  .audit-screen {
    padding: 20px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #4a9a7a;
    flex-direction: column;
    gap: 8px;
  }

  .audit-log {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 200px;
    overflow-y: auto;
    font-size: 12px;
  }

  .audit-log-row {
    display: grid;
    grid-template-columns: 120px 130px 1fr;
    gap: 16px;
    padding: 8px 16px;
    border-bottom: 1px solid #5e309d;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.1s;
  }

  .audit-log-row:hover { background: #2a1647; }
  .audit-log-row .ts { color: var(--text-muted); }
  .audit-log-row .evt { color: var(--accent-primary); }
  .audit-log-row.selected { background:#2a1647; }

  /* ── COMPLETE BTN ── */
  .section-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
  }

  .btn-primary {
    background: var(--accent-primary);
    color: #000;
  }

  .btn-primary:hover {
    box-shadow: 0 0 20px #883cf0e0;
    transform: translateY(-1px);
  }

  .btn-ghost {
    background: none;
    border: 1px solid var(--border-bright);
    color: var(--text-secondary);
  }

  .btn-ghost:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

  /* ── KNOWLEDGE CHECK ── */
  .quiz {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin: 24px 0;
  }

  .quiz-q {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    font-size: 15px;
  }

  .quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .quiz-opt {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.15s;
    user-select: none;
  }

  .quiz-opt:hover { border-color: var(--border-bright); color: var(--text-primary); }
  .quiz-opt.correct { border-color: var(--accent-green); background: rgba(0,229,160,0.08); color: var(--accent-green); }
  .quiz-opt.wrong { border-color: var(--accent-red); background: rgba(255,68,102,0.08); color: var(--accent-red); }

  .quiz-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
  }

  /* ── COMPLETION SCREEN ── */
  .completion {
    text-align: center;
    padding: 60px 40px;
  }

  .completion-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: bounceIn 0.5s ease;
  }

  @keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }

  .cert-card {
    max-width: 500px;
    margin: 30px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
  }

  .cert-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #3a1c6326, #6848956e);
    pointer-events: none;
  }

  /* ── TOPOLOGY BOX ── */
  .topology-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-highlight);
    border: 1px solid var(--border);
    white-space: nowrap;
  }

  .topology-icon { font-size: 18px; }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    .rdp-proxy-training-guide header {    flex-direction: column;
    height: auto;
    padding: 10px;
    gap: 10px;
 }
    .hero { padding: 40px 20px; }
    .hero::after { display: none; }
    .nav-inner { padding: 0 20px; }
    .main { padding: 24px 20px; }
    h1 { font-size: 28px; }
    .hero-stats { gap: 24px; }
  }

  /* Scroll */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: #873cf015; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: #873cf015; }