/* Lucravis Urlaubstransfer — Design System */

:root {
  --bg-0: #050505;
  --bg-1: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #191919;
  --bg-hover: rgba(255, 255, 255, 0.03);
  --bg-active: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-1: rgba(255, 255, 255, 0.95);
  --text-2: rgba(255, 255, 255, 0.55);
  --text-3: rgba(255, 255, 255, 0.35);
  --accent: #fff;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #eab308;
  --blue: #3b82f6;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", "Cascadia Code", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 150ms ease;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Selection */
::selection {
  background: rgba(59, 130, 246, 0.3);
}

body {
  font-family: var(--sans);
  background: var(--bg-1);
  color: var(--text-1);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Header ─── */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.logo span {
  color: var(--text-2);
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 12px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 450;
  color: var(--text-3);
  transition: all var(--transition);
  cursor: default;
  white-space: nowrap;
  border-radius: 6px;
}

.step-item.active {
  color: var(--text-1);
  background: var(--bg-active);
}

.step-item.completed {
  color: var(--text-2);
}

.step-item .step-check {
  display: none;
  font-size: 10px;
  color: var(--success);
}

.step-item.completed .step-check {
  display: inline;
}

.step-separator {
  width: 16px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* Connection + trust */
.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}

.status-dot.connected { background: var(--success); }
.status-dot.disconnected { background: var(--error); }
.status-dot.running { background: var(--warning); }

.trust-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 9999px;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.trust-badge.building {
  color: var(--warning);
  border-color: rgba(234, 179, 8, 0.3);
}

.trust-badge.trusted {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

/* Log toggle button */
.log-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
}

.log-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-1);
  border-color: var(--border-strong);
}

/* ─── Layout ─── */

.layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

.main {
  flex: 1;
  padding: 32px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Activity sidebar ─── */

.sidebar {
  width: 360px;
  border-left: 1px solid var(--border);
  background: var(--bg-0);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: margin-right var(--transition);
}

.sidebar.collapsed {
  display: none;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h3 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all var(--transition);
}

.sidebar-close:hover {
  color: var(--text-1);
  background: var(--bg-hover);
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.log-entry {
  padding: 8px 20px;
  display: flex;
  gap: 12px;
  font-size: 12px;
  line-height: 1.5;
  transition: background var(--transition);
  animation: logSlide 200ms ease;
}

@keyframes logSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-entry:hover {
  background: var(--bg-hover);
}

.log-entry-time {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
  min-width: 50px;
}

.log-entry-text {
  color: var(--text-2);
  word-break: break-word;
}

.log-entry.error .log-entry-text {
  color: var(--error);
}

/* ─── Welcome state ─── */

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 16px;
  position: relative;
}

.welcome::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.welcome h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-1);
  position: relative;
}

.welcome p {
  font-size: 15px;
  color: var(--text-2);
  max-width: 420px;
  line-height: 1.7;
  position: relative;
}

.welcome .btn {
  margin-top: 12px;
  position: relative;
  padding: 10px 28px;
  font-size: 14px;
}

/* ─── Phase sections ─── */

.phase {
  animation: fadeIn 200ms ease;
}

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

.phase-header {
  margin-bottom: 24px;
}

.phase-header h2 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin-bottom: 6px;
}

.phase-header p {
  font-size: 13px;
  color: var(--text-2);
}

/* ─── Cards ─── */

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

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

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* System cards for setup */
.system-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.system-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.system-card:hover {
  border-color: var(--border-strong);
}

.system-card.ready {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.04);
}

.system-card.opening {
  border-color: rgba(234, 179, 8, 0.2);
}

.system-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
  transition: background 300ms ease, box-shadow 300ms ease;
}

.system-card.opening .system-card-dot {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
  animation: dotPulse 2s ease-in-out infinite;
}

.system-card.ready .system-card-dot {
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.system-card-info {
  flex: 1;
}

.system-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
}

.system-card-status {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

/* Callout */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.callout-info {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--blue);
}

.callout-warning {
  background: rgba(234, 179, 8, 0.06);
  border: 1px solid rgba(234, 179, 8, 0.15);
  color: var(--warning);
}

.callout-error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--error);
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-1);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-1);
  border-color: var(--border-strong);
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

/* ─── Tables ─── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-1);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: var(--bg-hover);
}

/* Mono data cells */
td.mono {
  font-family: var(--mono);
  font-size: 12px;
}

/* Dimmed/skipped rows */
tbody tr.dimmed {
  opacity: 0.35;
}

/* Error rows */
tbody tr.row-error td {
  color: var(--error);
}

/* ─── Discovery: two-column mapping ─── */

.discovery-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.discovery-column {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 200ms ease;
}

.discovery-column:hover {
  border-color: var(--border-strong);
}

.discovery-column-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.discovery-column-header .field-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.field-row {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background var(--transition);
}

.field-row:hover {
  background: var(--bg-hover);
}

.field-row:last-child {
  border-bottom: none;
}

.field-confidence {
  width: 3px;
  height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}

.field-confidence.high { background: var(--success); }
.field-confidence.medium { background: var(--warning); }
.field-confidence.low { background: var(--error); }

