  :root {
    --bg: #23133a;
    --surface: #23133a;
    --surface2: #1f1232;
    --surface3: #1f1232;
    --border: #3a1c63;
    --border-bright: #5e309d;
    --text: #c8d6e5;
    --text-dim: #d6d6d6;
    --text-bright: #d6d6d6;
    --accent: #883CF0;
    --accent2: #b33ff3;
    --accent3: #d258f8;
    --accent4: #a855f7;
    --rbac: #883CF0;
    --abac: #b33ff3;
    --ctx: #d258f8;
    --warn: #ffd166;
    --success: #06d6a0;
    --danger: #ef476f;
    --glow: 0 0 20px rgba(113, 0, 212, 0.15);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  .delinea-access-control-training {
    background: #191127;
    color: var(--text);
    overflow-x: hidden;
    height: 100vh;
    overflow-y: auto;
  }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #873cf015; }
::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }

  /* ── HEADER ── */
  .delinea-access-control-training header {
    position: relative;
    z-index: 1;
    padding: 60px 40px 0;
    max-width: 1200px;
    margin: 0 auto;
  }

  .module-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #23133a;
    border: 1px solid #3a1c63;
    border-radius: 2px;
    padding: 6px 14px;
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 28px;
  }

  .module-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
  }

  h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-bright);
    margin-bottom: 16px;
  }

  h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .subtitle {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 580px;
    line-height: 1.7;
    margin-bottom: 40px;
  }

  /* ── NAV TABS ── */
  .module-nav {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #180f26;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
  }

  .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
  }

  .nav-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
  }

  .nav-tab:hover { color: var(--text); }

  .nav-tab.active-rbac { color: var(--rbac); border-bottom-color: var(--rbac); }
  .nav-tab.active-abac { color: var(--abac); border-bottom-color: var(--abac); }
  .nav-tab.active-ctx  { color: var(--ctx);  border-bottom-color: var(--ctx); }
  .nav-tab.active-quiz { color: var(--accent4); border-bottom-color: var(--accent4); }

  .tab-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  /* ── MAIN ── */
  .delinea-access-control-training main {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 80px;
  }

  /* Section */
  .section {
    display: none;
    animation: fadeIn 0.3s ease;
  }
  .section.active { display: block; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── SECTION HEADER ── */
  .section-header {
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
  }

  .section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 8px;
  }

  .section-desc {
    font-size: 15px;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 600px;
  }

  .model-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 3px;
    padding: 6px 14px;
    
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-top: 4px;
  }

  .chip-rbac { background: #23133a; border: 1px solid #3a1c63; color: var(--rbac); }
  .chip-abac { background: #23133a; border: 1px solid #3a1c63; color: var(--abac); }
  .chip-ctx  { background: #23133a; border: 1px solid #3a1c63; color: var(--ctx); }

  /* ── TWO-COL GRID ── */
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
  .three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 24px; }

  /* ── CARDS ── */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 28px;
    transition: border-color 0.2s;
  }

  .card:hover { border-color: var(--border-bright); }

  .card-label {
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 500;
  }

  .card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 10px;
  }

  .card p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.65;
  }

  /* Concept card */
  .concept-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 16px;
  }

  /* ── INFO BOX ── */
  .info-box {
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }

  .info-box-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .info-box-body { font-size: 14px; line-height: 1.65; }
  .info-box-body strong { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }

  .info-tip   { background: #1f1232; border: 1px solid #3a1c63; }
  .info-tip strong { color: var(--accent); }
  .info-warn  { background: rgba(255,209,102,0.06); border: 1px solid rgba(255,209,102,0.2); }
  .info-warn strong { color: var(--warn); }
  .info-note  { background: #23133a; border: 1px solid #3a1c63; }
  .info-note strong { color: var(--accent2); }

  /* ── CODE BLOCK ── */
  .code-block {
    background: #060a10;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
  }

  .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }

  .code-title {
    
    font-size: 11px;
    color: var(--text-dim);
  }

  .code-lang {
    
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 2px;
    background: rgba(255,255,255,0.05);
    color: var(--text-dim);
  }

  pre {
    padding: 20px;
    
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    color: #8eb4e0;
  }

  .kw  { color: #c792ea; }
  .str { color: #c3e88d; }
  .num { color: #f78c6c; }
  .cmt { color: #546e7a; font-style: italic; }
  .fn  { color: #82aaff; }
  .prop{ color: #ffcb6b; }
  .val { color: #89ddff; }

  /* ── STEP LIST ── */
  .steps { counter-reset: step; list-style: none; margin-bottom: 24px; }

  .steps li {
    counter-increment: step;
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    align-items: flex-start;
  }

  .steps li::before {
    content: counter(step);
    width: 32px; height: 32px;
    background: var(--surface3);
    border: 1px solid var(--border-bright);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
    margin-top: 2px;
  }

  .steps li .step-content { flex: 1; }
  .steps li .step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
  }
  .steps li .step-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
  }

  /* ── INTERACTIVE DEMO ── */
  .demo-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
  }

  .demo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }

  .demo-dot { width: 8px; height: 8px; border-radius: 50%; }

  .demo-title {
    
    font-size: 12px;
    color: var(--text-dim);
    flex: 1;
  }

  .demo-body { padding: 24px; }

  /* RBAC Role Builder */
  .role-matrix {
    display: grid;
    grid-template-columns: 200px repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    font-size: 12px;
  }

  .matrix-cell {
    background: var(--surface2);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .matrix-head {
    background: var(--surface3);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
  }

  .matrix-row-head {
    background: var(--surface3);
    justify-content: flex-start;
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    padding-left: 16px;
  }

  .perm-check {
    width: 20px; height: 20px;
    border: 1.5px solid var(--border-bright);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
  }

  .perm-check.checked {
    background: #1f1232;
    border-color: var(--accent);
  }

  .perm-check.checked::after {
    content: '✓';
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
  }

  .perm-check:hover { border-color: var(--accent); }

  /* User-Role assign */
  .assign-grid {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 20px;
  }

  .assign-col h4 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 500;
  }

  .assign-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--border-bright);
  }

  .assign-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .assign-item:hover { border-color: var(--border-bright); }
  .assign-item.selected { border-color: var(--accent); background: #2a1647; color: var(--accent); }
  .assign-item .avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
  }

  .btn-primary { background: var(--accent); color: #060a10; }
  .btn-primary:hover { background: #883cf0e0; }
  .btn-outline { background: transparent; border: 1px solid var(--border-bright); color: var(--text); }
  .btn-outline:hover { border-color: var(--text-dim); }
  .btn-sm { padding: 7px 14px; font-size: 12px; }

  /* AD Group Demo */
  .ad-flow {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .ad-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px 20px;
    flex: 1;
    min-width: 140px;
  }

  .ad-box-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .ad-box-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
  }

  .flow-arrow {
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
  }

  /* Context sliders */
  .ctx-conditions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }

  .ctx-condition {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 18px;
  }

  .ctx-condition-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .ctx-condition-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 6px;
  }

  .ctx-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 2px;
  }

  .ctx-allow { background: rgba(6,214,160,0.12); color: var(--success); }
  .ctx-deny  { background: rgba(239,71,111,0.12); color: var(--danger); }

  .ctx-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    margin-bottom: 6px;
    cursor: pointer;
  }

  select {
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
  }

  select:focus { outline: none; border-color: var(--accent); }

  /* Decision panel */
  .decision-panel {
    background: var(--surface3);
    border-radius: 4px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
  }

  .decision-icon { font-size: 28px; }

  .decision-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .decision-value {
    font-size: 20px;
    font-weight: 800;
  }

  .decision-allow { color: var(--success); }
  .decision-deny  { color: var(--danger); }

  .decision-reason {
    font-size: 13px;
    color: var(--text-dim);
    margin-left: auto;
    font-style: italic;
  }

  /* ── QUIZ ── */
  .quiz-q {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 28px;
    margin-bottom: 20px;
  }

  .quiz-q-num {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .quiz-q-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

  .quiz-option {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 3px;
    padding: 14px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text);
    line-height: 1.4;
    font-weight: 400;
    text-align: left;
  }

  .quiz-option:hover:not(.locked) { border-color: var(--border-bright); background: var(--surface3); }
  .quiz-option.correct { border-color: #77b255;
    background: #77b25520;
    color: #60c090; }
  .quiz-option.wrong   { border-color: #dc143c;
    background: #dc143c2b;
    color:#ff7a90; }
  .quiz-option.reveal  { border-color: var(--success); background: #77b25520; }
  .quiz-option.locked  { cursor: default; }

  .quiz-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 13px;
    display: none;
    line-height: 1.6;
  }

  .quiz-feedback.show { display: block; }
  .quiz-feedback.ok   { background: #77b25520;
    border: 1px solid #77b255;
    color: #60c090; }
  .quiz-feedback.bad  { background: #dc143c2b;
    border: 1px solid #dc143c;
    color: #ff7a90; }

  /* Score */
  .score-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 32px;
    text-align: center;
    margin-top: 24px;
  }

  .score-num {
    font-size: 72px;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 8px;
  }

  .score-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
  }

  .score-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 20px auto;
    max-width: 300px;
    overflow: hidden;
  }

  .score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ── COMPARISON TABLE ── */
  .compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 24px;
  }

  .compare-table th {
    background: var(--surface3);
    padding: 12px 16px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
    border: 1px solid var(--border);
  }

  .compare-table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
    line-height: 1.55;
    background: var(--surface2);
  }

  .compare-table tr:hover td { background: var(--surface3); }

  .tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    
  }

  .tag-rbac { background: rgba(0,212,170,0.12); color: var(--rbac); }
  .tag-abac { background: rgba(0,153,255,0.12); color: var(--abac); }
  .tag-ctx  { background: rgba(255,122,61,0.12); color: var(--ctx); }

  /* Progress bar */
  .progress-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
  }

  .progress-seg {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s;
  }

  .progress-seg.done-rbac { background: var(--rbac); }
  .progress-seg.done-abac { background: var(--abac); }
  .progress-seg.done-ctx  { background: var(--ctx); }
  .progress-seg.done-quiz { background: var(--accent4); }

  /* Toggle switch */
  .toggle-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

  .toggle {
    width: 40px; height: 22px;
    border-radius: 11px;
    background: var(--border);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    border: none;
  }

  .toggle::after {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.2s;
  }

  .toggle.on { background: #2a1647; }
  .toggle.on::after { left: 21px; background: var(--accent); }

  .toggle-label { font-size: 13px; color: var(--text-dim); }

  /* Footer */
  .delinea-access-control-training footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 40px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-dim);
  }

  /* Responsive */
  @media (max-width: 768px) {
    .delinea-access-control-training header { padding: 40px 20px 0; }
    .module-nav { padding: 0 20px; }
    .delinea-access-control-training main { padding: 0 20px 60px; }
    .two-col, .three-col, .ctx-conditions { grid-template-columns: 1fr; }
    .quiz-options { grid-template-columns: 1fr; }
    .assign-grid { grid-template-columns: 1fr; }
    .role-matrix { font-size: 11px; grid-template-columns: 120px repeat(5, 1fr); }
  }