:root {
  --bg: #080d1a;
  --surface: #0f1629;
  --surface-2: #151e35;
  --border: #1e293b;
  --border-bright: #334155;

  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --text-muted: #64748b;

  --cream: #f6f2e9;
  --cream-text: #111827;
  --coral: #f97316;
  --coral-soft: rgba(249, 115, 22, 0.14);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.14);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.15);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.14);

  --font-display: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 45%, transparent 90%);
  z-index: 0;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 22px;
  background: rgba(8, 13, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand-braces {
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 1rem;
  font-weight: 700;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover { color: var(--text); background: var(--surface); }

.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-bright);
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
}

.rank-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  font-size: 0.78rem;
}

.rank-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  background: var(--coral);
  color: #0b0e16;
  padding: 2px 7px;
  border-radius: 999px;
}

.rank-name { color: var(--text-dim); font-weight: 500; }

.xp-chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
}

.track-picker select {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  border-radius: 7px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

/* MAIN LAYOUT */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1460px;
  margin: 0 auto;
  padding: 20px 22px 56px;
}

.view-section { display: none; }
.view-section.active { display: block; animation: fadeIn 0.16s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* NEVER MISS TWICE */
.nmt-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--rose-soft);
  border: 1px solid rgba(251, 113, 133, 0.4);
  font-size: 0.88rem;
}
.nmt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 8px var(--rose); }
.nmt-text { flex: 1; }

/* PANELS & LABELS */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

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

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.mono-muted {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.panel-sub { margin: 3px 0 0; font-size: 0.82rem; color: var(--text-dim); }

/* WORKSPACE HERO */
.workspace-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}

.ws-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ws-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.ws-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.ws-sub {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 0.94rem;
}

/* TICKET INBOX CARD (learnshopify.dev Sarah Okonkwo card style) */
.inbox-ticket-card {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-left: 3px solid var(--coral);
  border-radius: 14px;
  padding: 16px 18px;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

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

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  color: #08101c;
  background: var(--teal);
  flex-shrink: 0;
}

.avatar.sm { width: 30px; height: 30px; font-size: 0.72rem; }

.sender-name { font-weight: 600; font-size: 0.88rem; }
.sender-role { font-size: 0.74rem; color: var(--text-muted); }

.ticket-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
}

.ticket-subject {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.16rem;
}

