/* PromptLab — Main styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-ui);
  font-size: var(--font-size-md);
  color: var(--fg);
  background: var(--bg);
  overflow: hidden;
}

/* ══════════════════════════════════════
   EDUCATIONAL BANNER
══════════════════════════════════════ */
.edu-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-3) var(--sp-6);
  background: linear-gradient(90deg, var(--banner-bg) 0%, var(--banner-mid) 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.25);
  flex-shrink: 0;
  min-height: 52px;
}

.edu-banner__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.edu-banner__logo img {
  height: 32px;
  width: auto;
  border-radius: var(--r-md);
}

.edu-banner__brand {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.edu-banner__by {
  font-weight: 400;
  font-size: var(--font-size-sm);
  color: var(--banner-sub);
  margin-left: var(--sp-1);
}

.edu-banner__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.edu-banner__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--banner-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edu-banner__sub {
  font-size: var(--font-size-xs);
  color: var(--banner-sub);
  line-height: 1.4;
}

/* ══════════════════════════════════════
   APP SHELL
══════════════════════════════════════ */
body {
  display: flex;
  flex-direction: column;
}

.app {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--border-light);
}

.sidebar__title {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar__new-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--pl-violet);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans);
}

.sidebar__new-btn:hover { background: var(--pl-violet-dim); }

.sidebar__new-btn svg { width: 14px; height: 14px; }

.sidebar__section {
  padding: var(--sp-2) var(--sp-3);
}

.sidebar__section-label {
  font-size: var(--font-size-xs);
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--sp-2) var(--sp-1) var(--sp-1);
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--trans);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--fg);
}

.sidebar__item:hover { background: var(--bg-hover); }
.sidebar__item.active { background: var(--pl-violet-light); color: #c4b5fd; }

.sidebar__item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar__item-text {
  flex: 1;
  overflow: hidden;
}

.sidebar__item-name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__item-meta {
  font-size: var(--font-size-xs);
  color: var(--fg-subtle);
}

.sidebar__badges {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.sidebar__badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar__footer {
  margin-top: auto;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border-light);
  font-size: var(--font-size-xs);
  color: var(--fg-subtle);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   MAIN
══════════════════════════════════════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
  min-width: 0;
}

/* ══════════════════════════════════════
   SETUP VIEW
══════════════════════════════════════ */
.setup-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.setup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-sidebar);
}

.setup-topbar__left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setup-topbar__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--fg-heading);
}

.setup-topbar__sub {
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
}

.setup-topbar__progress {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.progress-bar {
  width: 160px;
  height: 6px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pl-violet), #a855f7);
  border-radius: var(--r-full);
  transition: width var(--trans-slow);
}

.progress-label {
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
  white-space: nowrap;
}

.setup-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-6);
}

.setup-scroll::-webkit-scrollbar { width: 6px; }
.setup-scroll::-webkit-scrollbar-track { background: transparent; }
.setup-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Section card */
.section-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: visible;
  transition: border-color var(--trans);
  margin-bottom: var(--sp-5);
}

.section-card:last-child {
  margin-bottom: 0;
}

.section-card.is-open {
  border-color: rgba(124, 58, 237, 0.45);
}

.section-card:focus-within {
  border-color: var(--pl-violet);
}

.section-card.has-content {
  border-color: rgba(124, 58, 237, 0.35);
}

.section-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: background var(--trans);
}

.section-card__header:hover {
  background: var(--bg-hover);
}

.section-card__chev {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 6px;
  color: var(--fg-subtle);
  transition: transform var(--trans);
}

.section-card__chev svg {
  width: 16px;
  height: 16px;
}

.section-card__chev.is-open {
  transform: rotate(180deg);
}

.section-card__body[hidden] {
  display: none;
}

.section-card__body {
  padding: 0 var(--sp-4) var(--sp-4);
  overflow: visible;
}

.section-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.section-card__icon svg {
  width: 18px;
  height: 18px;
}

.section-card__meta {
  flex: 1;
}

.section-card__label {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--fg-heading);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section-card__label .badge-required {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pl-violet);
  border: 1px solid var(--pl-violet-light);
  border-radius: var(--r-full);
  padding: 1px 6px;
}

.section-card__label .badge-filled {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--r-full);
  padding: 1px 6px;
}

.section-card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
  margin-top: 2px;
}

.section-card__hint {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: rgba(124, 58, 237, 0.06);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--pl-violet-light);
}

.section-card__hint svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--pl-violet);
}

.section-card__hint-text {
  font-size: var(--font-size-xs);
  color: var(--fg-muted);
  line-height: 1.5;
}

.section-card__input-wrap {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--trans), box-shadow var(--trans);
  overflow: hidden;
}

.section-card__input-wrap:focus-within {
  border-color: var(--pl-violet);
  box-shadow: 0 0 0 2px var(--pl-violet-light);
}

