  :root {
    --bg: #180f26;
    --surface: #23133a;
    --surface2: #1f1232;
    --border: #3a1c63;
    --accent: #883CF0;
    --accent2: #a78bfa;
    --accent3: #34d399;
    --accent4: #f87171;
    --text: #e2e8f0;
    --muted: #e8f0ff;
    --heading: #f8fafc;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  .oidc-training-guide {
    background: #191127;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    height: 100vh;
    overflow-y: auto;
  }

  /* Noise overlay */
  .oidc-training-guide::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
  }

  /* ---- NAV ---- */
  .oidc-training-guide nav {
    position: sticky;
    top: 0; left: 0; right: 0;
    z-index: 1;
    background: #180f26;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
  }

  .nav-logo {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
  }

  .nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
  }

  .nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.7rem;
    
    
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    transition: all 0.2s;
    text-transform: uppercase;
  }

  .nav-links a:hover, .nav-links a.active {
    color: var(--accent);
    background: #23133a;
  }

  .progress-bar {
    position: sticky;
    top: 60px; left: 0;
    height: 2px;
    background: var(--accent);
    z-index: 1;
    transition: width 0.1s;
    width: 0%;
  }

  /* ---- HERO ---- */
  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
  }

  .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 8s ease-in-out infinite;
  }

  @keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }

  .hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(222, 11, 245, 0.08) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    
    font-size: 0.65rem;
    
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid #5e309d;
    padding: 0.35rem 0.9rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    animation: fadeUp 0.6s ease both;
  }

  .hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1.4s ease-in-out infinite;
  }

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
  }

  .hero h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    color: var(--heading);
    line-height: 0.95;
    
    animation: fadeUp 0.6s 0.1s ease both;
  }

  .hero h1 span {
    color: var(--accent);
    display: block;
  }

  .hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 560px;
    margin: 1.5rem auto 0;
    font-weight: 400;
    animation: fadeUp 0.6s 0.2s ease both;
  }

  .hero-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
    animation: fadeUp 0.6s 0.3s ease both;
  }

  .hero-meta-item {
    text-align: center;
  }

  .hero-meta-item .val {
    
    font-size: 1.5rem;
    color: var(--accent2);
    font-weight: 500;
    display: block;
  }

  .hero-meta-item .lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--muted);
  }

  .cta-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
    animation: fadeUp 0.6s 0.4s ease both;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 3px;
    
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
  }

  .btn-primary {
    background: var(--accent);
    color: #0b0f1a;
    font-weight: 700;
  }

  .btn-primary:hover {
    background: #883cf0e0;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px #be52e50f;
  }

  .btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
  }

  .btn-outline:hover {
    border-color: var(--accent2);
    color: var(--accent2);
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ---- SECTIONS ---- */
  section {
    padding: 6rem 2rem;
    position: relative;
  }

  .container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .section-label {
    
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .section-label::before {
    content: '';
    width: 24px; height: 1px;
    background: var(--accent);
    display: block;
  }

  .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--heading);
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  .section-desc {
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 3.5rem;
    font-size: 1rem;
  }

  /* ---- WHAT IS OIDC ---- */
  .what-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 3rem;
  }

  .what-card {
    background: var(--surface);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
  }

  .what-card::before {
    content: attr(data-num);
    position: absolute;
    top: 1.5rem; right: 1.75rem;
    
    font-size: 3rem;
    font-weight: 700;
    color: #2a1647;
    line-height: 1;
  }

  .what-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 0.75rem;
  }

  .what-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .tag {
    display: inline-block;
    
    font-size: 0.6rem;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    margin-bottom: 0.75rem;
  }

  .tag-amber { background: #291a3e; color: var(--accent); }
  .tag-blue { background: #68489588; color: var(--accent2); }
  .tag-green { background: rgba(52,211,153,0.12); color: var(--accent3); }
  .tag-red { background: rgba(248,113,113,0.12); color: var(--accent4); }

  /* ---- FLOW DIAGRAM ---- */
  #flow { background: var(--surface); }

  .flow-tabs {
    display: flex;
    gap: 2px;
    background: var(--border);
    border-radius: 4px;
    padding: 2px;
    width: fit-content;
    margin-bottom: 2.5rem;
  }

  .flow-tab {
    padding: 0.55rem 1.25rem;
    
    font-size: 0.68rem;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s;
    border: none;
    background: transparent;
  }

  .flow-tab.active {
    background: var(--accent);
    color: #0b0f1a;
    font-weight: 700;
  }

  .flow-diagram {
    display: none;
  }

  .flow-diagram.active {
    display: block;
    animation: fadeUp 0.3s ease;
  }

  .flow-svg-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2.5rem;
    overflow-x: auto;
  }

  /* Flow SVG styling */
  .flow-node {
    rx: 6; ry: 6;
  }

  .flow-note {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  .flow-note-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .flow-note-num {
    
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    min-width: 1.5rem;
  }

  .flow-note-text {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
  }

  /* ---- USE CASES ---- */
  .cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
  }

  .case-card {
    background: var(--surface);
    padding: 2rem;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
  }

  .case-card:hover {
    background: var(--surface2);
  }

  .case-card.active {
    background: var(--surface2);
  }

  .case-card.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
  }

  .case-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .case-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 0.4rem;
  }

  .case-card p {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
  }

  .case-detail {
    display: none;
    margin-top: 1.5px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-top: none;
    padding: 2rem 2.5rem;
    grid-column: 1 / -1;
    animation: fadeUp 0.25s ease;
  }

  .case-detail.active { display: block; }

  .case-detail h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 1rem;
  }

  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .detail-block h5 {
    
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
  }

  .detail-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .detail-block ul li {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
  }

  .detail-block ul li::before {
    content: '→';
    color: var(--accent);
    font-size: 0.75rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
  }

  /* ---- IMPLEMENTATION ---- */
  #implementation { background: var(--surface); }

  .steps-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
  }

  .steps-nav {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .step-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
  }

  .step-nav-item:hover {
    background: #23133a9f;
    border-color: var(--border);
  }

  .step-nav-item.active {
    background: #1f1232;
    border-color: #3a1c63;
  }

  .step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
    transition: all 0.2s;
  }

  .step-nav-item.active .step-num {
    background: var(--accent);
    color: #0b0f1a;
  }

  .step-nav-item.done .step-num {
    background: var(--accent3);
    color: #0b0f1a;
  }

  .step-nav-item.done .step-num::after {
    content: '✓';
  }

  .step-nav-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
    transition: color 0.2s;
  }

  .step-nav-item.active .step-nav-label { color: var(--heading); }

  .step-content {
    display: none;
    animation: fadeUp 0.3s ease;
  }

  .step-content.active { display: block; }

  .step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .step-badge {
    background: var(--accent);
    color: #0b0f1a;
    
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    text-transform: uppercase;
  }

  .step-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--heading);
  }

  .code-block {
    background: #0f0818;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin: 1.25rem 0;
  }

  .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }

  .code-lang {
    
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--accent2);
  }

  .copy-btn {
    
    font-size: 0.6rem;
    color: var(--muted);
    background: none;
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    
  }

  .copy-btn:hover { color: var(--accent); border-color: var(--accent); }

  .code-block pre {
    padding: 1.25rem 1.25rem;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #e2e7ef;
  }

  .code-block pre .kw { color: #7dd3fc; }
  .code-block pre .str { color: #86efac; }
  .code-block pre .cm { color: #4b5563; font-style: italic; }
  .code-block pre .num { color: #fca5a5; }
  .code-block pre .fn { color: var(--accent); }
  .code-block pre .var { color: #e2e8f0; }

  .info-box {
    background: #2a1647;
    border: 1px solid #3a1c63;
    border-left: 3px solid var(--accent2);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
  }

  .info-box.warn {
    background: #1f12322f;
    border-color: #3a1c63;
    border-left-color: var(--accent);
  }

  .info-box.success {
    background: rgba(52,211,153,0.06);
    border-color: rgba(52,211,153,0.2);
    border-left-color: var(--accent3);
  }

  .info-box-label {
    
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 0.4rem;
    font-weight: 700;
  }

  .info-box.warn .info-box-label { color: var(--accent); }
  .info-box.success .info-box-label { color: var(--accent3); }

  .info-box p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
  }

  .checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
  }

  .checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--muted);
  }

  .check-box {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
  }

  .check-box.checked {
    background: var(--accent3);
    border-color: var(--accent3);
    color: #0b0f1a;
    font-size: 0.6rem;
  }

  .step-nav-btns {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
  }

  /* ---- BENEFITS ---- */
  .benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .benefit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
  }

  .benefit-card:hover {
    border-color: #5e309d;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px #be52e50f;
  }

  .benefit-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
  }

  .bc1::before { background: linear-gradient(90deg, var(--accent), transparent); }
  .bc2::before { background: linear-gradient(90deg, var(--accent2), transparent); }
  .bc3::before { background: linear-gradient(90deg, var(--accent3), transparent); }
  .bc4::before { background: linear-gradient(90deg, var(--accent4), transparent); }
  .bc5::before { background: linear-gradient(90deg, #a78bfa, transparent); }
  .bc6::before { background: linear-gradient(90deg, #fb7185, transparent); }

  .benefit-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
  }

  .benefit-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 0.5rem;
  }

  .benefit-card p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
  }

  .benefit-metric {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    
    font-size: 0.7rem;
    color: var(--accent);
  }

  /* ---- QUIZ ---- */
  #quiz { background: var(--surface); }

  .quiz-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 700px;
  }

  .quiz-progress-track {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 2rem;
  }

  .quiz-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
  }

  .quiz-q-num {
    
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
  }

  .quiz-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 1.75rem;
    line-height: 1.5;
  }

  .quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

  .quiz-opt {
    padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--muted);
    transition: all 0.2s;
    background: var(--surface);
    text-align: left;
  }

  .quiz-opt:hover:not(.disabled) {
    border-color: var(--accent2);
    color: var(--heading);
    background: var(--surface2);
  }

  .quiz-opt.correct {
    border-color: var(--accent3);
    background: rgba(52,211,153,0.08);
    color: var(--accent3);
  }

  .quiz-opt.wrong {
    border-color: var(--accent4);
    background: rgba(248,113,113,0.08);
    color: var(--accent4);
  }

  .quiz-opt.disabled { cursor: default; }

  .quiz-feedback {
    min-height: 3rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
  }

  .quiz-score {
    text-align: center;
    padding: 2rem;
  }

  .score-circle {
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
  }

  .score-num {
    
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
  }

  .score-den {
    
    font-size: 0.7rem;
    color: var(--muted);
  }

  /* ---- GLOSSARY ---- */
  .glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }

  .gloss-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
  }

  .gloss-item:hover {
    border-color: #5e309d;
    background: var(--surface2);
  }

  .gloss-term {
    
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent2);
    margin-bottom: 0.4rem;
  }

  .gloss-def {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
  }

  /* ---- FOOTER ---- */
  .oidc-training-guide footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2.5rem;
    text-align: center;
  }

  .oidc-training-guide footer p {
    
    font-size: 0.65rem;
    color: var(--muted);
  }

  /* Divider */
  .divider {
    height: 1px;
    background: var(--border);
    margin: 3rem 0;
  }

  /* Responsive */
  @media (max-width: 768px) {
    .what-grid { grid-template-columns: 1fr; }
    .cases-grid { grid-template-columns: 1fr; }
    .steps-layout { grid-template-columns: 1fr; }
    .steps-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .benefits-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
  }

  /* Scroll reveal */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }


    /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 5px; height: 6px; }
  ::-webkit-scrollbar-track { background: #873cf015; }
  ::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }