/* ==========================================================================
   Architect21 — AWS SAA-C03 Hands-On Lab Studio Design System
   Refined AWS Cloud Console / Technical Engineering Studio Aesthetic
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg-canvas: #0a1019;
  --bg-surface: #111827;
  --bg-elevated: #172133;
  --bg-hover: #1e2b42;
  --bg-code: #080d14;
  --border: #243247;
  --border-strong: #334663;

  --text-primary: #f1f5f9;
  --text-secondary: #9fb0c8;
  --text-muted: #6c809e;

  --accent: #f59e0b;
  --accent-strong: #fbbf24;
  --accent-bg: rgba(245, 158, 11, 0.12);
  --accent-border: rgba(245, 158, 11, 0.35);

  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.35);

  --sky: #38bdf8;
  --sky-bg: rgba(56, 189, 248, 0.12);
  --sky-border: rgba(56, 189, 248, 0.35);

  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.12);
  --rose-border: rgba(244, 63, 94, 0.35);

  --indigo: #818cf8;
  --indigo-bg: rgba(129, 140, 248, 0.12);
  --indigo-border: rgba(129, 140, 248, 0.35);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --grid-dot: rgba(148, 163, 184, 0.08);
}

[data-theme="light"] {
  --bg-canvas: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover: #eef2f7;
  --bg-code: #0f172a;
  --border: #dde4ee;
  --border-strong: #c3cedf;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent: #d97706;
  --accent-strong: #b45309;
  --accent-bg: rgba(217, 119, 6, 0.1);
  --accent-border: rgba(217, 119, 6, 0.32);

  --emerald: #059669;
  --emerald-bg: rgba(5, 150, 105, 0.1);
  --emerald-border: rgba(5, 150, 105, 0.32);

  --sky: #0284c7;
  --sky-bg: rgba(2, 132, 199, 0.1);
  --sky-border: rgba(2, 132, 199, 0.3);

  --rose: #e11d48;
  --rose-bg: rgba(225, 29, 72, 0.1);
  --rose-border: rgba(225, 29, 72, 0.3);

  --indigo: #4f46e5;
  --indigo-bg: rgba(79, 70, 229, 0.1);
  --indigo-border: rgba(79, 70, 229, 0.3);

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --grid-dot: rgba(15, 23, 42, 0.06);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

code, pre, kbd, .mono {
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   App Shell Layout
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  gap: 14px;
  z-index: 40;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.6);
  backdrop-filter: blur(2px);
  z-index: 60;
}
.sidebar-backdrop.hidden { display: none; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.sidebar-sprint-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
}

.sprint-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.sprint-days-left { font-size: 18px; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }
.sprint-caption { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-canvas);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  transition: width 0.35s ease;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-bg);
  color: var(--accent-strong);
  border: 1px solid var(--accent-border);
  font-weight: 600;
}

.nav-icon { display: flex; align-items: center; flex-shrink: 0; }
.nav-label { flex: 1; }

.nav-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.nav-badge.warn {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}

.nav-badge.ok {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: var(--emerald);
}

.sidebar-divider { height: 1px; background: var(--border); margin: 2px 0; }

.sidebar-days-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.day-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-mini-btn {
  height: 29px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  transition: all 0.15s;
  position: relative;
}

.day-mini-btn:hover { border-color: var(--accent); color: var(--text-primary); transform: translateY(-1px); }
.day-mini-btn.current { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-border); }
.day-mini-btn.done { background: var(--emerald-bg); border-color: var(--emerald-border); color: var(--emerald); }
.day-mini-btn.partial { border-color: var(--sky-border); color: var(--sky); }

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.footer-actions { display: flex; gap: 6px; }

.btn-ghost-sm {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.15s;
  text-align: center;
}

.btn-ghost-sm:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }

.cert-pill {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-elevated);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.dot-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

/* ==========================================================================
   Topbar & Main Content
   ========================================================================== */

.main-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-left { min-width: 0; flex: 1; }
.breadcrumb { font-weight: 600; font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-icon-mobile { display: none; align-items: center; }

.search-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  transition: border-color 0.15s;
}