.ticket-preview {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

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

/* KPIs & CURVE */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.kpi-val { font-family: var(--font-mono); font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.kpi-val.coral { color: var(--coral); }
.kpi-val.emerald { color: var(--emerald); }
.kpi-unit { font-size: 0.74rem; color: var(--text-muted); margin-left: 2px; }
.kpi-label { font-size: 0.72rem; color: var(--text-dim); margin-top: 3px; }

.curve-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.curve-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
#compoundSvg { width: 100%; height: 76px; display: block; }

.phase-bars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

.phase-bar-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.phase-bar-top { display: flex; justify-content: space-between; font-size: 0.74rem; margin-bottom: 5px; }
.phase-bar-top span { font-family: var(--font-mono); color: var(--text-dim); }
.bar-track { height: 5px; border-radius: 999px; background: #1c2538; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--coral), var(--emerald)); }

/* HEATMAP MATRIX */
.matrix-panel { margin-bottom: 18px; }

.legend { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.cell { width: 11px; height: 11px; border-radius: 3px; display: inline-block; background: #192235; }
.cell.gateway { background: var(--amber); }
.cell.done { background: var(--emerald); }
.cell.active-ring { outline: 2px solid #fff; outline-offset: 1px; }

.heatmap-scroll { overflow-x: auto; padding-bottom: 6px; }
.heatmap-grid { display: grid; grid-template-columns: repeat(36, 1fr); gap: 4px; min-width: 600px; padding: 4px 2px; }
.heat-col { display: grid; grid-template-rows: auto repeat(7, 13px); gap: 4px; }
.heat-wk-label { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-muted); text-align: center; }

.heat-cell {
  width: 100%; height: 13px; border-radius: 3px;
  background: #182235; border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; padding: 0;
}
.heat-cell:hover { transform: scale(1.22); border-color: #fff; }
.heat-cell.done { background: var(--emerald); }
.heat-cell.gateway { background: var(--amber); }
.heat-cell.selected { outline: 2px solid #fff; outline-offset: 1px; }

.cue-bar { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cue-inputs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 0.84rem; color: var(--text-dim); }
.cue-inputs input {
  background: var(--bg); border: 1px solid var(--border-bright); color: var(--text);
  border-radius: 6px; padding: 6px 10px; font-family: var(--font-mono); font-size: 0.78rem;
}
.cue-inputs input.short-input { width: 92px; }

/* MODULE OVERVIEW CARDS */
.module-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.module-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.module-card h3 { margin: 4px 0; font-family: var(--font-display); font-size: 0.98rem; }
.module-card p { margin: 0; font-size: 0.8rem; color: var(--text-dim); }

/* ==================== 3-PANE INTERACTIVE STUDIO ==================== */
.studio-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.studio-crumbs, .studio-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crumb-text { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); }

.lab-type-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
}
.status-pill.done { background: var(--emerald-soft); color: var(--emerald); }
.status-pill.gateway { background: var(--amber-soft); color: var(--amber); }

.mini-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
}

.timer-clock { font-family: var(--font-mono); font-weight: 700; font-size: 0.84rem; margin-right: 4px; }
.preset-btn {
  background: var(--bg); color: var(--text-dim); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 5px; font-family: var(--font-mono); font-size: 0.7rem; cursor: pointer;
}
.preset-btn.active { border-color: var(--coral); color: var(--coral); }

/* 3-PANE GRID */
.three-pane {
  display: grid;
  grid-template-columns: 1.02fr 1.25fr 1fr;
  gap: 12px;
  min-height: calc(100vh - 155px);
}

.pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 145px);
}

.pane-scroll {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-sender-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.studio-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.studio-theme { margin: -8px 0 0; font-size: 0.82rem; color: var(--text-dim); }

.brief-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 9px;
  padding: 12px 14px;
}

.brief-task { margin: 6px 0 0; font-size: 0.92rem; }

.brief-section { display: flex; flex-direction: column; gap: 7px; }

.inline-doc-pills, .resource-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.doc-pill-btn {
  background: var(--teal-soft);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.doc-pill-btn:hover { background: rgba(45, 212, 191, 0.25); }

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--border-bright);
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
}
.resource-link:hover { border-color: var(--coral); color: var(--coral); }

.why-accordion {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.84rem;
}
.why-accordion summary { cursor: pointer; font-weight: 600; color: var(--text); }
.why-accordion p { margin: 8px 0 0; color: var(--text-dim); }

.habit-mini-stack { display: grid; gap: 10px; }
.mini-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px;
}
.mini-card p { margin: 6px 0 8px; font-size: 0.82rem; color: var(--text-dim); }
.gateway-card { border-left: 3px solid var(--amber); }
.stretch-card { border-left: 3px solid var(--emerald); }

.rating-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.rate-btn {
  background: var(--bg); border: 1px solid var(--border-bright); color: var(--text);
  padding: 6px 3px; border-radius: 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-mono); font-size: 0.82rem;
}
.rate-btn span { font-family: var(--font-body); font-size: 0.62rem; color: var(--text-muted); }
.rate-btn.active { background: var(--coral-soft); border-color: var(--coral); color: var(--coral); }

.calibration-advice {
  font-size: 0.8rem; color: var(--text-dim); background: var(--bg);
  border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px;
}

#dayNoteInput {
  width: 100%; background: var(--bg); border: 1px solid var(--border-bright);
  border-radius: 8px; color: var(--text); padding: 8px 10px;
  font-family: var(--font-body); font-size: 0.84rem; resize: vertical;
}
.note-status { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); text-align: right; }

/* PANE 2: EDITOR */
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #0b1120;
  border-bottom: 1px solid var(--border);
}

.file-tabs, .editor-actions { display: flex; gap: 6px; align-items: center; }

.file-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  cursor: pointer;
}
.file-tab.active { background: var(--surface-2); color: var(--teal); border-color: var(--border-bright); }

.hints-drawer {
  background: #141c2f;
  border-bottom: 1px solid var(--border-bright);
  padding: 10px 14px;
}
.hints-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hints-list { margin: 0; padding-left: 18px; font-size: 0.82rem; color: var(--text-dim); }
.hints-list li { margin-bottom: 4px; }

.editor-body {
  flex: 1;
  min-height: 250px;
  position: relative;
  overflow: hidden;
  background: #0b101b;
}

.CodeMirror {
  height: 100% !important;
  font-family: var(--font-mono) !important;
  font-size: 13.5px !important;
  background: #0b101b !important;
}

.fallback-editor {
  width: 100%; height: 100%; border: none; outline: none; resize: none;
  background: #0b101b; color: #e2e8f0; padding: 14px;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55;
}

