@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --bg-primary: #030712;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: linear-gradient(145deg, rgba(30,41,59,0.7), rgba(15,23,42,0.9));
  --bg-card-hover: linear-gradient(145deg, rgba(51,65,85,0.6), rgba(30,41,59,0.8));
  
  --glass: rgba(255,255,255,0.03);
  --glass-border: rgba(255,255,255,0.08);
  --glass-hover: rgba(255,255,255,0.06);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --accent-glow: rgba(99,102,241,0.4);
  
  --success: #10b981;
  --success-glow: rgba(16,185,129,0.3);
  --error: #ef4444;
  --error-glow: rgba(239,68,68,0.3);
  --warning: #f59e0b;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 60px var(--accent-glow);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99,102,241,0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139,92,246,0.1), transparent),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(168,85,247,0.05), transparent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-primary);
  color: white;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px var(--accent-glow); }
}

.animate-fade { animation: fadeIn 0.4s ease-out; }
.animate-slide { animation: slideUp 0.5s ease-out; }

/* ═══════════════════════════════════════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3,7,18,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand .title {
  font-size: 20px;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.brand .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.brand .subtitle strong {
  color: var(--text-secondary);
}

.pills {
  margin-left: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.pill:hover {
  background: var(--glass-hover);
  border-color: rgba(99,102,241,0.3);
}

.pill strong {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════════════════════════ */
.shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  animation: fadeIn 0.5s ease-out;
}

@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; padding: 16px; }
  .sidebar { order: 2; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
  position: relative;
}