.field-info {
  flex: 1;
  min-width: 0;
}

.field-name {
  font-size: 13px;
  font-weight: 450;
  color: var(--text-1);
  margin-bottom: 2px;
}

.field-header {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.field-samples {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Preview ─── */

.preview-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-2);
}

.preview-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-stat .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.preview-stat .dot.green { background: var(--success); }
.preview-stat .dot.amber { background: var(--warning); }
.preview-stat .dot.blue { background: var(--blue); }

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

/* Custom checkbox */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--text-2);
}

input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 8px;
  border: solid var(--bg-1);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ─── Transfer pipeline ─── */

.pipeline {
  margin-top: 20px;
}

.pipeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background var(--transition);
}

.pipeline-item:hover {
  background: var(--bg-hover);
}

.pipeline-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  transition: all 300ms ease;
}

.pipeline-icon.waiting {
  color: var(--text-3);
  border-color: var(--border);
}

.pipeline-icon.processing {
  color: var(--blue);
  border-color: var(--blue);
  animation: processingPulse 1.2s ease-in-out infinite;
}

.pipeline-icon.done {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

.pipeline-icon.error {
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

@keyframes processingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0); }
}

.pipeline-name {
  flex: 1;
  color: var(--text-1);
}

.pipeline-detail {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.pipeline-error {
  font-size: 12px;
  color: var(--error);
  margin-left: 32px;
  padding: 4px 0;
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: var(--text-1);
  border-radius: 2px;
  transition: width 400ms ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}

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

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-2);
}

.progress-info .mono {
  font-family: var(--mono);
  font-size: 11px;
}

/* ─── Results ─── */

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 300ms ease, box-shadow 300ms ease, transform 200ms ease;
}

.result-card:hover {
  transform: translateY(-2px);
}

.result-card.success {
  border-color: rgba(34, 197, 94, 0.25);
  box-shadow: 0 4px 24px rgba(34, 197, 94, 0.06);
}

.result-card.error {
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.06);
}

.result-card.skipped {
  border-color: rgba(234, 179, 8, 0.25);
  box-shadow: 0 4px 24px rgba(234, 179, 8, 0.06);
}

.result-card.duration {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.06);
}

.result-number {
  font-size: 36px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.result-card.success .result-number { color: var(--success); }
.result-card.error .result-number { color: var(--error); }
.result-card.skipped .result-number { color: var(--warning); }
.result-card.duration .result-number { color: var(--blue); }

.result-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

/* Transfer log section in results */
#transfer-log {
  margin-top: 8px;
}

.transfer-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.transfer-log-header h3 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.transfer-log-header .btn-group {
  margin-top: 0;
}

/* ─── Structural alert ─── */

.structural-alert {
  margin-bottom: 24px;
}

.structural-alert h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--warning);
  margin-bottom: 4px;
}

.structural-alert p {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
}

/* ─── Auto-mode ─── */

.auto-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}

.auto-mode-toggle input[type="checkbox"] {
  accent-color: var(--success);
  width: 13px;
  height: 13px;
}

/* ─── Discovery error ─── */

#discovery-error {
  margin-top: 16px;
  text-align: center;
}

#discovery-error .btn {
  margin-top: 12px;
}

/* Staggered entrance for result cards */
.result-grid .result-card:nth-child(1) { animation: cardIn 300ms ease 0ms both; }
.result-grid .result-card:nth-child(2) { animation: cardIn 300ms ease 60ms both; }
.result-grid .result-card:nth-child(3) { animation: cardIn 300ms ease 120ms both; }
.result-grid .result-card:nth-child(4) { animation: cardIn 300ms ease 180ms both; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Pipeline item stagger — delay set via inline style --i */
.pipeline-item {
  animation: slideIn 200ms ease both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

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

/* Table wrap hover */
.table-wrap {
  transition: border-color 200ms ease;
}

.table-wrap:hover {
  border-color: var(--border-strong);
}

/* Callout enter */
.callout {
  animation: fadeIn 200ms ease;
}

/* ─── Teaching modal ─── */

.teaching-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.teaching-overlay.hidden { display: none; }

.teaching-modal {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: fadeIn 200ms ease;
}

.teaching-modal-header h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin: 0 0 16px;
}

.teaching-modal-body p {
  font-size: 13px;
  margin: 0 0 16px;
  color: var(--text-2);
  line-height: 1.6;
}

.teaching-modal-footer {
  margin-top: 16px;
  text-align: right;
}

/* ─── Tier badge ─── */

.tier-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--text-2);
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── Utility ─── */

.hidden {
  display: none !important;
}

.text-mono {
  font-family: var(--mono);
}

.text-muted {
  color: var(--text-2);
}

.text-sm {
  font-size: 12px;
}

.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ─── Responsive ─── */

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    z-index: 90;
    border-left: 1px solid var(--border);
  }

  .sidebar.collapsed {
    display: none;
  }

  .main {
    padding: 24px;
  }

  .discovery-columns {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header {
    padding: 0 16px;
  }

  .step-indicator {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
}