.task-validator {
  border-top: 1px solid var(--border-bright);
  background: #0c1322;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-progress-row { display: flex; justify-content: space-between; align-items: center; }
.task-dots { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-dim); }
.t-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-bright); display: inline-block; }
.t-dot.active { background: var(--coral); }
.t-dot.passed { background: var(--emerald); }

.first-try-badge {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; background: var(--emerald-soft); color: var(--emerald);
}

.task-prompt { margin: 0; font-size: 0.88rem; color: var(--text); }

.validator-feedback {
  padding: 8px 11px; border-radius: 8px; font-size: 0.83rem; font-weight: 500;
}
.validator-feedback.pass { background: var(--emerald-soft); color: var(--emerald); border: 1px solid rgba(16,185,129,0.4); }
.validator-feedback.fail { background: var(--rose-soft); color: var(--rose); border: 1px solid rgba(251,113,133,0.4); }

.validator-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* PANE 3: PREVIEW & TEST RUNNER */
.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; background: #0b1120; border-bottom: 1px solid var(--border);
}

.mac-dots { display: flex; gap: 5px; }
.mac-dots span { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.mac-dots span:nth-child(1) { background: #ef4444; }
.mac-dots span:nth-child(2) { background: #f59e0b; }
.mac-dots span:nth-child(3) { background: #10b981; }

.preview-url {
  flex: 1; text-align: center; font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--text-dim); background: var(--bg); padding: 3px 10px; border-radius: 6px;
}

.live-pill { font-family: var(--font-mono); font-size: 0.72rem; color: var(--emerald); }

.dom-preview-wrap {
  height: 46%;
  min-height: 220px;
  border-bottom: 1px solid var(--border-bright);
  background: #f8f5ee;
}
#sandboxFrame { width: 100%; height: 100%; border: none; display: block; }

.runner-output {
  flex: 1; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
}

.test-results { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.test-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
  font-family: var(--font-mono); font-size: 0.78rem; background: var(--bg); border: 1px solid var(--border);
}
.test-row.pass { border-color: rgba(16,185,129,0.4); color: var(--emerald); }
.test-row.fail { border-color: rgba(251,113,133,0.45); color: var(--rose); }

.muted-empty { margin: 0; font-size: 0.84rem; color: var(--text-muted); }

.console-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.console-log {
  margin: 0; padding: 10px 12px; border-radius: 8px; background: #070b14;
  border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.78rem;
  color: #cbd5e1; white-space: pre-wrap; min-height: 90px; max-height: 220px; overflow-y: auto;
}

/* SLIDE-OVER DRAWER */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(4, 8, 16, 0.7); z-index: 40;
}
.curriculum-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--surface); border-right: 1px solid var(--border-bright);
  z-index: 50; display: flex; flex-direction: column; padding: 18px;
  box-shadow: 16px 0 40px rgba(0,0,0,0.6);
}
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.drawer-title { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.2rem; }
.drawer-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.phase-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  background: var(--bg); color: var(--text-dim); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 7px; font-size: 0.78rem; cursor: pointer;
}
.filter-chip.active { background: var(--coral-soft); color: var(--coral); border-color: var(--coral); }
.search-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-bright);
  border-radius: 8px; color: var(--text); padding: 8px 12px; font-size: 0.86rem;
}