.card:hover {
  border-color: rgba(99,102,241,0.2);
  box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 16px 0 10px;
  padding-left: 4px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 120px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM CONTROLS
═══════════════════════════════════════════════════════════════════════════ */
.control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15,23,42,0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  outline: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.control:hover {
  border-color: rgba(99,102,241,0.3);
  background: rgba(15,23,42,0.8);
}

.control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

input.control::placeholder {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(30,41,59,0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.05), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,0.4);
  box-shadow: var(--shadow-sm);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn.primary:hover {
  box-shadow: 0 6px 30px var(--accent-glow);
  filter: brightness(1.1);
}

.btn.good {
  background: linear-gradient(135deg, var(--success), #059669);
  border: none;
  color: white;
  box-shadow: 0 4px 20px var(--success-glow);
}

.btn.bad {
  background: linear-gradient(135deg, var(--error), #dc2626);
  border: none;
  color: white;
  box-shadow: 0 4px 20px var(--error-glow);
}

.btn.ghost {
  background: transparent;
  border: 1px dashed var(--glass-border);
}

.btn.ghost:hover {
  background: var(--glass);
  border-style: solid;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════════════════════════════════════════ */
.main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(15,23,42,0.5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.tab {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.tab:hover {
  color: var(--text-secondary);
  background: var(--glass);
}

.tab.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════════════════════════════════════ */
.progress {
  height: 8px;
  background: rgba(15,23,42,0.8);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.progress > div {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress > div::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
  background-size: 200% 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUESTION CARD
═══════════════════════════════════════════════════════════════════════════ */
.qcard {
  padding: 24px;
  background: linear-gradient(145deg, rgba(30,41,59,0.5), rgba(15,23,42,0.7));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  animation: slideUp 0.4s ease-out;
}

.qmeta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(15,23,42,0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.badge:first-child {
  background: var(--accent-gradient);
  color: white;
  border: none;
}

.qtext {
  margin-top: 20px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIGURE / IMAGE
═══════════════════════════════════════════════════════════════════════════ */
.figure {
  margin-top: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-normal);
}

.figure:hover img {
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════════════
   OPTIONS
═══════════════════════════════════════════════════════════════════════════ */
.options {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(15,23,42,0.5);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.opt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(99,102,241,0.05), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.opt:hover {
  transform: translateX(4px);
  border-color: rgba(99,102,241,0.3);
  background: rgba(30,41,59,0.6);
}

.opt:hover::before {
  opacity: 1;
}

.opt .letter {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.1);
  border: 2px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent-primary);
  transition: var(--transition-fast);
}

.opt .txt {
  flex: 1;
  font-weight: 500;
  line-height: 1.5;
  padding-top: 6px;
}

.opt.selected {
  border-color: var(--accent-primary);
  background: rgba(99,102,241,0.1);
  box-shadow: 0 0 30px var(--accent-glow);
}

.opt.selected .letter {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
}

.opt.correct {
  border-color: var(--success);
  background: rgba(16,185,129,0.1);
  box-shadow: 0 0 30px var(--success-glow);
}

.opt.correct .letter {
  background: linear-gradient(135deg, var(--success), #059669);
  border-color: transparent;
  color: white;
}

.opt.wrong {
  border-color: var(--error);
  background: rgba(239,68,68,0.1);
  box-shadow: 0 0 30px var(--error-glow);
}

.opt.wrong .letter {
  background: linear-gradient(135deg, var(--error), #dc2626);
  border-color: transparent;
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIONS
═══════════════════════════════════════════════════════════════════════════ */
.actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTES / HINTS / EXPLANATIONS
═══════════════════════════════════════════════════════════════════════════ */
.note {
  margin-top: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
}

.note strong {
  color: var(--accent-primary);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KEYBOARD SHORTCUTS
═══════════════════════════════════════════════════════════════════════════ */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 4px 10px;
  background: linear-gradient(180deg, rgba(51,65,85,0.8), rgba(30,41,59,0.9));
  border: 1px solid rgba(71,85,105,0.5);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 2px 0 rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEPARATOR
═══════════════════════════════════════════════════════════════════════════ */
hr.sep {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 16px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES (Stats)
═══════════════════════════════════════════════════════════════════════════ */
.tablelike {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.tablelike tr {
  transition: var(--transition-fast);
}

.tablelike tr:hover td {
  background: rgba(99,102,241,0.05);
  border-color: rgba(99,102,241,0.2);
}

.tablelike td {
  padding: 14px 18px;
  background: rgba(15,23,42,0.5);
  border: 1px solid var(--glass-border);
  font-size: 14px;
}

.tablelike td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-weight: 600;
}

.tablelike td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.tablelike tr:first-child td {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
  font-weight: 700;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════════════════════════════════════ */
.small {
  font-size: 13px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .pills {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  
  .qtext {
    font-size: 18px;
  }
  
  .opt {
    padding: 14px 16px;
  }
  
  .opt .letter {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .tabs {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPECIAL EFFECTS
═══════════════════════════════════════════════════════════════════════════ */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), transparent);
  opacity: 0;
  transition: var(--transition-normal);
}

.card:hover::before {
  opacity: 1;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .topbar, .sidebar, .actions, .tabs {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card, .qcard {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}


/* ============================================================
   Practical Lab additions
   ============================================================ */

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.topbar-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.btn.tiny{
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
}

.lab-shell{
  grid-template-columns: 320px 1fr;
}

.lab-sidebar .pills.vertical{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.lab-card{
  padding: 18px;
}

.lab-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.lab-title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lab-meta{
  font-size: 13px;
  opacity: 0.75;
}

.lab-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.lab-area{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.card-soft{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 14px;
}

.callout{
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.callout.good{
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.08);
}
.callout.bad{
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.08);
}
.callout.warn{
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.08);
}
.callout.small{ padding: 12px; }
.callout-title{
  font-weight: 800;
  margin-bottom: 6px;
}
.callout-body{
  opacity: 0.9;
  line-height: 1.55;
}

.lab-answer{
  margin-top: 12px;
  padding: 14px;
}
.lab-answer-title{
  font-weight: 800;
  margin-bottom: 10px;
}
.lab-answer-actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.result{
  margin-top: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.result.ok{
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.08);
}
.result.bad{
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.08);
}
.result-line{ margin: 6px 0; }

.lab-steps{
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.steps-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin: 6px 0 10px;
}
.steps-title{
  font-weight: 900;
}
.steps-controls{
  display:flex;
  align-items:center;
  gap:10px;
}
.steps-counter{
  font-size: 13px;
  opacity: 0.8;
}
.step-view{
  margin-bottom: 10px;
}

.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}
.table th{
  text-align:left;
  font-weight: 800;
  background: rgba(255,255,255,0.04);
}
.table.compact th, .table.compact td{
  padding: 8px 8px;
}
.table tr:last-child td{ border-bottom: none; }
.table tr.hlrow td{
  outline: 2px solid rgba(99,102,241,0.65);
  background: rgba(99,102,241,0.12);
}

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 980px){
  .lab-shell{ grid-template-columns: 1fr; }
  .grid2{ grid-template-columns: 1fr; }
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size: 13px;
  opacity: 0.9;
}
.check input{ margin-top: 3px; }

.gantt{
  display:flex;
  width:100%;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.gantt-seg{
  padding: 10px 10px;
  border-right: 1px solid rgba(255,255,255,0.08);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
}
.gantt-seg:last-child{ border-right:none; }
.gantt-seg.idle{
  opacity: 0.65;
}
.gantt-label{ font-weight: 900; }
.gantt-time{ font-size: 12px; opacity: 0.8; }

.blocks{
  display:flex;
  gap:10px;
  width:100%;
}
.block{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  padding: 10px;
  min-width: 90px;
}
.block.hl{
  outline: 2px solid rgba(245,158,11,0.55);
}
.block-top{
  font-weight: 900;
  font-size: 12px;
  opacity: 0.95;
}
.block-bottom{
  font-size: 12px;
  opacity: 0.75;
  margin-top: 8px;
}
.block-bar{
  height: 10px;
  border-radius: 999px;
  overflow:hidden;
  margin-top: 10px;
  display:flex;
  border: 1px solid rgba(255,255,255,0.10);
}
.block-used{ background: rgba(99,102,241,0.75); }
.block-free{ background: rgba(255,255,255,0.12); }

.graph-wrap{
  margin-top: 16px;
  display:flex;
  justify-content:center;
  padding: 8px;
}
.graph-wrap svg {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.graph-wrap svg:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
}

/* RAG Container specific styles */
.rag-container {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: 16px;
  padding: 12px;
}

/* WFG Container specific styles */
.wfg-container {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: 16px;
  padding: 12px;
}

/* Edge animations */
.rag-edge-req, .rag-edge-ass, .wfg-edge {
  transition: stroke-width 0.2s ease, opacity 0.2s ease;
}
.graph-wrap svg:hover .rag-edge-req,
.graph-wrap svg:hover .rag-edge-ass,
.graph-wrap svg:hover .wfg-edge {
  stroke-width: 3;
}

.graph{
  width: 100%;
  max-width: 620px;
  height: auto;
}

.stack{ display:flex; flex-direction:column; gap:10px; }
.mem-row{ display:flex; gap:12px; align-items:center; }
.mem-label{ min-width: 120px; }
.hidden{ display:none !important; }
