  :root {
    --bg: #23133a;
    --surface: #23133a;
    --surface2: #1f1232;
    --surface3: #2b1f3d;
    --border: #3a1c63;
    --accent: #883CF0;
    --accent2: #883CF0;
    --accent3: #883CF0;
    --danger: #120f0f;
    --text: #e9f0f7;
    --text-dim: #d6d6d6;
    --text-bright: #ffffff;
    --aws: #883CF0;
    --delinea: #883CF0;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  .aws-secrets-training-guide {
    background:#191127;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
  }

  /* Noise texture overlay */
  .aws-secrets-training-guide::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
  }

  /* ── HEADER ── */
  .aws-secrets-training-guide header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(8,12,16,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
  }

  .header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header-logo {
    width: 28px;
    height: 28px;
    background: var(--aws);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    animation: pulse-glow 3s ease-in-out infinite;
  }

  @keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); }
    50% { box-shadow: 0 0 18px 4px rgba(245,166,35,0.3); }
  }

  .header-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-bright);
  }

  .header-title span { color: var(--aws); }

  .header-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-dim);
  }

  .progress-bar-wrap {
    width: 140px;
    height: 3px;
    background: #8e869a;
    border-radius: 2px;
    overflow: hidden;
  }

  .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a1c63, #684895);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
  }

  /* ── HERO ── */
  .hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 2rem 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }

  .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(30,47,66,0.4) 1px, transparent 1px),
      linear-gradient(90deg, rgba(30,47,66,0.4) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,153,0,0.08);
    border: 1px solid rgba(255,153,0,0.25);
    color: var(--aws);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
  }

  .hero-badge::before { content: '●'; font-size: 8px; animation: blink 1.5s step-end infinite; }
  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

  .hero h1 {
    
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-bright);
    margin-bottom: 1rem;
    position: relative;
  }

  .hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--aws), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-sub {
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    font-size: 13px;
    line-height: 1.8;
  }

  .hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 11px;
    color: var(--text-dim);
  }

  .hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .hero-meta-item .icon {
    width: 20px;
    height: 20px;
    background: var(--surface3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
  }

  /* ── LAYOUT ── */
  .layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 56px);
  }

  /* ── SIDEBAR ── */
  nav.sidebar {
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    position: sticky;
    top: 56px;
    /* height: calc(100vh - 56px); */
    height: 100vh;
    overflow-y: auto;
  }

  nav.sidebar::-webkit-scrollbar { width: 3px; }
  nav.sidebar::-webkit-scrollbar-track { background: transparent; }
  nav.sidebar::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 2px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #873cf015; }
