  :root {
    --surface: #23133a;
    --surface2: #1f1232;
    --surface3: #2a1647;
    --border: #3a1c63;
    --border2: #5e309d;
    --amber: #883CF0;
    --amber-dim: #873cf09b;
    --amber-glow: #1f1232;
    --green: #883CF0;
    --green-dim: #5e309d;
    --red: #883CF0;
    --blue: #dbe6f5;
    --purple: #a78bfa;
    --text: #e8ecf0;
    --text-muted: #d6d6d6;
    --text-dim: #d6d6d6;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  .delinea-migration-guide {
    background: #191127;
    color: var(--text);
    font-size: 13px;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Scanline overlay */
  .delinea-migration-guide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.04) 2px,
      rgba(0,0,0,0.04) 4px
    );
    pointer-events: none;
    z-index: 1;
  }

  /* Layout */
  .layout { display: flex; min-height: 100vh; }

  /* Sidebar */
  .sidebar {
    width: 280px;
    min-width: 280px;
    background: #180f26;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
  }

  .sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
  }

  .logo-line {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 8px;
  }

  .sidebar-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
  }

  .sidebar-title span { color: var(--amber); }

  .sidebar-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    
  }

  /* Overall progress */
  .overall-progress {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
  }

  .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
  }

  .progress-bar {
    height: 4px;
    background: #282035;
    border-radius: 2px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--amber), var(--green));
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
  }

  /* Nav */
  nav { padding: 12px 0; flex: 1; }

  .nav-section-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 8px 20px 4px;
    font-weight: 600;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
  }

  .nav-item:hover { color: var(--text); background:#23133a9f; }

  .nav-item.active {
    color: var(--amber);
    border-left-color: var(--amber);
    background: #23133a;
  }

  .nav-item .nav-num {
    font-size: 9px;
    color: var(--text-dim);
    min-width: 16px;
    font-weight: 600;
  }

  .nav-item.active .nav-num { color: var(--amber-dim); }

  .nav-check {
    width: 14px; height: 14px;
    border: 1px solid var(--border2);
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px;
    flex-shrink: 0;
    transition: all 0.2s;
  }

  .nav-check.done { background: var(--green); border-color: var(--green); color: #000; }

  /* Main */
  .main {
    /* margin-left: 280px; */
    flex: 1;
    padding: 0;
    height: 100vh;
    overflow-y: auto;
  }

  /* Top bar */
  .topbar {
    background: #191127;
    border-bottom: 1px solid var(--border);
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .breadcrumb {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .breadcrumb span { color: var(--amber); }

  .status-badges {
    display: flex;
    gap: 8px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 2px;
    font-weight: 500;
  }

  .badge-amber { background: var(--amber-glow); border: 1px solid var(--amber-dim); color: var(--amber); }
  .badge-green { background: #2a1647; border: 1px solid var(--green-dim); color: var(--green); }
  .badge-red { background: rgba(255,95,95,0.1); border: 1px solid var(--red); color: var(--red); }

  /* Page content */
  .delinea-migration-guide .page {
    display: none;
    padding: 40px;
    max-width: 900px;
    animation: fadeIn 0.3s ease;
  }

  .delinea-migration-guide .page.active { display: block; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Section header */
  .section-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .section-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    max-width: 60px;
  }

  .section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .section-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 680px;
    margin-bottom: 32px;
  }

  /* Cards */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
  }

  .card:hover { border-color: var(--border2); }

  .card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
  }

  .card.amber::before { background: var(--amber); }
  .card.green::before { background: var(--green); }
  .card.red::before { background: var(--red); }
  .card.blue::before { background: var(--blue); }
  .card.purple::before { background: var(--purple); }

  .card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .card-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
  }

  /* Command block */
  .cmd-block {
    background: #070a0d;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 14px 16px;
    font-size: 12px;
    color: #a8d8a8;
    position: relative;
    margin: 12px 0;
    line-height: 1.6;
  }

  .cmd-block .prompt { color: var(--amber); }
  .cmd-block .comment { color: var(--text-dim); }
  .cmd-block .flag { color: var(--blue); }
  .cmd-block .val { color: var(--purple); }

  .copy-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--surface3);
    border: 1px solid var(--border2);
    color: var(--text-muted);
    font-size: 9px;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 2px; 
    transition: all 0.15s;
  }

  .copy-btn:hover { color: var(--amber); border-color: var(--amber-dim); }
  .copy-btn.copied { color: var(--green); border-color: var(--green-dim); }

  /* Checklist */
  .checklist { list-style: none; }

  .checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
  }

  .checklist li:last-child { border-bottom: none; }
  .checklist li:hover { color: var(--text); }

  .check-box {
    width: 18px; height: 18px;
    border: 1px solid var(--border2);
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s;
    cursor: pointer;
  }

  .checklist li.checked .check-box {
    background: var(--green);
    border-color: var(--green);
    color: #000;
    font-size: 11px;
  }

  .checklist li.checked .check-text { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--green-dim); }

  .check-text { flex: 1; font-size: 12px; line-height: 1.6; }
  .check-label { font-weight: 500; color: var(--text); display: block; }
  .check-detail { font-size: 11px; color: var(--text-muted); }

  /* Steps */
  .steps { counter-reset: step; }

  .step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    position: relative;
  }

  .step::after {
    content: '';
    position: absolute;
    left: 15px; top: 32px; bottom: -16px;
    width: 1px;
    background: var(--border);
  }

  .step:last-child::after { display: none; }

  .step-num {
    width: 32px; height: 32px;
    background: var(--surface3);
    border: 1px solid var(--border2);
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--amber);
    flex-shrink: 0;
    counter-increment: step; 
  }

  .step-body { flex: 1; padding-top: 4px; }
  .step-title { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 13px; }
  .step-desc { font-size: 12px; color: var(--text-muted); line-height: 1.7; }

  /* Warning / info boxes */
  .alert {
    padding: 14px 16px;
    border-radius: 3px;
    font-size: 12px;
    margin: 16px 0;
    display: flex;
    gap: 12px;
    line-height: 1.7;
  }

  .alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
  .alert-amber { background: var(--amber-glow); border: 1px solid var(--amber-dim); }
  .alert-amber .alert-icon { color: var(--amber); }
  .alert-red { background: rgba(255,95,95,0.08); border: 1px solid rgba(255,95,95,0.3); }
  .alert-red .alert-icon { color: var(--red); }
  .alert-green { background: rgba(61,220,132,0.07); border: 1px solid rgba(61,220,132,0.25); }
  .alert-green .alert-icon { color: var(--green); }
  .alert-blue { background: #23133a; border: 1px solid #3a1c63; }
  .alert-blue .alert-icon { color: var(--blue); }

  /* Table */
  table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 16px 0; }
  th {
    text-align: left;
    padding: 8px 12px;
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--amber);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
  }
  td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    vertical-align: top;
  }
  tr:hover td { background: var(--surface2); color: var(--text); }

  /* Tags */
  .tag {
    display: inline-block;
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .tag-amber { background: var(--amber-glow); color: var(--amber); border: 1px solid var(--amber-dim); }
  .tag-green { background: #3a1c6350; color: var(--green); border: 1px solid var(--green-dim); }
  .tag-red { background: rgba(255,95,95,0.1); color: var(--red); border: 1px solid rgba(255,95,95,0.4); }
  .tag-blue { background: #291a3e; color: var(--blue); border: 1px solid #3a1c63; }
  .tag-purple { background: rgba(167,139,250,0.1); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }

  /* Grid */
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

  /* Stat boxes */
  .stat-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 3px;
    text-align: center;
  }

  .stat-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--amber);
    display: block;
  }

  .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
  }

  /* Phase bar */
  .phase-bar {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
  }

  .phase-item {
    flex: 1;
    padding: 12px 16px;
    cursor: pointer;
    border-right: 1px solid var(--border);
    transition: all 0.15s;
    text-align: center;
  }

  .phase-item:last-child { border-right: none; }
  .phase-item:hover { background: var(--surface2); }
  .phase-item.active { background: var(--amber-glow); }

  .phase-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-dim);
    display: block;
  }

  .phase-item.active .phase-label { color: var(--amber); }

  .phase-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
  }

  .phase-item.active .phase-name { color: var(--text); }

  /* Sub-phase content */
  .sub-phase { display: none; }
  .sub-phase.active { display: block; animation: fadeIn 0.25s ease; }

  /* Inline pill */
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    padding: 2px 8px;
    background: var(--surface3);
    border: 1px solid var(--border2);
    border-radius: 10px;
    color: var(--text-muted);
  }

  /* Timeline */
  .timeline { position: relative; padding-left: 28px; }
  .timeline::before { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--border); }

  .tl-item { position: relative; margin-bottom: 20px; }
  .tl-dot {
    position: absolute;
    left: -28px; top: 5px;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border2);
    background: var(--surface);
  }

  .tl-item.done .tl-dot { background: var(--green); border-color: var(--green); }
  .tl-item.current .tl-dot { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }

  .tl-day { font-size: 10px; color: var(--amber);  margin-bottom: 2px; }
  .tl-title { font-weight: 600; color: var(--text); font-size: 13px; }
  .tl-body { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-top: 4px; }

  /* Special treatment section */
  .special-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
  }

  .special-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
  }

  .special-header:hover { background: var(--surface3); }

  .special-icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--amber-glow);
    border: 1px solid var(--amber-dim);
    border-radius: 3px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .special-title { font-weight: 600; color: var(--text);  font-size: 14px; flex: 1; }
  .special-arrow { color: var(--text-dim); transition: transform 0.2s; font-size: 10px; }
  .special-header.open .special-arrow { transform: rotate(90deg); }

  .special-body { padding: 20px; display: none; }
  .special-body.open { display: block; animation: fadeIn 0.2s ease; }

  /* Navigation buttons */
  .nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }

  .btn {
    font-size: 12px;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    text-transform: uppercase;
    font-weight: 500;
  }

  .btn-primary {
    background: var(--amber);
    color: #000;
    border-color: var(--amber);
  }

  .btn-primary:hover { background: #883cf0e0; }

  .btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border2);
  }

  .btn-secondary:hover { color: var(--text); border-color: var(--amber-dim); }

  .btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--border);
  }

  /* Divider */
  .divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
  }

  h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    margin-top: 24px;
  }

  h3:first-child { margin-top: 0; }

  p { font-size: 12px; color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }

  ul.bullets { list-style: none; padding: 0; }
  ul.bullets li {
    padding: 4px 0 4px 18px;
    position: relative;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
  }
  ul.bullets li::before { content: '›'; position: absolute; left: 0; color: var(--amber); font-weight: 700; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 5px; height: 5px; }
  ::-webkit-scrollbar-track { background: #873cf015; }
  ::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: #873cf015; }

  /* Welcome hero */
  .hero {
    background: linear-gradient(135deg, var(--surface) 0%, #0e1219 100%);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
  }

  .hero::after {
    content: 'MIGRATION GUIDE';
    position: absolute;
    right: -10px; top: 20px;
    font-size: 80px;
    font-weight: 800;
    color: #e0d6f50d;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
  }

  .hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
  }

  .hero-title .accent { color: var(--amber); }

  .hero-sub {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.8;
    margin-bottom: 24px;
  }

  .hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }

  /* Responsive */
  @media (max-width: 900px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .grid2 { grid-template-columns: 1fr; }
    .grid3 { grid-template-columns: 1fr; }
    .page { padding: 20px; }
    .topbar { padding: 12px 20px; 
        flex-direction: column;
        gap: 10px;
    }
    .phase-bar { flex-direction: column; }
  }