.section-card__textarea {
  width: 100%;
  height: 120px;
  min-height: 120px;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--font-size-md);
  line-height: 1.6;
  resize: vertical;
  display: block;
  cursor: text;
  box-sizing: border-box;
}

.section-card__textarea::placeholder { color: var(--fg-subtle); }

/* CTA bar */
.setup-cta {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-sidebar);
  flex-shrink: 0;
}

.setup-cta__info {
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
}

.setup-cta__info strong {
  color: var(--fg);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--pl-violet);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans), opacity var(--trans);
}

.btn-primary:hover { background: var(--pl-violet-dim); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary svg { width: 16px; height: 16px; }

.btn-ghost {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans);
}

.btn-ghost:hover { background: var(--bg-hover); color: var(--fg); }
.btn-ghost svg { width: 14px; height: 14px; }

/* ══════════════════════════════════════
   CHAT VIEW
══════════════════════════════════════ */
.chat-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
  height: 52px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-sidebar);
}

.chat-topbar__left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.chat-topbar__edit-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--fg-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans);
}

.chat-topbar__edit-btn:hover { background: var(--bg-active); color: var(--fg); }
.chat-topbar__edit-btn svg { width: 14px; height: 14px; }

.chat-topbar__model {
  font-size: var(--font-size-xs);
  color: var(--fg-subtle);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: var(--sp-1) var(--sp-3);
}

/* Setup summary pill in topbar */
.setup-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
}

.setup-summary__dots {
  display: flex;
  gap: 3px;
}

.setup-summary__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Empty state */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: var(--sp-4);
  padding: var(--sp-8);
  text-align: center;
}

.chat-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-xl);
  background: var(--pl-violet-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pl-violet);
}

.chat-empty__icon svg { width: 28px; height: 28px; }

.chat-empty__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--fg-heading);
}

.chat-empty__sub {
  font-size: var(--font-size-md);
  color: var(--fg-muted);
  max-width: 400px;
  line-height: 1.6;
}

/* Message bubbles */
.msg {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  max-width: 100%;
}

.msg--user {
  justify-content: flex-end;
}

.msg--user .msg__bubble {
  background: var(--pl-violet);
  color: #fff;
  border-radius: var(--r-xl) var(--r-xl) var(--r-sm) var(--r-xl);
  max-width: 65%;
}

.msg--assistant .msg__bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) var(--r-xl) var(--r-sm);
  max-width: 90%;
}

.msg__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--pl-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: #fff;
}

.msg__avatar svg { width: 16px; height: 16px; }

.msg__bubble {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--font-size-md);
  line-height: 1.6;
}

/* Prompt result block inside assistant bubble */
.prompt-result {
  margin-top: var(--sp-3);
}

.prompt-result__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}

.prompt-result__label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prompt-result__copy {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px var(--sp-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--fg-muted);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: all var(--trans);
}

.prompt-result__copy:hover { background: var(--bg-hover); color: var(--fg); }
.prompt-result__copy svg { width: 12px; height: 12px; }

.prompt-code {
  background: #0d0d0d;
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.prompt-code .pc-section {
  color: #a78bfa;
  font-weight: 700;
}

.prompt-code .pc-value {
  color: #e2e8f0;
}

.prompt-code .pc-request {
  color: #fbbf24;
  font-weight: 600;
}

.prompt-code .pc-empty {
  color: #4b5563;
  font-style: italic;
}

/* Composer */
.chat-composer {
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.composer-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  gap: var(--sp-2);
  transition: border-color var(--trans);
}

.composer-box:focus-within {
  border-color: var(--pl-violet);
}

.composer-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--font-size-md);
  line-height: 1.5;
  resize: none;
  min-height: 24px;
  max-height: 200px;
  overflow-y: auto;
}

.composer-textarea::placeholder { color: var(--fg-subtle); }

.composer-send {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--pl-violet);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #fff;
  transition: background var(--trans), opacity var(--trans);
}

.composer-send:disabled { opacity: 0.35; cursor: not-allowed; }
.composer-send:not(:disabled):hover { background: var(--pl-violet-dim); }
.composer-send svg { width: 15px; height: 15px; }

.composer-hint {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--fg-subtle);
  margin-top: var(--sp-2);
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1c1c2e;
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c4b5fd;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  z-index: 9999;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

/* ══════════════════════════════════════
   SCROLLBAR global
══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* --------------------------------------
   HUB GATE
-------------------------------------- */
.sidebar--hidden {
  display: none;
}

.app--hub .main {
  width: 100%;
}

.hub {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-8) var(--sp-6);
  background:
    radial-gradient(circle at 18% 10%, rgba(124, 58, 237, 0.18), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(167, 139, 250, 0.12), transparent 30%),
    var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}

.hub__hero {
  text-align: center;
  max-width: 640px;
}

.hub__brand {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg-heading);
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}

.hub__brand span {
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hub__lead {
  font-size: var(--font-size-lg);
  color: var(--fg-muted);
  line-height: 1.55;
}

.hub__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  gap: var(--sp-5);
  width: 100%;
  max-width: 720px;
}

