:root {
  --bg: #191127;
  --bg2: #1f1232;
  --surface: #23133a;
  --surface2: #883cf050;
  --border: #3a1c63;
  --border2: #5e309d;
  --text: #c8d8f0;
  --text2: #d6d6d6;
  --text3: #d6d6d6;
  --amber: #883CF0;
  --amber-dim: #1f1232;
  --amber-glow: #1f1232af;
  --teal: #2dd4bf;
  --teal-dim: rgba(45,212,191,0.1);
  --blue: #4a9eff;
  --blue-dim: rgba(74,158,255,0.1);
  --red: #ff6b6b;
  --red-dim: rgba(255,107,107,0.1);
  --green: #4ade80;
  --green-dim: rgba(74,222,128,0.1);
  --radius: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

.delinea-event-subscriptions-guide {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  height: 100vh;
  position: relative;
  overflow-y: auto;
}

/* ─── TOPBAR ─── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0px;
  z-index: 1;
  backdrop-filter: blur(12px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 32px; height: 32px;
  background: var(--amber);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.brand-sub {
  font-size: 11px;
  color: var(--text3);
  
  line-height: 1.2;
  margin-top: 2px;
}

.topbar-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-text {
  font-size: 12px;
  color: var(--text2);
}

.progress-track {
  width: 140px;
  height: 4px;
  background: #282035;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #3a1c63);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-btn:hover { background:#23133a9f; color: var(--text); border-color: var(--border2); }
.nav-btn.active { background: #23133a; color: var(--amber); border-color: var(--amber); }

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--border);
  padding: 64px 80px 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, #1f172f 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, #5e309d14 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-dim);
  border: 1px solid #3a1c63;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  
  color: var(--amber);
  
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-eyebrow::before { content: '●'; font-size: 8px; animation: pulse-dot 2s infinite; }

@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  
  font-size: 52px;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  
  margin-bottom: 16px;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hero-desc {
  font-size: 16px;
  color: var(--text2);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}

.hero-stat-icon {
  width: 28px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.start-btn {
  background: var(--amber);
  color: #0d1117;
  border: none;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.start-btn:hover { background: #883cf0e0; transform: translateY(-1px); box-shadow: 0 4px 20px var(--amber-glow); }

/* ─── MAIN LAYOUT ─── */
.main {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}

/* ─── SIDEBAR NAV ─── */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 28px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section-title {
  font-size: 10px;
  
  color: var(--text3);
  text-transform: uppercase;
  
  padding: 0 20px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-section-title:not(:first-child) { margin-top: 20px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}

.sidebar-link:hover { background: var(--surface); color: var(--text); }
.sidebar-link.active { color: var(--amber); border-left-color: var(--amber); background: var(--amber-dim); }
.sidebar-link .link-num {  font-size: 11px; color: var(--text3); min-width: 20px; }
.sidebar-link .link-check { margin-left: auto; font-size: 12px; color: var(--green); opacity: 0; transition: opacity 0.2s; }
.sidebar-link.done .link-check { opacity: 1; }
.sidebar-link.done { color: var(--text2); }

/* ─── CONTENT ─── */
.content {
  padding: 48px 64px;
  max-width: 900px;
}

/* ─── SECTION ─── */
.section {
  margin-bottom: 72px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.section.visible { opacity: 1; transform: none; }

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-num {
  width: 36px; height: 36px;
  background: var(--amber-dim);
  border: 1px solid #5e309d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 4px;
}

.section-title-wrap { flex: 1; }

.section-title { 
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text2);
  margin-top: 4px;
}

/* ─── CALLOUT ─── */
.callout {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
}

.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.callout.info { background: #1f1232; border: 1px solid #3a1c63; color: var(--text); }
.callout.info .callout-icon::after { content: 'ℹ️'; }
.callout.tip { background: #1f1232; border: 1px solid #3a1c63; color: var(--text); }
.callout.tip .callout-icon::after { content: '💡'; }
.callout.warning { background: #1f1232; border: 1px solid #3a1c63; color: var(--text); }
.callout.warning .callout-icon::after { content: '⚠️'; }
.callout.success { background: #1f1232; border: 1px solid #3a1c63; color: var(--text); }
.callout.success .callout-icon::after { content: '✅'; }

/* ─── DEFINITION BOX ─── */
.def-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
}

.def-box h4 {
  
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  
  margin-bottom: 8px;
}

.def-box p { font-size: 14px; color: var(--text); line-height: 1.65; }

/* ─── CODE BLOCK ─── */
.code-block {
  background: #0a0f18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
  overflow: hidden;
}

.code-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-lang {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
}

.code-copy {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 11px;
  
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.code-copy:hover { border-color: var(--border2); color: var(--text2); }
.code-copy.copied { border-color: var(--green); color: var(--green); }

.code-body {
  padding: 16px 20px;
  
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.kw { color: #ff79c6; }
.str { color: #f1fa8c; }
.num { color: #bd93f9; }
.cmt { color: #6272a4; font-style: italic; }
.fn { color: #50fa7b; }
.prop { color: #8be9fd; }
.val { color: var(--amber); }

/* ─── STEPS ─── */
.steps { margin: 24px 0; counter-reset: step; }

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -4px;
  width: 1px;
  background: var(--border);
}

.step-num {
  width: 36px; height: 36px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  counter-increment: step;
  z-index: 1;
}

.step-body {
  flex: 1;
  padding-top: 6px;
  padding-bottom: 4px;
}

.step-body strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-body p { font-size: 14px; color: var(--text2); }

.step-body .path {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  
  font-size: 12px;
  color: var(--teal);
  padding: 2px 8px;
  margin: 4px 0;
}

/* ─── CARD GRID ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  cursor: default;
}

.card:hover {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.card-icon.amber { background: var(--amber-dim); }
.card-icon.teal { background: var(--teal-dim); }
.card-icon.blue { background: var(--blue-dim); }
.card-icon.red { background: var(--red-dim); }
.card-icon.green { background: var(--green-dim); }

.card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

/* ─── TABLE ─── */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 10px 16px;
  text-align: left;
  
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  
  font-weight: 500;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }

tbody td {
  padding: 10px 16px;
  color: var(--text);
  line-height: 1.5;
  vertical-align: top;
}

tbody td:first-child { color: var(--teal);  font-size: 12px; }
tbody td:last-child { color: var(--text2); }

/* ─── ACCORDION ─── */
.accordion { margin: 20px 0; }

.acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.acc-item.open { border-color: var(--border2); }

.acc-trigger {
  width: 100%;
  background: var(--surface);
  border: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.acc-trigger:hover { background: var(--surface2); }
.acc-item.open .acc-trigger { background: var(--surface2); border-bottom: 1px solid var(--border); }

.acc-arrow {
  width: 20px; height: 20px;
  background: var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text2);
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
  margin-left: auto;
}

.acc-item.open .acc-arrow { transform: rotate(90deg); background: var(--amber-dim); color: var(--amber); }

.acc-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.acc-badge {
  font-size: 11px;
  
  background: var(--border);
  color: var(--text2);
  padding: 2px 8px;
  border-radius: 10px;
}

.acc-body {
  display: none;
  padding: 20px 20px;
  background: var(--bg2);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}

.acc-item.open .acc-body { display: block; }

/* ─── QUIZ ─── */
.quiz-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
}

.quiz-label {
  font-size: 11px;
  
  color: var(--amber);
  text-transform: uppercase;
  
  margin-bottom: 12px;
}

.quiz-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.quiz-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s;
  text-align: left;
  width: 100%;
  
}

.quiz-opt:hover:not(:disabled) { border-color: var(--border2); background: var(--surface2); }
.quiz-opt.correct { border-color: #77b255;
    background: #77b25520;
    color: #60c090; }
.quiz-opt.wrong { border-color: #dc143c;
    background: #dc143c2b;
    color:#ff7a90; }

.quiz-opt-letter {
  width: 22px; height: 22px;
  background: var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 1px;
}

.quiz-opt.correct .quiz-opt-letter { 
    background: #77b255;
    color: #60c090; }
.quiz-opt.wrong .quiz-opt-letter {
    background: #dc143c;
    color:#ff7a90; }

.quiz-feedback {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  display: none;
  line-height: 1.5;
}

.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: #77b25520;
    border: 1px solid #77b255;
    color: #60c090; }
.quiz-feedback.wrong {  background: #dc143c2b;
    border: 1px solid #dc143c;
    color: #ff7a90; }

/* ─── USE-CASE TABS ─── */
.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  overflow-x: auto;
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 13px;
  
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--amber); border-bottom-color: var(--amber); }

.tabs-content { margin-top: 0; }
.tab-panel { display: none; padding: 24px 0 0; }
.tab-panel.active { display: block; }

/* ─── EVENT FLOW DIAGRAM ─── */
.flow-diagram {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0;
  overflow-x: auto;
}

.flow-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  min-width: max-content;
}

.flow-node {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 18px;
  text-align: center;
  min-width: 120px;
}

.flow-node .fn-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.flow-node .fn-sub {
  font-size: 11px;
  color: var(--text3);
  
}

.flow-node.amber-node { border-color: rgba(245,166,35,0.4); background: var(--amber-dim); }
.flow-node.amber-node .fn-label { color: var(--amber); }
.flow-node.teal-node { border-color: rgba(45,212,191,0.3); background: var(--teal-dim); }
.flow-node.teal-node .fn-label { color: var(--teal); }
.flow-node.blue-node { border-color: rgba(74,158,255,0.3); background: var(--blue-dim); }
.flow-node.blue-node .fn-label { color: var(--blue); }

.flow-arrow {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 18px;
  position: relative;
}

.flow-arrow::before {
  content: '';
  position: absolute;
  top: 50%; left: 6px; right: 6px;
  height: 1px;
  background: var(--border2);
}

.flow-arrow::after {
  content: '▶';
  font-size: 9px;
  color: var(--text3);
  position: relative;
  margin-left: 6px;
}

/* ─── CHECKLIST ─── */
.checklist { list-style: none; margin: 16px 0; }

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: color 0.15s;
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: '☐';
  font-size: 16px;
  color: var(--text3);
  flex-shrink: 0;
  margin-top: -1px;
  transition: color 0.15s;
}

.checklist li.checked { color: var(--text2); text-decoration: line-through; }
.checklist li.checked::before { content: '☑'; color: var(--green); }

/* ─── BADGE ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.badge.amber { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,166,35,0.3); }
.badge.teal { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(45,212,191,0.25); }
.badge.blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(74,158,255,0.25); }
.badge.green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(74,222,128,0.25); }
.badge.red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,107,107,0.25); }

/* ─── INLINE CODE ─── */
code {
  
  font-size: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--teal);
}

/* ─── SECTION COMPLETE ─── */
.mark-complete-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-top: 32px;
}

.mark-complete-wrap p { font-size: 13px; color: var(--text2); }

.mark-btn {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mark-btn:hover { background: var(--green-dim); border-color: rgba(74,222,128,0.4); color: var(--green); }
.mark-btn.done { background: var(--green-dim); border-color: rgba(74,222,128,0.4); color: var(--green); }

/* ─── ANIMATIONS ─── */
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.anim-in { animation: fadeSlide 0.35s ease forwards; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .topbar{
    flex-direction: column;
    height: auto;
    gap: 10px;
    overflow-x: auto;
  }
  .main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 32px 24px; }
  .hero { padding: 40px 24px; }
  .hero h1 { font-size: 36px; }
}