.search-trigger:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.search-trigger kbd {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.readiness-pill {
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.readiness-pill strong { color: var(--emerald); font-weight: 700; }

.main-content {
  padding: 26px 28px 56px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.mobile-only { display: none; }

/* ==========================================================================
   Typography & Common Components
   ========================================================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 760px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

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

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #0b111b;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong); }

.btn-emerald {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: var(--emerald);
}
.btn-emerald:hover { background: var(--emerald); color: #05130d; }

.btn-rose {
  background: var(--rose-bg);
  border-color: var(--rose-border);
  color: var(--rose);
}
.btn-rose:hover { background: var(--rose); color: #fff; }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-amber { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent-strong); }
.badge-emerald { background: var(--emerald-bg); border-color: var(--emerald-border); color: var(--emerald); }
.badge-sky { background: var(--sky-bg); border-color: var(--sky-border); color: var(--sky); }
.badge-rose { background: var(--rose-bg); border-color: var(--rose-border); color: var(--rose); }
.badge-indigo { background: var(--indigo-bg); border-color: var(--indigo-border); color: var(--indigo); }

/* Grids */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lab-layout > *, .sim-layout > *, .hero-banner > *, .delta-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.stack-md { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Stat Cards */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat-sub { font-size: 12px; color: var(--text-secondary); }

/* Callouts */
.callout {
  border-radius: 10px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout-amber { background: var(--accent-bg); border-color: var(--accent-border); }
.callout-sky { background: var(--sky-bg); border-color: var(--sky-border); }
.callout-emerald { background: var(--emerald-bg); border-color: var(--emerald-border); }
.callout-rose { background: var(--rose-bg); border-color: var(--rose-border); }

.callout-icon { font-size: 16px; line-height: 1.4; flex-shrink: 0; }
.callout-body { flex: 1; min-width: 0; }
.callout-title { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.callout-text { font-size: 13px; color: var(--text-secondary); margin: 0; }
.callout-amber .callout-title { color: var(--accent-strong); }
.callout-sky .callout-title { color: var(--sky); }
.callout-emerald .callout-title { color: var(--emerald); }
.callout-rose .callout-title { color: var(--rose); }

/* ==========================================================================
   Dashboard Specific
   ========================================================================== */

.hero-banner {
  background:
    radial-gradient(circle at 92% 15%, rgba(245, 158, 11, 0.14), transparent 42%),
    radial-gradient(circle at 12% 90%, rgba(56, 189, 248, 0.09), transparent 40%),
    var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.hero-desc { margin: 0 0 16px; color: var(--text-secondary); font-size: 13.5px; }

.next-lab-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.domain-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.domain-row:last-child { border-bottom: none; padding-bottom: 0; }
.domain-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.domain-name { font-weight: 600; }

.phase-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  overflow: hidden;
}

.phase-header {
  padding: 13px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.phase-title { font-weight: 700; font-size: 14px; }
.phase-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
  padding: 14px 16px;
}

.day-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: all 0.15s;
  cursor: pointer;
}

.day-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.day-card.done { border-color: var(--emerald-border); }
.day-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.day-num { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.day-card.done .day-num { color: var(--emerald); }
.day-card-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; color: var(--text-primary); }
.day-card-sub { font-size: 12px; color: var(--text-secondary); line-height: 1.4; flex: 1; }
.day-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-muted); padding-top: 6px; border-top: 1px solid var(--border); }

/* DVA Delta Comparison */
.delta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.delta-col {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg-elevated);
}
.delta-col h4 { margin: 0 0 10px; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.delta-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.delta-list strong { color: var(--text-primary); }

/* ==========================================================================
   Lab Studio View
   ========================================================================== */

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

.lab-day-switcher {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mode-tabs {
  display: inline-flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.mode-tab {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.mode-tab:hover { color: var(--text-primary); }
.mode-tab.active { background: var(--bg-surface); color: var(--accent-strong); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

/* Interactive Architecture Diagram Canvas */
.diagram-wrap {
  background:
    radial-gradient(var(--grid-dot) 1px, transparent 1px),
    var(--bg-code);
  background-size: 16px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  overflow: hidden;
}

.diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.diagram-svg-box {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.diagram-svg-box svg {
  width: 100%;
  height: auto;
  min-width: 560px;
  display: block;
}

.arch-node {
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}

.arch-node:hover { filter: brightness(1.18); }
.arch-node.selected rect.node-box { stroke: #fbbf24 !important; stroke-width: 2.4 !important; }

.diagram-inspector {
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #2a3b55;
  color: #e2e8f0;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.diagram-inspector strong { color: #fbbf24; }

/* Lab Steps */
.step-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.15s;
}

.step-card.completed { border-color: var(--emerald-border); }

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.step-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: transparent;
  transition: all 0.15s;
}

.step-card.completed .step-checkbox {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #05130d;
}

.step-title-wrap { flex: 1; }
.step-num { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.step-title { font-weight: 700; font-size: 14px; margin: 1px 0 0; }

.step-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }

.console-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}
.console-steps strong { color: var(--text-primary); }

/* Terminal Code Block */
.code-block {
  background: var(--bg-code);
  border: 1px solid #243247;
  border-radius: 9px;
  overflow: hidden;
  color: #e2e8f0;
}

.code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid #1e293b;
  font-size: 11px;
  color: #94a3b8;
}

.copy-btn {
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.copy-btn:hover { background: rgba(245, 158, 11, 0.25); }

.code-block pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 12px;
  line-height: 1.55;
  color: #e2e8f0;
}

.verify-box {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--text-primary);
}
.verify-box strong { color: var(--emerald); }

/* Lab Sidebar Notes & Teardown */
.notes-area {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}
.notes-area:focus { outline: none; border-color: var(--accent); }

/* ==========================================================================
   Architecture Simulator & Comparator
   ========================================================================== */

.sim-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.scenario-btn {
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s;
}
.scenario-btn:hover { border-color: var(--border-strong); }
.scenario-btn.active { border-color: var(--accent); background: var(--accent-bg); }
.scenario-btn.solved { border-color: var(--emerald-border); }

.toggle-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background 0.18s;
  flex-shrink: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s;
}

.switch.on { background: var(--emerald); }
.switch.on::after { transform: translateX(18px); }

.trace-log {
  background: var(--bg-code);
  border: 1px solid #243247;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.trace-hop { display: flex; gap: 10px; align-items: flex-start; }
.trace-hop.pass .hop-status { color: #10b981; font-weight: 700; }
.trace-hop.fail .hop-status { color: #f43f5e; font-weight: 700; }
.trace-hop.info .hop-status { color: #38bdf8; font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  text-align: left;
  padding: 10px 13px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.data-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-secondary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { font-weight: 700; color: var(--text-primary); }

/* ==========================================================================
   Exam Simulator & Quiz Cards
   ========================================================================== */

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  transition: all 0.15s;
  font-size: 13.5px;
}

.quiz-option:hover:not(:disabled) { border-color: var(--accent-border); background: var(--bg-hover); }
.quiz-option.selected { border-color: var(--accent); background: var(--accent-bg); }
.quiz-option.correct { border-color: var(--emerald); background: var(--emerald-bg); }
.quiz-option.wrong { border-color: var(--rose); background: var(--rose-bg); }

.opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.quiz-option.selected .opt-letter { background: var(--accent); color: #0b111b; border-color: var(--accent); }
.quiz-option.correct .opt-letter { background: var(--emerald); color: #05130d; border-color: var(--emerald); }
.quiz-option.wrong .opt-letter { background: var(--rose); color: #fff; border-color: var(--rose); }

.exam-timer {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent-strong);
}

.q-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.q-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.q-dot.current { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-bg); }
.q-dot.answered { background: var(--sky-bg); border-color: var(--sky-border); color: var(--sky); }
.q-dot.flagged { box-shadow: inset 0 0 0 2px var(--accent); }
.q-dot.correct { background: var(--emerald-bg); border-color: var(--emerald-border); color: var(--emerald); }
.q-dot.wrong { background: var(--rose-bg); border-color: var(--rose-border); color: var(--rose); }

/* Range Slider */
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="date"], input[type="text"], select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 7px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}
input[type="date"]:focus, input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ==========================================================================
   Modal & Toast
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: start center;
  padding-top: 9vh;
  z-index: 100;
}

.modal-backdrop.hidden { display: none; }

.modal-box {
  width: min(680px, 92vw);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14.5px;
  padding: 4px;
}
.search-input-wrap input:focus { outline: none; }

.search-results {
  max-height: 58vh;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.search-item:hover { background: var(--bg-hover); }

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--emerald-border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  animation: slideIn 0.2s ease;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
  .lab-layout, .sim-layout, .hero-banner, .delta-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(290px, 86vw);
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .main-content { padding: 18px 14px 48px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .search-trigger span:not(.search-icon-mobile) { display: none; }
  .search-trigger kbd { display: none; }
  .search-icon-mobile { display: inline-flex; }
  .search-trigger { padding: 6px 10px; gap: 0; }
}

@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
  .page-title, .hero-title { font-size: 20px; }
  .card, .hero-banner { padding: 15px 14px; }
  .step-header, .step-body { padding: 12px; }
  .badge { white-space: normal; line-height: 1.3; }
  .mode-tabs { display: flex; flex-wrap: wrap; width: 100%; }
  .mode-tab { flex: 1 1 auto; text-align: center; padding: 7px 10px; font-size: 12px; }
  .lab-day-switcher > .row-wrap { width: 100%; }
  #labDaySelect { flex: 1 1 160px; min-width: 0; max-width: 100%; }
  #decoderSearchInput, #matrixFilterInput { min-width: 0 !important; width: 100%; }
  .readiness-pill { padding: 5px 8px; font-size: 11.5px; white-space: nowrap; }
  .breadcrumb { font-size: 13px; }
  .code-bar { flex-wrap: wrap; gap: 6px; }
  .trace-hop { flex-direction: column; gap: 2px; }
  .modal-backdrop { padding: 12px; padding-top: 6vh; }
  .modal-box { width: 100%; }
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
}