@media (max-width: 720px) {
  .hub__cards { grid-template-columns: 1fr; max-width: 400px; }
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--trans), transform var(--trans), background var(--trans);
}

.hub-card:hover {
  transform: translateY(-2px);
  background: var(--bg-surface);
}

.hub-card--base:hover { border-color: rgba(124, 58, 237, 0.55); }
.hub-card--tech:hover { border-color: rgba(52, 211, 153, 0.5); }

.hub-card:focus-visible {
  outline: 2px solid var(--pl-violet);
  outline-offset: 3px;
}

.hub-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
}

.hub-card__icon svg { width: 24px; height: 24px; }

.hub-card--base .hub-card__icon {
  background: var(--pl-violet-light);
  color: #c4b5fd;
}

.hub-card--tech .hub-card__icon {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.hub-card__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--fg-heading);
}

.hub-card__desc {
  font-size: var(--font-size-md);
  color: var(--fg-muted);
  line-height: 1.5;
  flex: 1;
}

.hub-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.hub-card--base .hub-card__cta { color: #c4b5fd; }
.hub-card--tech .hub-card__cta { color: #34d399; }
.hub-card__cta svg { width: 14px; height: 14px; }

.hub__footnote {
  font-size: var(--font-size-xs);
  color: var(--fg-subtle);
  text-align: center;
  max-width: 480px;
  line-height: 1.5;
}

.sidebar__step-num {
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.sidebar__item.active .sidebar__step-num {
  background: var(--pl-violet);
  border-color: transparent;
  color: #fff;
}

.sidebar__item--ahead {
  opacity: 0.55;
}

/* --------------------------------------
   TECH TRACK
-------------------------------------- */
.tech-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tech-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-sidebar);
  flex-shrink: 0;
}

.tech-topbar__eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.tech-topbar__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--fg-heading);
}

.tech-topbar__sub {
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
  margin-top: 2px;
}

.tech-stepper {
  display: flex;
  gap: 6px;
  padding-top: 8px;
}

.tech-stepper__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.tech-stepper__dot.is-done { background: rgba(124, 58, 237, 0.45); }
.tech-stepper__dot.is-current { background: var(--pl-violet); }

.tech-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.tech-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  background: var(--bg-sidebar);
  flex-shrink: 0;
}

.tech-cta .btn-ghost:disabled,
.tech-cta .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tech-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.tech-panel__title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: var(--sp-2);
}

.tech-panel__text {
  font-size: var(--font-size-md);
  color: var(--fg-muted);
  line-height: 1.6;
}

.tech-panel__text code,
.tech-panel__hint code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c4b5fd;
}

.tech-panel__hint {
  margin-top: var(--sp-3);
  font-size: var(--font-size-sm);
  color: var(--fg-subtle);
  line-height: 1.5;
}

.tech-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: var(--pl-violet-light);
  color: #c4b5fd;
}

.tech-notes-wrap {
  margin-top: var(--sp-3);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.tech-notes-wrap:focus-within {
  border-color: var(--pl-violet);
  box-shadow: 0 0 0 2px var(--pl-violet-light);
}

.tech-notes {
  width: 100%;
  min-height: 180px;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
  display: block;
}

.tech-table-wrap {
  overflow-x: auto;
  margin-top: var(--sp-2);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.tech-table th,
.tech-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.tech-table thead th {
  background: rgba(124, 58, 237, 0.12);
  color: #c4b5fd;
  font-weight: 600;
}

.tech-table tbody th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-weight: 600;
  white-space: nowrap;
}

.tech-table tbody td {
  color: var(--fg-muted);
}

.tech-table--score .is-before { color: #f87171; }
.tech-table--score .is-after { color: #34d399; font-weight: 600; }

.tech-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  background: rgba(124, 58, 237, 0.08);
  border-left: 2px solid rgba(124, 58, 237, 0.5);
  border-radius: var(--r-sm);
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
  line-height: 1.5;
}

.tech-callout svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #a78bfa;
}

.tech-callout--warn {
  background: rgba(251, 191, 36, 0.08);
  border-left-color: rgba(251, 191, 36, 0.55);
}

.tech-callout--warn svg { color: #fbbf24; }

.tech-json-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

@media (max-width: 960px) {
  .tech-json-grid { grid-template-columns: 1fr; }
}

.tech-json-card__label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-2);
}

.tech-code {
  background: #0d0d0d;
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin: 0;
}

.tech-code--accent {
  border-color: rgba(52, 211, 153, 0.35);
}

.tech-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.tech-block__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: var(--sp-2);
}

.tech-learn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

@media (max-width: 720px) {
  .tech-learn-grid { grid-template-columns: 1fr; }
}

.tech-learn-card {
  padding: var(--sp-4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.tech-learn-card__title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--fg-heading);
  margin-bottom: var(--sp-2);
}

.tech-learn-card__body {
  font-size: var(--font-size-sm);
  color: var(--fg-muted);
  line-height: 1.5;
}