.weeks-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.week-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.week-header {
  width: 100%; background: transparent; border: none; color: var(--text);
  padding: 11px 13px; display: flex; justify-content: space-between; align-items: center;
  text-align: left; cursor: pointer; gap: 10px;
}
.week-header:hover { background: var(--surface-2); }
.week-num {
  font-family: var(--font-mono); font-size: 0.7rem; padding: 2px 7px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--border-bright); color: var(--coral); margin-right: 8px;
}
.week-days { display: none; border-top: 1px solid var(--border); padding: 8px; gap: 6px; flex-direction: column; }
.week-card.open .week-days { display: flex; }
.week-day-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border);
}
.week-day-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #334155; flex-shrink: 0; }
.status-dot.done { background: var(--emerald); }
.status-dot.gateway { background: var(--amber); }
.week-day-title { font-size: 0.85rem; font-weight: 600; }
.week-day-focus { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.lab-mini-tag {
  font-family: var(--font-mono); font-size: 0.65rem; padding: 1px 6px; border-radius: 4px;
  background: var(--teal-soft); color: var(--teal); margin-left: 6px;
}

/* DOC POPOVER */
.doc-popover {
  position: fixed; bottom: 24px; left: 24px; width: min(410px, 90vw); z-index: 60;
  background: var(--cream); color: var(--cream-text); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.65); border: 2px solid var(--teal);
}
.doc-pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.doc-kind { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: #0f766e; }
.doc-pop-title { margin: 0 0 6px; font-family: var(--font-mono); font-size: 1rem; }
.doc-pop-summary { margin: 0 0 10px; font-size: 0.86rem; color: #334155; }
.doc-pop-code {
  margin: 0; padding: 10px; border-radius: 8px; background: #0f172a; color: #e2e8f0;
  font-family: var(--font-mono); font-size: 0.78rem; overflow-x: auto;
}
.doc-popover .btn-ghost-sm { color: #334155; border-color: #cbd5e1; }

/* DSA VAULT */
.dsa-grid { display: grid; grid-template-columns: 370px 1fr; gap: 18px; align-items: start; }
.dsa-form { display: flex; flex-direction: column; gap: 11px; }
.dsa-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--text-dim); }
.dsa-form input, .dsa-form select {
  background: var(--bg); border: 1px solid var(--border-bright); border-radius: 8px;
  color: var(--text); padding: 8px 10px; font-size: 0.86rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dsa-list { display: flex; flex-direction: column; gap: 9px; }
.dsa-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.dsa-item.due { border-color: rgba(249, 115, 22, 0.55); }
.dsa-item-title { font-weight: 600; font-size: 0.92rem; }
.dsa-item-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
.dsa-item-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.dsa-item-actions { display: flex; align-items: center; gap: 7px; }
.due-pill { font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 8px; border-radius: 999px; background: var(--coral-soft); color: var(--coral); }
.due-pill.ok { background: var(--emerald-soft); color: var(--emerald); }

/* BUTTONS */
button, .file-btn { font-family: var(--font-body); font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.14s ease; }

.btn-cream { background: var(--cream); color: var(--cream-text); border: none; padding: 10px 16px; font-size: 0.88rem; }
.btn-cream:hover { filter: brightness(0.94); }

.btn-primary { background: var(--emerald); color: #04120c; border: none; padding: 9px 15px; font-size: 0.86rem; }
.btn-primary:hover { filter: brightness(1.08); }

.btn-emerald-outline {
  background: var(--emerald-soft); color: var(--emerald); border: 1px solid rgba(16,185,129,0.45);
  padding: 8px 13px; font-size: 0.82rem;
}

.btn-coral-sm { background: var(--coral); color: #0a0f1c; border: none; padding: 5px 11px; font-size: 0.78rem; }
.btn-amber-sm { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(245,158,11,0.45); padding: 6px 11px; font-size: 0.78rem; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border-bright); padding: 8px 13px; font-size: 0.84rem; }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-ghost-sm { background: transparent; color: var(--text-dim); border: 1px solid var(--border-bright); padding: 4px 9px; font-size: 0.76rem; }
.btn-ghost-sm:hover { color: var(--text); border-color: var(--text); }

/* GOOGLE INTERVIEW MODE & LOCAL CLI CARD */
.interview-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border-bright);
  color: var(--text-dim); padding: 5px 11px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 0.74rem; cursor: pointer;
}
.interview-toggle .g-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.interview-toggle.active {
  background: var(--amber-soft); border-color: var(--amber); color: var(--amber);
}
.interview-toggle.active .g-dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.google-pacing-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 10px; border-radius: 10px;
  background: var(--amber-soft); border: 1px solid rgba(245,158,11,0.45);
}
.pacing-steps { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.74rem; color: var(--text); }
.pacing-steps strong { color: var(--amber); }

.google-mode .CodeMirror {
  background: #141414 !important;
  color: #e5e7eb !important;
}
.google-mode .CodeMirror-gutters { background: #141414 !important; border-right: 1px solid #262626 !important; }
.google-mode #hintsToggleBtn { opacity: 0.45; cursor: not-allowed; }
.google-mode #runSubmitBtn.locked { opacity: 0.45; cursor: not-allowed; }

.cli-card { border-left: 3px solid var(--teal); }
.cli-cmd-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #070b14; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px;
}
.cli-cmd-row code { font-family: var(--font-mono); font-size: 0.72rem; color: var(--teal); overflow-x: auto; }

@media (max-width: 1180px) {
  .three-pane { grid-template-columns: 1fr; }
  .pane { max-height: none; }
  .workspace-hero, .dsa-grid { grid-template-columns: 1fr; }
  .module-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .module-cards, .phase-bars { grid-template-columns: 1fr; }
}
