:root {
  --bg: #070b11;
  --surface: #0d131d;
  --surface-2: #121b29;
  --surface-3: #182334;
  --border: #22324a;
  --border-hi: #304769;
  --text: #e6eef8;
  --text-dim: #8da2be;
  --text-muted: #617794;
  --cyan: #00d4ff;
  --cyan-soft: rgba(0, 212, 255, 0.14);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.15);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.15);
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'JetBrains Mono', 'Consolas', ui-monospace, monospace;
  --radius: 10px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 12% 0%, #0e1a2c 0%, var(--bg) 48%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.48;
  min-height: 100vh;
}

code, pre {
  font-family: var(--font-mono);
}

code {
  background: rgba(0, 212, 255, 0.08);
  color: #7ee7ff;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}

.app-shell {
  max-width: 1860px;
  margin: 0 auto;
  padding: 12px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(18, 27, 41, 0.96), rgba(13, 19, 29, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-text h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f4f9ff;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-dim);
}

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

.preset-switcher {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.preset-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.preset-btn.active {
  background: var(--surface-3);
  border-color: var(--border-hi);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.2);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }

.wcet-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.wcet-input-wrap input {
  width: 66px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 6px;
  text-align: right;
}

.gate-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.gate-pill.fail {
  background: var(--red-soft);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}

.gate-pill.pass {
  background: var(--green-soft);
  border-color: rgba(16, 185, 129, 0.55);
  color: #6ee7b7;
}

.gate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Badges & Buttons */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-cyan { background: var(--cyan-soft); color: #7ee7ff; border-color: rgba(0, 212, 255, 0.35); }
.badge-green { background: var(--green-soft); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }
.badge-amber { background: var(--amber-soft); color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); }
.badge-red { background: var(--red-soft); color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }
.badge-violet { background: var(--violet-soft); color: #ddd6fe; border-color: rgba(167, 139, 250, 0.4); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-hi);
  background: var(--surface-3);
  color: var(--text);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.btn:hover { background: #1e2d44; border-color: #466693; }
.btn-sm { padding: 4px 10px; font-size: 11.5px; }
.btn-primary { background: linear-gradient(180deg, #009bc2, #007ea0); border-color: #00d4ff; color: #ffffff; }
.btn-primary:hover { background: linear-gradient(180deg, #00b2dd, #008eb4); }
.btn-accent { background: rgba(0, 212, 255, 0.14); border-color: rgba(0, 212, 255, 0.5); color: #7ee7ff; }
.btn-accent:hover { background: rgba(0, 212, 255, 0.24); }
.btn-danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.26); }
.btn-success { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.btn-success:hover { background: rgba(16, 185, 129, 0.26); }
.btn-secondary.active { background: var(--cyan-soft); border-color: var(--cyan); color: #ffffff; }

.file-btn input[type="file"] { display: none; }

/* Navigation Tab Bar */
.tabbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.tab-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-hi);
}

.tab-btn.active {
  background: linear-gradient(180deg, #132134, #0f1928);
  border-color: var(--cyan);
  color: #ffffff;
  box-shadow: inset 0 -2px 0 var(--cyan), 0 4px 16px rgba(0, 212, 255, 0.1);
}

.tab-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  opacity: 0.85;
}

.tab-btn > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Panels & Cards */
.tab-panel { display: none; flex-direction: column; gap: 12px; }
.tab-panel.active { display: flex; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h2, .card-header h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #f1f7ff;
}

.card-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.toolbar-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.toolbar-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.kpi-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.kpi-card.alert-red { border-color: rgba(239, 68, 68, 0.55); background: linear-gradient(180deg, rgba(239, 68, 68, 0.1), var(--surface)); }
.kpi-card.alert-green { border-color: rgba(16, 185, 129, 0.5); background: linear-gradient(180deg, rgba(16, 185, 129, 0.09), var(--surface)); }
.kpi-card.alert-amber { border-color: rgba(245, 158, 11, 0.5); background: linear-gradient(180deg, rgba(245, 158, 11, 0.09), var(--surface)); }

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.kpi-card.alert-red .kpi-value { color: #fca5a5; }
.kpi-card.alert-green .kpi-value { color: #6ee7b7; }
.kpi-card.alert-amber .kpi-value { color: #fcd34d; }

.kpi-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Diagnostic Banner */
.diagnostic-banner {
  border-radius: 9px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.diagnostic-banner.danger {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.05));
  border-color: rgba(239, 68, 68, 0.55);
}

.diagnostic-banner.success {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.05));
  border-color: rgba(16, 185, 129, 0.5);
}

.diagnostic-banner.warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.05));
  border-color: rgba(245, 158, 11, 0.5);
}

.diag-body { flex: 1; min-width: 260px; }
.diag-title { font-weight: 700; font-size: 13.5px; color: #ffffff; margin-bottom: 3px; }
.diag-desc { font-size: 12.5px; color: #cbd8ea; }

/* Canvas & Gantt */
.zoom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.zoom-wrap input[type="range"] {
  width: 84px;
  accent-color: var(--cyan);
}

.legend-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 4px 0 2px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
}

.canvas-stage {
  position: relative;
  width: 100%;
  background: #080d14;
  border: 1px solid #1b283c;
  border-radius: 8px;
  overflow: hidden;
}

.canvas-stage canvas {
  display: block;
  width: 100%;
}

.canvas-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  background: rgba(9, 14, 22, 0.96);
  border: 1px solid var(--cyan);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #eef6ff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  max-width: 320px;
  white-space: pre-line;
}

.hidden { display: none !important; }

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 12px;
}

.grid-2-equal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stack-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Tables */
.table-scroll {
  max-height: 255px;
  overflow: auto;
  border: 1px solid #1c2a3f;
  border-radius: 7px;
  background: #090e16;
}

.slog2-scroll {
  max-height: 230px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #101927;
  color: var(--text-dim);
  font-weight: 700;
  text-align: left;
  padding: 7px 9px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 6px 9px;
  border-bottom: 1px solid rgba(34, 50, 74, 0.55);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(0, 212, 255, 0.05);
}

.data-table tr.row-danger td {
  background: rgba(239, 68, 68, 0.11);
}

.data-table tr.row-warn td {
  background: rgba(245, 158, 11, 0.1);
}

/* Custom Import Drawer */
.import-drawer {
  background: #0a1019;
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.import-field input[type="file"] {
  font-size: 10.5px;
  color: var(--text-muted);
  max-width: 100%;
}

.import-field textarea {
  background: #070b11;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px;
  resize: vertical;
}

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

.hint-text { font-size: 11.5px; color: var(--text-muted); }

/* Tab 2: Code Editor + Rules + Findings */
.code-editor-wrap {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  background: #070b11;
  border: 1px solid #1e2d43;
  border-radius: 8px;
  overflow: hidden;
  min-height: 360px;
}

.line-gutter {
  margin: 0;
  padding: 10px 6px;
  background: #0b111b;
  border-right: 1px solid #1b283d;
  color: var(--text-muted);
  text-align: right;
  font-size: 12px;
  line-height: 1.55;
  user-select: none;
  overflow: hidden;
}

.code-editor {
  width: 100%;
  min-height: 360px;
  background: transparent;
  border: none;
  color: #dbeafe;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  white-space: pre;
  overflow: auto;
}

.meta-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.rule-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #090f18;
  border: 1px solid var(--border);
  font-size: 11.5px;
}

.rule-chip.pass { border-color: rgba(16, 185, 129, 0.35); }
.rule-chip.fail { border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.08); }
.rule-id { font-family: var(--font-mono); font-weight: 700; color: var(--cyan); flex-shrink: 0; }
.rule-chip.fail .rule-id { color: #fca5a5; }
.rule-chip.pass .rule-id { color: #6ee7b7; }

.score-ring {
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  font-family: var(--font-mono);
  background: #090f18;
}
.score-ring span { font-size: 22px; font-weight: 800; }
.score-ring small { font-size: 11px; color: var(--text-dim); }
.score-ring.pass { border-color: var(--green); color: #6ee7b7; }
.score-ring.warn { border-color: var(--amber); color: #fcd34d; }
.score-ring.fail { border-color: var(--red); color: #fca5a5; }

.findings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.finding-item {
  border-radius: 7px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  background: #090f18;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.finding-item.CRITICAL { border-left: 3px solid var(--red); }
.finding-item.HIGH { border-left: 3px solid var(--amber); }
.finding-item.MEDIUM { border-left: 3px solid #38bdf8; }
.finding-item.PASS { border-left: 3px solid var(--green); background: rgba(16, 185, 129, 0.07); }

.finding-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 12.5px;
}

.finding-detail { font-size: 12px; color: var(--text-dim); }
.finding-fix { font-size: 11.5px; color: #7ee7ff; font-family: var(--font-mono); }

.code-block {
  margin: 0;
  background: #070b11;
  border: 1px solid #1d2b40;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #cfe4ff;
  overflow: auto;
  max-height: 220px;
  white-space: pre;
}

.report-preview {
  max-height: 225px;
  white-space: pre-wrap;
}

.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cmd-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: #080d14;
  border: 1px solid #1b293d;
  border-radius: 7px;
  padding: 6px 9px;
}

.cmd-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
}

.cmd-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #dbeafe;
  overflow-x: auto;
  white-space: nowrap;
}

/* Tab 3: Wait-For Graph & slog2 */
.graph-stage {
  background: #080d14;
  border: 1px solid #1b283c;
  border-radius: 8px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.graph-stage svg {
  width: 100%;
  height: 215px;
  display: block;
}

.graph-findings, .correlations-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-pills {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.pill-btn {
  background: #090e16;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.pill-btn.active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: #ffffff;
}

.slog2-search-row input {
  width: 100%;
  background: #070b11;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 12px;
}

/* Tab 4: Interactive Codelab */
.codelab-hero {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.09), rgba(13, 19, 29, 0.96) 55%);
}

.codelab-hero-left {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.codelab-hero-left h2 {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
}

.codelab-progress-box {
  width: 300px;
  max-width: 100%;
  background: rgba(7, 11, 17, 0.72);
  border: 1px solid var(--border-hi);
  border-radius: 9px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.progress-head strong { color: var(--cyan); font-family: var(--font-mono); }

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #131e2e;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.25s ease;
}

.codelab-progress-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.codelab-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.codelab-sidebar {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.step-nav-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.14s ease;
}

.step-nav-card:hover { background: var(--surface-2); border-color: var(--border-hi); }
.step-nav-card.active { background: #122136; border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.25); }
.step-nav-card.completed { border-color: rgba(16, 185, 129, 0.45); }

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  background: var(--surface-3);
  border: 1px solid var(--border-hi);
  color: var(--cyan);
  flex-shrink: 0;
}

.step-nav-card.completed .step-circle {
  background: var(--green-soft);
  border-color: var(--green);
  color: #6ee7b7;
}

.step-nav-title { font-weight: 700; font-size: 13px; color: #f1f7ff; }
.step-nav-meta { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

.codelab-content {
  padding: 18px 20px;
  gap: 14px;
}

.codelab-step-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.codelab-step-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  color: #ffffff;
}

.codelab-callout {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.32);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #d6f3ff;
}

.snippet-card {
  border: 1px solid #1e2d44;
  border-radius: 8px;
  overflow: hidden;
  background: #070b11;
}

.snippet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #0f1724;
  border-bottom: 1px solid #1d2b40;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.snippet-card pre {
  margin: 0;
  padding: 11px 12px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
  color: #dcecff;
}

.codelab-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* Footer & Toast */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 4px 0;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid rgba(34, 50, 74, 0.6);
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 22px;
  z-index: 999;
  background: #0f1b2d;
  border: 1px solid var(--cyan);
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tabbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2-equal, .codelab-layout { grid-template-columns: 1fr; }
}