::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }


  .nav-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 1.5rem;
    margin-bottom: 8px;
    margin-top: 1.5rem;
  }

  .nav-section-label:first-child { margin-top: 0; }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 1.5rem;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 12px;
    transition: all 0.15s;
    border-left: 2px solid transparent;
    position: relative;
  }

  .nav-item:hover { color: var(--text); background: #23133a9f; }

  .nav-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: #23133a;
  }

  .nav-item.completed {
    color: var(--accent2);
  }

  .nav-item.completed .nav-num {
    background: var(--accent2);
    color: #fff;
  }

  .nav-num {
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: var(--surface3);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    transition: all 0.2s;
  }

  /* ── MAIN CONTENT ── */
  main {
    padding: 3rem 3rem 6rem;
    /* max-width: 860px; */
    height:100vh;
    overflow-y: auto;
  }

  /* ── MODULE ── */
  .module {
    display: none;
    animation: fadeIn 0.3s ease;
  }

  .module.active { display: block; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── MODULE HEADER ── */
  .module-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
  }

  .module-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
  }

  .module-meta { flex: 1; }
  .module-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
  }
  .module-title {
    
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 6px;
  }
  .module-desc { color: var(--text-dim); font-size: 12px; }

  /* ── STEPS ── */
  .step-list { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 2rem; }

  .step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
  }

  .step:hover { border-color: #5e309d; }

  .step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    user-select: none;
  }

  .step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #883cf050;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    transition: all 0.2s;
  }

  .step.done .step-num {
    background:#883cf050;
    color: #000;
  }

  .step-title-wrap { flex: 1; }
  .step-title {
    
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
  }
  .step-subtitle { font-size: 11px; color: var(--text-dim); }

  .step-chevron {
    color: var(--text-dim);
    font-size: 12px;
    transition: transform 0.2s;
  }

  .step.open .step-chevron { transform: rotate(180deg); }

  .step-body {
    display: none;
    padding: 0 1.2rem 1.2rem;
    border-top: 1px solid var(--border);
  }

  .step.open .step-body { display: block; }

  /* ── INSTRUCTION ITEMS ── */
  .instructions { padding-top: 1rem; }

  .instruction-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #3a1c63;
    align-items: flex-start;
  }

  .instruction-item:last-child { border-bottom: none; }

  .instr-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 6px;
    opacity: 0.6;
  }

  .instr-text { font-size: 13px; line-height: 1.7; color: var(--text); }

  .instr-text code {
    background: var(--surface3);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--accent3);
    
  }

  .instr-text strong { color: var(--text-bright); font-weight: 600; }

  /* ── CODE BLOCK ── */
  .code-block {
    background: #030609;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    font-size: 12px;
    line-height: 1.7;
    color: var(--accent2);
    margin: 1rem 0;
    position: relative;
    overflow-x: auto;
  }

  .code-label {
    position: absolute;
    top: -1px;
    right: 12px;
    background: var(--accent);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 0 0 4px 4px;
  }

  /* ── ALERT / CALLOUT ── */
  .callout {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 12px;
    line-height: 1.6;
  }

  .callout.warning {
    background: rgba(245,166,35,0.06);
    border: 1px solid rgba(245,166,35,0.2);
    color: #e8c980;
  }

  .callout.info {
    background: #1f1232;
    border: 1px solid #3a1c63;
    color: #fff;
  }

  .callout.success {
    background: rgba(63,185,80,0.06);
    border: 1px solid rgba(63,185,80,0.2);
    color: #7cc98a;
  }

  .callout-icon { font-size: 14px; margin-top: 1px; }
  .callout-body strong { display: block; font-weight: 600; margin-bottom: 2px; }

  /* ── PERMISSION TABLE ── */
  .perm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 12px;
  }

  .perm-table th {
    background: var(--surface3);
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }

  .perm-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(30,47,66,0.5);
    vertical-align: top;
  }

  .perm-table tr:last-child td { border-bottom: none; }

  .perm-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin: 1px;
  }

  .perm-badge.list { background: rgba(88,166,255,0.12); color: var(--accent3); border: 1px solid rgba(88,166,255,0.2); }
  .perm-badge.read { background: rgba(63,185,80,0.12); color: var(--accent2); border: 1px solid rgba(63,185,80,0.2); }
  .perm-badge.write { background: rgba(245,166,35,0.12); color: var(--accent); border: 1px solid rgba(245,166,35,0.2); }

  /* ── QUIZ ── */
  .quiz-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
  }

  .quiz-title {
    
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .quiz-title::before {
    content: '⚡';
    font-size: 14px;
  }

  .quiz-q { color: var(--text); margin-bottom: 0.8rem; font-size: 13px; }

  .quiz-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }

  .quiz-opt {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .quiz-opt:hover { border-color: var(--accent3); color: var(--text-bright); }
  .quiz-opt.correct { border-color: #77b255; background: #77b25520; color: #60c090; }
  .quiz-opt.wrong { border-color: #dc143c; background: #dc143c2b; color: #ff7a90; }

  .quiz-opt-key {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--surface3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
  }

  .quiz-feedback {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    display: none;
  }
  .quiz-feedback.correct { background: #77b255; border: 1px solid #77b255; color: #fff; display: block; }
  .quiz-feedback.wrong { background: #dc143c; border: 1px solid #dc143c; color: #fff; display: block; }

  /* ── COMPLETE BTN ── */
  .mark-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 8px;
    
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.5rem;
  }

  .mark-complete-btn:hover {
    border-color: var(--accent2);
    color: var(--accent2);
  }

  .mark-complete-btn.done {
    background: #1f1232;
    border-color: var(--accent2);
    color: var(--accent2);
    cursor: default;
  }

  /* ── NAV BUTTONS ── */
  .module-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
  }

  .nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 9px 18px;
    border-radius: 7px;
    
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
  }

  .nav-btn:hover { border-color: var(--accent3); color: var(--text-bright); }
  .nav-btn.primary { background: #883CF0; border-color: #3a1c63; color: #fff; }
  .nav-btn.primary:hover { background: #883cf0e0; }
  .nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

  /* ── OVERVIEW CARDS ── */
  .overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .overview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
  }

  .overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
  }

  .overview-card:nth-child(1)::before { background: var(--aws); }
  .overview-card:nth-child(2)::before { background: var(--accent2); }
  .overview-card:nth-child(3)::before { background: var(--accent3); }
  .overview-card:nth-child(4)::before { background: #9c6fef; }
  .overview-card:nth-child(5)::before { background: var(--danger); }
  .overview-card:nth-child(6)::before { background: var(--accent); }

  .overview-card:hover {
    border-color: #5e309d;
    transform: translateY(-2px);
  }

  .ov-icon { font-size: 24px; margin-bottom: 8px; }
  .ov-num { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
  .ov-title {  font-size: 13px; font-weight: 700; color: var(--text-bright); margin-bottom: 4px; }
  .ov-desc { font-size: 11px; color: var(--text-dim); }

  /* ── ARCHITECTURE DIAGRAM ── */
  .arch-diagram {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
  }

  .arch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.2rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 110px;
    text-align: center;
  }

  .arch-node-icon { font-size: 28px; }

  .arch-node-name {
    
    font-size: 11px;
    font-weight: 700;
    color: var(--text-bright);
  }

  .arch-node-sub { font-size: 9px; color: var(--text-dim); }

  .arch-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0 12px;
    color: var(--text-dim);
  }

  .arch-arrow-line {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
    position: relative;
  }

  .arch-arrow-line::after {
    content: '▶';
    position: absolute;
    right: -6px;
    top: -5px;
    font-size: 10px;
    color: var(--accent);
  }

  .arch-arrow-label { font-size: 9px; color: var(--text-dim); }

  /* ── COMPLETION SCREEN ── */
  .completion-screen {
    text-align: center;
    padding: 4rem 2rem;
  }

  .completion-badge {
    width: 80px;
    height: 80px;
    background: rgba(63,185,80,0.1);
    border: 2px solid var(--accent2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 1.5rem;
    animation: spin-in 0.6s ease;
  }

  @keyframes spin-in {
    from { transform: scale(0) rotate(-90deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
  }

  .completion-screen h2 {
    
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 0.75rem;
  }

  .completion-screen p { color: var(--text-dim); font-size: 13px; max-width: 400px; margin: 0 auto 2rem; }

  .cert-card {
    background: var(--surface);
    border: 1px solid var(--accent2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 460px;
    margin: 0 auto;
    text-align: left;
  }

  .cert-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; }
  .cert-label { color: var(--text-dim); }
  .cert-value { color: var(--text-bright); font-weight: 600; }
  .cert-divider { height: 1px; background: var(--border); margin: 12px 0; }

  /* ── RESPONSIVE ── */
  @media (max-width: 760px) {
    .aws-secrets-training-guide header{
      flex-wrap: wrap;
      height: auto;
    }
    .layout { grid-template-columns: 1fr; }
    nav.sidebar { display: none; }
    main { padding: 2rem 1.2rem 4rem; }
    .overview-grid { grid-template-columns: 1fr; }
    .arch-diagram { flex-direction: column; gap: 12px; }
    .arch-arrow { transform: rotate(90deg); }
  }