/* ─── SITE HEADER ────────────────────────────────────────────────────────── */
.site-header {
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: none;
  margin: 0;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo-row {
  margin-bottom: 0;
  gap: 8px;
}

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

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

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
  margin-left: 4px;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.nav-avatar-wrap { position: relative; margin-left: 4px; flex-shrink: 0; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid transparent; transition: border-color 0.15s; cursor: pointer; overflow: hidden; padding: 0; }
.nav-avatar:hover { border-color: var(--accent-dark, #1d4ed8); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nav-dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: var(--bg); border: 1.5px solid var(--border-dark); border-radius: 12px; min-width: 220px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 1000; padding: 6px 0; }
.nav-dropdown-user { display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; }
.nav-dropdown-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-dropdown-info { min-width: 0; }
.nav-dropdown-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-dropdown-email { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 16px; font-size: 13px; color: var(--text); text-decoration: none; cursor: pointer; width: 100%; background: none; border: none; font-family: inherit; text-align: left; transition: background 0.1s; }
.nav-dropdown-item:hover { background: var(--surface); }
.nav-dropdown-logout { color: var(--text-muted); }
.nav-dropdown-logout:hover { color: #dc2626; background: #fef2f2; }

.nav-btn {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--accent);
  transition: background 0.15s;
  margin-left: 4px;
}

.nav-btn:hover { background: var(--accent-hover); }

/* ── Logged-in vs guest nav visibility ─────────────────────────────────────── */
.nav-guest { display: flex; align-items: center; gap: 2px; }
.nav-auth { display: flex; align-items: center; gap: 8px; }

/* Reports link in nav */
.nav-reports-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  text-decoration: none; padding: 6px 10px;
  border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.nav-reports-link:hover { background: var(--surface); color: var(--text); }
.nav-reports-link svg { flex-shrink: 0; }

/* Upgrade button in nav */
.nav-upgrade-btn {
  font-size: 12px; font-weight: 600;
  color: #854F0B; background: #FAEEDA;
  padding: 5px 12px; border-radius: 8px;
  text-decoration: none; transition: opacity 0.15s;
}
.nav-upgrade-btn:hover { opacity: 0.85; }

.nav-dropdown-plan {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
}
.nav-dropdown-plan.plan-free    { background: #f1f1f1; color: #888; }
.nav-dropdown-plan.plan-basic   { background: #e0f2fe; color: #0369a1; }
.nav-dropdown-plan.plan-pro     { background: #ede9fe; color: #6d28d9; }
.nav-dropdown-plan.plan-power   { background: #FAEEDA; color: #854F0B; }

/* Upgrade item in dropdown */
.nav-dropdown-upgrade { color: var(--accent); }
.nav-dropdown-upgrade:hover { background: var(--accent-light); }

@media (max-width: 540px) {
  .site-header-inner { padding: 0 16px; }
  .nav-link { padding: 6px 8px; font-size: 13px; }
  .nav-btn { padding: 6px 12px; font-size: 13px; }
  .nav-reports-link { display: none; }
}

/* ─── SITE FOOTER ────────────────────────────────────────────────────────── */
.site-footer {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.footer-link:hover { color: var(--text); background: var(--surface2); }

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

@media (max-width: 540px) {
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
}

/* ─── SITE HEADER ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --surface: #f8f9fb;
  --surface2: #f0f2f5;
  --border: #e4e7ec;
  --border-dark: #d0d5dd;
  --accent: #2563eb;
  --accent-light: #eff4ff;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --green-mid: #dcfce7;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.wrap {
  width: 100%;
  max-width: 808px;
  padding: 60px 20px 80px;
  margin: 0 auto;
  position: relative;
}

.top-bar {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 50%, var(--green) 100%);
  flex-shrink: 0;
  position: sticky;
  top: 58px;
  z-index: 99;
}



/* HEADER */
header { margin-bottom: 16px; }

.page-intro {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  margin-bottom: 20px;
}

.page-intro-sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 560px;
}

/* ── SOLVE ACTIONS BAR ───────────────────────────────────────────────────── */
.solve-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}

.solve-actions-question {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── RESULT HEADER ───────────────────────────────────────────────────────── */
.rh-source-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.rh-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 4px;
  cursor: pointer;
}

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

.rh-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  display: block;
}

.rh-toggle:hover { text-decoration: underline; }

.rh-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 8px;
  border-top: 1px solid lightgray;
  margin-top: 12px;
  margin-bottom: 20px;
}

.rh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 0.5px solid var(--border-dark);
  border-radius: 8px;
  cursor: pointer;
  padding: 5px 10px;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
}

.rh-btn:hover { background: var(--surface2); color: var(--text); }

.rh-btn--ghost {
  border: 0.5px solid var(--border-dark);
  border-radius: 8px;
  padding: 5px 14px;
}

.rh-btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: none; }

@media (max-width: 480px) {
  .rh-bar { flex-wrap: wrap; gap: 4px; }
  .rh-text { font-size: 14px; }
}

/* ── MOBILE — actions bars and textarea footer ───────────────────────────── */
@media (max-width: 480px) {
  .solve-actions-bar,
  .analyze-actions-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .solve-actions-question,
  .analyze-actions-row .solve-actions-question {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-divider {
    display: none;
  }

  .textarea-footer {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }

  .inline-submit-btn {
    margin-left: auto;
  }

  .smart-prompt-trigger {
    font-size: 11px;
  }

  #analyzeQuestionDisplay,
  #blueprintQuestionDisplay {
    font-size: 14px;
  }
}

/* ── INPUT TIP — dark tooltip above textarea, shown once per tab ─────────── */
.input-tip {
  margin-bottom: 10px;
}

.input-tip-inner {
  background: #1a1a2e;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.input-tip-text {
  flex: 1;
}

.input-tip-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  font-family: 'Manrope', sans-serif;
}

.input-tip-body {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
}

.input-tip-x {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-tip-x:hover {
  color: rgba(255,255,255,0.8);
}

.input-tip-arrow {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 8px solid #1a1a2e;
  margin-left: 20px;
}
.tab-empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tab-empty-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 4px;
}

.tab-empty-icon--purple {
  background: var(--purple-light);
  color: var(--purple);
}

.tab-empty-headline {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.3;
}

.tab-empty-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 440px;
}

.tab-empty-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  background: #2563eb;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-tagline {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  line-height: 1;
}

.logo-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.headline {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.headline span {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subline {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* INPUT */
.input-section { margin-bottom: 0; }

/* ── QUESTION DISPLAY (replaces textarea after submit) ──────────────────── */
#questionDisplay {
  margin-bottom: 12px;
}

#analyzeQuestionDisplay,
#blueprintQuestionDisplay {
  margin-bottom: 12px;
  margin-top: 8px;
}
.question-display-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  cursor: pointer;
}
.question-display-text:hover {
  color: var(--text-muted);
}
.question-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}
.question-toggle-btn:hover { text-decoration: underline; }
.input-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.input-hint { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; display: block; }

textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border-dark);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 120px;
  box-shadow: var(--shadow-sm);
}

textarea::placeholder { color: var(--text-dim); }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  visibility: hidden;
}

/* Inside the textarea-wrap, above the footer — always visible, no margin */
.char-count--inline {
  visibility: visible;
  margin-top: 0;
  padding: 2px 14px 4px;
  background: var(--bg);
}

.char-count.warning { color: #d97706; }
.char-count.over { color: #dc2626; }

/* CHIPS */
.chips-section {
  display: none;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}

.chips-section.visible { display: block; }

.chips-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.chips-hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  text-transform: none !important;
  letter-spacing: normal !important;
}

.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--surface);
  border: 1.5px solid var(--border-dark);
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  min-height: 40px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.chip.selected { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip.selected::before { content: "✓ "; font-size: 11px; }

/* OPTIONS */
.options-row {
  display: none;
  gap: 12px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
  align-items: flex-start;
}

.options-row.visible { display: flex; }

.option-group { flex: 0 0 auto; }
.option-group.answers { margin-left: auto; }

.option-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
}

.option-pills {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
}

.pill {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  min-height: 34px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.selected { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pill.selected-green { background: var(--green-light); border-color: var(--green); color: var(--green); font-weight: 600; }
.pill.selected-purple { background: var(--purple-light); border-color: var(--purple); color: var(--purple); font-weight: 600; }

/* TRAIL */
.trail { margin-top: 20px; display: flex; flex-direction: column; }

.trail-step {
  display: flex;
  gap: 0;
  animation: fadeIn 0.25s ease;
  position: relative;
}

.trail-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

.trail-dot {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2px;
  position: relative;
  z-index: 1;
}

.trail-dot-inner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--green);
  flex-shrink: 0;
  margin-top: 4px;
}

.trail-content { flex: 1; padding: 0 0 18px 8px; }
.trail-q-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.trail-q-text { font-size: 14px; font-weight: 500; color: var(--text-muted); line-height: 1.6; margin-bottom: 6px; }

.trail-a-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
}



/* ACTIVE QUESTION */
.active-q-wrap {
  display: none;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
  position: relative;
  padding-left: 40px;
}

.active-q-wrap.visible { display: block; }

.active-q-wrap::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.active-q-dot {
  position: absolute;
  left: 9px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--accent);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.active-q-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.active-q-box {
  background: var(--accent-light);
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 16px;
}

.active-q-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 12px;
}

.followup-input {
  width: 100%;
  background: white;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 44px;
}

.followup-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.followup-input::placeholder { color: var(--text-dim); }

/* BUTTONS */
.btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.btn-primary {
  background: #1a1a2e;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
  min-height: 48px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
}

.btn-primary:hover { background: #2d2d4e; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: none;
  min-height: unset;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover { border-color: var(--border-dark); color: var(--text); background: var(--surface); }
.btn-secondary:disabled { opacity: 0.45; cursor: default; pointer-events: none; }

/* Show Different Answers — blue outline */
#reframeBtn {
  color: #2563eb;
  border-color: #2563eb;
  background: transparent;
}
#reframeBtn:hover {
  background: #eff4ff;
}

/* Share button — light grey, understated */
.share-link-btn {
  background: #f4f4f5 !important;
  border-color: #e4e4e7 !important;
  color: #52525b !important;
}
.share-link-btn svg {
  stroke: #52525b !important;
}
.share-link-btn:hover {
  background: #e4e4e7 !important;
  border-color: #d4d4d8 !important;
  color: #3f3f46 !important;
}

/* LOADING */
.loading { display: none; padding: 20px 0; animation: fadeIn 0.25s ease; }
.loading.visible { display: block; }

.loading-inner {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.loading-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.loading-text { font-size: 12px; color: var(--text-dim); animation: textPulse 2s ease-in-out infinite; }

/* ERROR / SCOPE */
.error-box {
  border-radius: 12px;
  padding: 0;
  margin-top: 16px;
  display: none;
}

.error-box.visible { display: block; }

.error-box.error-box-plain {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  padding: 12px 16px;
  color: #dc2626;
  font-size: 13px;
}

/* Limit reached card — upsell style, not error style */
.error-box.limit-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
}

.limit-box-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.limit-box-msg {
  flex: 1;
  min-width: 0;
}

.limit-box-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.limit-box-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.limit-box-btn {
  flex-shrink: 0;
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.limit-box-btn:hover { opacity: 0.88; }

.scope-block {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  padding: 18px 20px;
  display: none;
  margin-top: 32px;
  animation: fadeIn 0.25s ease;
}

.scope-block.visible { display: block; }
.scope-block p { color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.scope-block.visible + .btn-row { margin-top: 24px; }

/* RESULTS */
.results { display: none; animation: fadeIn 0.3s ease; margin-top: 28px; }
.results.visible { display: block; }

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

.results-title { font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); }

.results-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

/* REC CARDS */
.rec-card {  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.rec-card:hover { box-shadow: var(--shadow-md); }
.rec-card.exp-1 { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.06), var(--shadow-md); }
.rec-card.exp-2 { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,0.06), var(--shadow-md); }
.rec-card.exp-3 { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.06), var(--shadow-md); }

.rec-header { padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px; }

.rec-number {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.num-1 { background: var(--accent-light); color: var(--accent); }
.num-2 { background: var(--green-light); color: var(--green); }
.num-3 { background: var(--purple-light); color: var(--purple); }

.rec-center { flex: 1; min-width: 0; }
.rec-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px; }
.tag-1 { color: var(--accent); }
.tag-2 { color: var(--green); }
.tag-3 { color: var(--purple); }

.rec-summary { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--text); }

.chevron { color: var(--text-dim); font-size: 16px; transition: transform 0.25s; flex-shrink: 0; margin-top: 4px; }
.exp-1 .chevron, .exp-2 .chevron, .exp-3 .chevron { transform: rotate(180deg); }

.rec-body { display: none; padding: 0 18px 18px; }
.exp-1 .rec-body, .exp-2 .rec-body, .exp-3 .rec-body { display: block; }

.rec-divider { height: 1px; background: var(--border); margin-bottom: 16px; }
.rec-section { margin-bottom: 16px; }
.rec-section-label { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.rec-section-text { font-size: 15px; line-height: 1.8; color: var(--text-muted); }

.steps-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.steps-list li { display: flex; gap: 10px; align-items: flex-start; }

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-text { font-size: 15px; line-height: 1.7; color: var(--text-muted); padding-top: 2px; }
.sn-1 { background: var(--accent-light); color: var(--accent); }
.sn-2 { background: var(--green-mid); color: var(--green); }
.sn-3 { background: var(--purple-light); color: var(--purple); }

.feedback-row {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.copy-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.copy-card-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.copy-card-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-card-btn--copied { border-color: var(--green); color: var(--green); }

/* SHARE */
.share-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.share-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.share-label input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }

/* FOOTER ACTIONS */
.footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* PUBLIC FEED */
.feed-section {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.feed-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.feed-list { display: flex; flex-direction: column; }

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--surface); border-radius: 8px; padding: 10px 8px; margin: 0 -8px; }

.feed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-dark);
  flex-shrink: 0;
  margin-top: 6px;
}

.feed-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; flex: 1; }

.feed-expanded {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feed-expanded.visible { display: block; }
.feed-expanded-label { font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.feed-expanded-text { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* RESPONSIVE */
@media (max-width: 480px) {
  .wrap { padding: 28px 16px 60px; }
  .options-row { flex-direction: column; }
  .option-group.answers { margin-left: 0; }
  .footer-actions { flex-direction: column; }
  .footer-actions .btn-secondary { width: 100%; text-align: center; }
  .headline { font-size: 26px; }
}

@media (max-width: 360px) {
  .pill { padding: 5px 8px; font-size: 10px; }
}

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes textPulse { 0%,100%{opacity:0.5} 50%{opacity:1} }
@keyframes pulseDot { 0%,100%{box-shadow:0 0 0 2px var(--accent)} 50%{box-shadow:0 0 0 5px rgba(37,99,235,0.2)} }

/* ─── FOCUS STAGE 1 ──────────────────────────────────────────────────────── */
.focus-question { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 10px; }

/* ─── REFINE LABEL ────────────────────────────────────────────────────────── */
.refine-label { padding: 10px 0 4px; font-size: 13px; color: #888; font-style: italic; }

/* ─── FLOATING FEEDBACK WIDGET ─────────────────────────────────────────────── */
.fb-widget-btn {
  position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px;
  border-radius: 50%; background: #1a1a2e; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.25); z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fb-widget-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.fb-widget-btn svg { width: 22px; height: 22px; }
.fb-widget-modal {
  position: fixed; bottom: 84px; right: 24px; width: 300px;
  background: #fff; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 1000; display: none; flex-direction: column; overflow: hidden;
}
.fb-widget-modal.visible { display: flex; }
.fb-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #1a1a2e; color: #fff; font-size: 14px; font-weight: 600;
}
.fb-widget-close { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: 0.7; line-height: 1; padding: 0; }
.fb-widget-close:hover { opacity: 1; }
.fb-widget-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fb-widget-types { display: flex; gap: 8px; }
.fb-type-btn { flex: 1; padding: 7px 4px; border: 1.5px solid #e5e5e5; border-radius: 8px; background: #fafafa; font-size: 12px; cursor: pointer; transition: all 0.15s; text-align: center; }
.fb-type-btn:hover { border-color: #1a1a2e; background: #f0f0f5; }
.fb-type-btn.selected { border-color: #1a1a2e; background: #1a1a2e; color: #fff; }
.fb-widget-body textarea { width: 100%; border: 1.5px solid #e5e5e5; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-family: inherit; resize: none; outline: none; box-sizing: border-box; transition: border-color 0.15s; }
.fb-widget-body textarea:focus { border-color: #1a1a2e; }
.fb-widget-submit { background: #1a1a2e; color: #fff; border: none; border-radius: 8px; padding: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.fb-widget-submit:hover { opacity: 0.85; }
.fb-widget-thanks { display: none; text-align: center; font-size: 13px; color: #2a9d5c; font-weight: 600; padding: 4px 0; }
.fb-widget-thanks.visible { display: block; }
@media (max-width: 480px) {
  .fb-widget-btn { bottom: 16px; right: 16px; }
  .fb-widget-modal { right: 16px; left: 16px; width: auto; bottom: 76px; }
}



/* ─── NONE HELPED ────────────────────────────────────────────────────────── */
.none-helped {
  text-align: center;
  padding: 8px 0 4px;
}
.none-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
}
.none-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* ─── SHARE CONFIRM ──────────────────────────────────────────────────────── */
.share-confirm {
  display: block;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-top: 6px;
  animation: fadeIn 0.3s ease;
}

/* ─── SHARE ROW ──────────────────────────────────────────────────────────── */
.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border);
}
.share-link-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 7px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.share-link-btn svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
}
.share-link-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.share-copied {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  display: none;
}
.share-copied.visible { display: inline; }
.share-anon-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  margin-top: 12px;
}
.share-anon-label input { cursor: pointer; }
@media (max-width: 480px) {
  .share-row { gap: 10px; }
  .share-anon-label { margin-left: 0; }
}

/* ─── FOOTER ACTIONS ─────────────────────────────────────────────────────── */
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: flex-start;
  padding-top: 0;
}
@media (max-width: 480px) {
  .footer-actions { flex-direction: column; align-items: flex-start; }
  .footer-right { width: 100%; }
}
/* ── DICTATION / MIC ──────────────────────────────────────────────────────── */
.textarea-wrap {
  position: relative;
  border: 1.5px solid var(--border-dark);
  border-radius: 12px;
  background: var(--bg);
  overflow: visible;
}

.textarea-wrap textarea {
  width: 100%;
  padding-bottom: 8px;
  border: none;
  outline: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  box-shadow: none;
}

.textarea-wrap textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.textarea-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.mic-btn {
  position: absolute;
  bottom: calc(44px + 10px);
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary, #aaa);
  transition: color 0.15s, background 0.15s;
  padding: 0;
}

.mic-btn:hover {
  color: var(--color-text-secondary);
  background: rgba(0,0,0,0.05);
}

.mic-btn svg {
  width: 18px;
  height: 18px;
}

.mic-btn.mic-active {
  color: #e03e3e;
  background: rgba(224, 62, 62, 0.08);
  animation: mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── MIC VISUALIZER ───────────────────────────────────────────────────────── */
.mic-visualizer {
  display: none;
  align-items: center;
  gap: 3px;
  position: absolute;
  bottom: calc(44px + 14px);
  right: 50px;
  height: 20px;
}

.mic-visualizer span {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: #e03e3e;
  animation: none;
}

.mic-visualizer.active {
  display: flex;
}

.mic-visualizer.active span:nth-child(1) { animation: bar 1.0s ease-in-out infinite 0.0s; }
.mic-visualizer.active span:nth-child(2) { animation: bar 1.0s ease-in-out infinite 0.15s; }
.mic-visualizer.active span:nth-child(3) { animation: bar 1.0s ease-in-out infinite 0.3s; }
.mic-visualizer.active span:nth-child(4) { animation: bar 1.0s ease-in-out infinite 0.15s; }
.mic-visualizer.active span:nth-child(5) { animation: bar 1.0s ease-in-out infinite 0.0s; }

@keyframes bar {
  0%, 100% { height: 4px; }
  50%       { height: 16px; }
}
/* ── SKELETON CARDS ──────────────────────────────────────────────────────────── */
.rec-skeleton {
  pointer-events: none;
}

.rec-skeleton .rec-header {
  cursor: default;
}

.skeleton-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  flex-shrink: 0;
}

.skeleton-tag {
  width: 90px;
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 8px;
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* ─── COLLAPSED INPUT ────────────────────────────────────────────────────── */
textarea.input-collapsed {
  min-height: 0;
  height: 42px;
  overflow: hidden;
  resize: none;
  padding-top: 10px;
  padding-bottom: 10px;
  transition: height 0.2s ease, min-height 0.2s ease, padding 0.2s ease;
  cursor: pointer;
  color: transparent;
}

.input-collapsed-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  padding: 10px 40px 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-sizing: border-box;
}

textarea.input-collapsed ~ .input-collapsed-overlay {
  display: block;
}
.feedback-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── REFINE FEATURE ──────────────────────────────────────────────────────────── */
.refine-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border-dark);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.refine-btn:hover { border-color: var(--accent); color: var(--accent); }
.refine-btn.refine-locked { opacity: 0.7; }
.refine-btn.refine-locked:hover { border-color: var(--accent); color: var(--accent); }

/* ── BUTTON TOOLTIPS ─────────────────────────────────────────────────────── */
#solvurTooltip {
  position: fixed;
  background: #1a1a1a;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  max-width: 160px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}
[data-tooltip]:hover::after { opacity: 1; }
/* Mobile: show on focus (tap) */
[data-tooltip]:focus::after { opacity: 1; }

.premium-icon {
  font-size: 10px;
  color: #f59e0b;
  line-height: 1;
}

.refine-used {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.refine-btn.refine-done,
.refine-btn.refine-done:hover {
  opacity: 0.45;
  cursor: default;
  border-color: var(--border);
  color: var(--text-dim);
  pointer-events: none;
}

.refine-box {
  margin: 12px 0 8px;
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  border: 1.5px solid var(--border);
}

.refine-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.refine-input:focus { border-color: var(--accent); }

.refine-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.refine-cancel {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 6px 10px;
}
.refine-cancel:hover { color: var(--text); }

.refine-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.15s;
}
.refine-submit:hover { opacity: 0.88; }
.refine-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.version-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.version-arrow {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}
.version-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.version-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.version-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}

/* ── UPGRADE PROMPT OVERLAY ───────────────────────────────────────────────────── */
.upgrade-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.upgrade-prompt-box {
  background: var(--bg);
  border-radius: 16px;
  padding: 28px 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
}

.upgrade-prompt-icon {
  color: #BA7517;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upgrade-prompt-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.upgrade-prompt-msg {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.upgrade-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-prompt-btn {
  display: block;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.upgrade-prompt-btn:hover { opacity: 0.88; }

.upgrade-prompt-cancel {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 6px;
}
.upgrade-prompt-cancel:hover { color: var(--text-muted); }

.upgrade-prompt-plan {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 3px 10px;
  background: #FAEEDA;
  color: #854F0B;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── EXTEND FEATURE ──────────────────────────────────────────────────────────── */
.extend-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1.5px solid #c7d7f9;
  color: #1a56db;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.extend-btn:hover { background: #e8f0fe; }
.extend-btn[data-extended="1"] { background: #e8f0fe; cursor: default; }

/* ── CARD ACTION ROW (Refine, Extend, Pressure Test, Blueprint) ─────────── */
.card-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border-dark);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.card-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Locked state — crown icon shown, click triggers upgrade modal */
/* Done / used state */
.card-action-btn--done {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* Extend — blue accent */
.card-action-btn--extend {
  border-color: #c7d7f9;
  color: #1a56db;
}
.card-action-btn--extend:hover { background: #e8f0fe; border-color: #93b4f7; }
.card-action-btn--extend[data-extended="1"] { background: #e8f0fe; }

/* Pressure Test — amber accent */
.card-action-btn--pressure {
  border-color: #fcd19b;
  color: #92400e;
}
.card-action-btn--pressure:hover { background: #fffbeb; border-color: #f59e0b; color: #92400e; }

/* Blueprint — purple accent */
.card-action-btn--blueprint {
  border-color: #c4b5fd;
  color: #5b21b6;
}
.card-action-btn--blueprint:hover { background: #f5f3ff; border-color: #a78bfa; color: #5b21b6; }

/* Locked — always overrides feature modifier colors, placed last for specificity */
.card-action-btn--locked {
  color: var(--text-dim);
  border-color: var(--border);
  cursor: pointer;
  opacity: 0.75;
}
.card-action-btn--locked:hover {
  opacity: 1;
  border-color: #BA7517;
  color: #BA7517;
  background: none;
}

.extend-section {
  border-top: 1.5px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
  padding-bottom: 8px;
}

.extend-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.extend-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f0fe;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1a56db;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.extend-block {
  margin-bottom: 20px;
}
.extend-block:last-child { margin-bottom: 0; }

.extend-block-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.extend-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.extend-items li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
}
.extend-items li:last-child { margin-bottom: 0; }

.extend-dot {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.extend-dot.green { background: #d1fae5; color: #065f46; }
.extend-dot.red { background: #fee2e2; color: #991b1b; }

/* ── SKELETON PROGRESS RING ──────────────────────────────────────────────────── */
.skeleton-progress {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-progress svg {
  position: absolute;
  top: 0;
  left: 0;
}

.skeleton-progress-num {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
}
/* ─── APP LAYOUT (sidebar + main) ────────────────────────────────────────── */
.app-layout {
  display: flex;
  width: 100%;
  flex: 1;
  min-height: calc(100vh - 64px);
  position: relative;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 61px;
  left: 0;
  flex-shrink: 0;
  height: calc(100vh - 61px);
  transition: width 0.25s ease, min-width 0.25s ease;
  z-index: 50;
  overflow: visible;
}

.sidebar.collapsed {
  width: 0;
  min-width: 0;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  width: 280px;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-inner {
  opacity: 0;
  pointer-events: none;
}

/* Collapsed tab — sits outside the sidebar via overflow:visible */
.sidebar-collapsed-tab {
  display: none;
  position: absolute;
  top: 16px;
  right: -28px;
  transform: none;
  width: 28px;
  height: 48px;
  background: var(--bg);
  border: 1.5px solid var(--border-dark);
  border-left: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
  box-shadow: 3px 2px 8px rgba(0,0,0,0.12);
}

.sidebar-collapsed-tab svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

.sidebar-collapsed-tab:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar.collapsed .sidebar-collapsed-tab {
  display: flex;
}

/* Sidebar head */
/* ─── SIDEBAR TOOL SWITCHER ───────────────────────────────────────────────── */
.sidebar-tools {
  padding: 0 10px 6px;
  flex-shrink: 0;
}

.sidebar-tools-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #285192;
  text-transform: uppercase;
  padding: 0 22px;
  height: 32px;
  margin-bottom: 4px;
  margin-left: -10px;
  margin-right: -10px;
  background: #e8eef8;
  border-bottom: 0.5px solid #c5d4ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  position: relative;
}

.sidebar-tool-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-tool-item.active {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
}

.sidebar-tool-item--locked {
  color: var(--text-dim);
}

.sidebar-tool-item--locked:hover {
  background: var(--surface2);
  color: var(--text-dim);
}

.sidebar-tool-crown {
  margin-left: auto;
  color: #BA7517;
  display: flex;
  align-items: center;
}

.sidebar-tool-item svg { width: 15px; height: 15px; flex-shrink: 0; }

.sidebar.collapsed .sidebar-tools { display: none; }

/* History section — clearly separated from tools */
.sidebar-history-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: none;
  margin-top: 20px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 32px;
  flex-shrink: 0;
  background: #e8eef8;
  border-top: 0.5px solid #c5d4ec;
  border-bottom: 0.5px solid #c5d4ec;
}

.sidebar-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #285192;
  text-transform: uppercase;
}

/* New session button — above the prompt input */
.input-section-wrap { position: relative; }

/* Heading + New button on same row */
.page-intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.page-intro-row .page-intro {
  margin-bottom: 0;
}
.new-session-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.new-session-btn:hover {
  color: var(--text);
  border-color: var(--border-mid, #cbd5e1);
  background: var(--surface, #f8f9fb);
}
.nsb-desktop { /* "Session" word — hidden on mobile */ }
@media (max-width: 768px) {
  .nsb-desktop { display: none; }
}

.sidebar-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #285192;
  opacity: 0.6;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s, opacity 0.15s;
}

.sidebar-close-btn:hover { opacity: 1; background: rgba(40,81,146,0.1); }
.sidebar-close-btn svg { width: 16px; height: 16px; }

/* Search */
.sidebar-search-wrap {
  position: relative;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

.sidebar-search {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.sidebar-search:focus { border-color: var(--accent); }
.sidebar-search::placeholder { color: var(--text-dim); }

/* Session list */
.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-list::-webkit-scrollbar { width: 4px; }
.sidebar-list::-webkit-scrollbar-track { background: transparent; }
.sidebar-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Pinned section label */
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 4px 6px 2px;
}

/* Session card */
.sidebar-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.sidebar-card:hover {
  border-color: var(--border-dark);
  background: var(--surface, #f8f9fb);
}

.sidebar-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.sidebar-card.pinned {
  border-color: var(--border-dark);
}

.sidebar-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

/* Lens icon on solve cards */
.sidebar-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  margin-top: 1px;
}

.sidebar-card-goal {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.sidebar-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sidebar-card-info {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Three-dots menu button */
.sidebar-card-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1px;
}

.sidebar-card:hover .sidebar-card-menu-btn { opacity: 1; }
.sidebar-card-menu-btn:hover { color: var(--text); background: var(--surface2); }

/* Card dropdown menu */
.sidebar-card-dropdown {
  position: fixed;
  background: var(--bg);
  border: 0.5px solid var(--border-dark);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 900;
  min-width: 150px;
  padding: 4px 0;
}

.sidebar-card-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.sidebar-card-dropdown-item:hover { background: var(--surface2); }
.sidebar-card-dropdown-item.danger { color: var(--error, #e53e3e); }
.sidebar-card-dropdown-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Inline rename input on cards */
.sidebar-card-rename-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.sidebar-card-rename-input {
  flex: 1;
  font-size: 13px;
  font-family: inherit;
  border: 0.5px solid var(--accent);
  border-radius: 5px;
  padding: 3px 7px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.sidebar-card-rename-save {
  font-size: 11px;
  font-family: inherit;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.sidebar-action-btn.pinned-active { color: var(--accent); }
.sidebar-action-btn.delete-btn:hover { color: #ef4444; background: #fef2f2; }

/* Load more */
.sidebar-load-more {
  text-align: center;
  padding: 8px;
  flex-shrink: 0;
}

.sidebar-load-more-btn {
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}

.sidebar-load-more-btn:hover { background: var(--accent-light); }

.sidebar-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

/* Guest prompt */
.sidebar-guest {
  padding: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  flex-shrink: 0;
}

.sidebar-guest-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.sidebar-guest-btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 8px;
  transition: background 0.15s;
}

.sidebar-guest-btn:hover { background: var(--accent-hover); }

/* Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-clear-btn {
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 4px 0;
  transition: color 0.15s;
}

.sidebar-clear-btn:hover { color: #ef4444; }

/* Legal footer inside sidebar */
.sidebar-legal {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sidebar-legal-link {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-legal-link:hover { color: var(--text-muted); }

.sidebar-legal-dot {
  font-size: 11px;
  color: var(--text-dim);
}

.sidebar-legal-copy {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}

/* Main content area */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 280px;
  transition: margin-left 0.25s ease;
  background-color: var(--bg);
}

.app-main.sidebar-collapsed {
  margin-left: 0;
}

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

/* App header row (hamburger + intro) */
.app-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.app-header-row .page-intro {
  flex: 1;
}

.sidebar-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 7px 9px;
  color: var(--text-muted);
  align-items: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover { color: var(--text); border-color: var(--border-dark); background: var(--surface); }
.sidebar-toggle-btn svg { width: 16px; height: 16px; }

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 199;
}

/* ─── RESPONSIVE SIDEBAR ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-layout { display: block; }

  .sidebar {
    top: 61px;
    height: calc(100vh - 61px);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 280px;
    min-width: 280px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: 280px;
    min-width: 280px;
    transform: translateX(-100%);
  }

  .sidebar-overlay.active { display: block; }
  .sidebar-collapsed-tab { display: none !important; }

  .app-main,
  .app-main.sidebar-collapsed {
    margin-left: 0 !important;
    width: 100%;
  }

  .sidebar-toggle-btn { display: flex; }
}

/* Sidebar loading skeleton */
.sidebar-skeleton-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-skel-line {
  height: 10px;
  background: var(--surface2);
  border-radius: 4px;
  animation: textPulse 1.5s ease-in-out infinite;
}

/* ─── TEXTAREA FOOTER BAR ────────────────────────────────────────────────── */
.textarea-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 12px 12px;
}

/* ─── FOCUS DROPDOWN ─────────────────────────────────────────────────────── */

/* ─── SMART PROMPT TRIGGER ───────────────────────────────────────────────── */
.smart-prompt-trigger {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}

.smart-prompt-trigger:hover {
  background: var(--accent-light);
}

.smart-prompt-trigger.open {
  background: var(--accent-light);
}

/* ─── SMART PROMPT PANEL ─────────────────────────────────────────────────── */
.smart-prompt-panel {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

/* ─── SMART PROMPT BUILDER ───────────────────────────────────────────────── */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
}

.sp-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sp-progress {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-dark);
  transition: background 0.2s;
}

.sp-dot.current {
  background: var(--accent);
}

.sp-dot.active {
  background: var(--accent);
  opacity: 0.4;
}

.sp-dot.current {
  opacity: 1;
}

.sp-step-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  min-width: 30px;
  text-align: right;
}

.sp-body {
  padding: 14px 14px 10px;
}

.sp-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.sp-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border-dark);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.sp-input:focus {
  border-color: var(--accent);
}

.sp-input::placeholder {
  color: var(--text-dim);
}

.sp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
}

.sp-skip {
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 4px 0;
  transition: color 0.15s;
}

.sp-skip:hover { color: var(--text-muted); }

.sp-next {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}

.sp-next:hover { background: var(--accent-hover); }

/* Textarea bottom padding to make room for footer bar — handled by footer bar itself */

/* ─── MOBILE RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .textarea-footer {
    flex-wrap: wrap;
    gap: 6px;
  }


  .smart-prompt-trigger {
    font-size: 11px;
  }

}

/* ─── ONE-TIME DISMISSIBLE TOOLTIPS ─────────────────────────────────────── */
.solvur-tooltip {
  position: fixed;
  z-index: 9000;
  background: #1a1a2e;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  pointer-events: auto;
}

.solvur-tooltip::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #1a1a2e;
  transform: rotate(45deg);
}

.solvur-tooltip.tip-below::before {
  top: -4px;
  left: 16px;
}

.solvur-tooltip.tip-above::before {
  bottom: -4px;
  left: 16px;
}

.solvur-tooltip-text {
  color: #d0d5e8;
  margin-bottom: 10px;
}

.solvur-tooltip-footer {
  display: flex;
  justify-content: flex-end;
}

.solvur-tooltip-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.solvur-tooltip-dismiss:hover {
  color: rgba(255,255,255,0.8);
}
/* ── TOOL TABS ──────────────────────────────────────────────────────────── */

/* ── PRESSURE TEST ──────────────────────────────────────────────────────────── */
.pressure-wrap {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pressure-input-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.pressure-input-header {
  padding: 20px 20px 0;
}

.pressure-input-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  font-family: 'Manrope', sans-serif;
}

.pressure-input-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.pressure-textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  resize: none;
  outline: none;
  line-height: 1.6;
  box-sizing: border-box;
}

.pressure-textarea::placeholder {
  color: var(--text-dim);
}

.pressure-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 12px;
}

.pressure-char-count {
  font-size: 12px;
  color: var(--text-dim);
}

.pressure-run-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.15s;
}

.pressure-run-btn:hover { opacity: 0.88; }
.pressure-run-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pressure-error {
  background: #fef2f2;
  border: 0.5px solid #fecaca;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #991b1b;
}

.pressure-loading {
  text-align: center;
  padding: 32px 0;
}

.pressure-loading-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.pressure-loading-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
}

.pressure-loading-label {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Verdict card */
.pressure-verdict {
  background: #1e293b;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 35px;
}

.pressure-verdict-gauge {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.pressure-verdict-score-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  margin-top: 3px;
}

.pressure-verdict-score {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.pressure-verdict-score-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.pressure-verdict-text { flex: 1; }

.pressure-verdict-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}

.pressure-verdict-tag.strong { background: rgba(34,197,94,0.15); color: #4ade80; }
.pressure-verdict-tag.caution { background: rgba(251,191,36,0.15); color: #fbbf24; }
.pressure-verdict-tag.risk { background: rgba(251,146,60,0.15); color: #fb923c; }
.pressure-verdict-tag.reconsider { background: rgba(248,113,113,0.15); color: #f87171; }

.pressure-verdict-headline {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.4;
}

.pressure-verdict-detail {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

/* Section headings */
.pressure-section-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

/* What's working card */
.pressure-favor-card {
  background: #f0fdf9;
  border: 0.5px solid #bbf7e0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 35px;
}

.pressure-favor-bar-track {
  height: 6px;
  background: #ccfbf1;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.pressure-favor-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* Risk cards */
.pressure-risks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pressure-risk-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.pressure-risk-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pressure-risk-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.pressure-risk-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pressure-risk-meter-track {
  width: 80px;
  height: 5px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.pressure-risk-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

.pressure-risk-meter-label {
  font-size: 11px;
  font-weight: 600;
  min-width: 52px;
  text-align: right;
}

.pressure-dim-insight {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Pros & Cons */
.pressure-proscons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 35px;
}

.pc-half {
  border-radius: 14px;
  border: 0.5px solid var(--border);
  overflow: hidden;
}

.pc-half-header {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pc-half--pro .pc-half-header {
  background: #dcfce7;
  color: #15803d;
  border-bottom: 0.5px solid #bbf7d0;
}

.pc-half--con .pc-half-header {
  background: #fee2e2;
  color: #dc2626;
  border-bottom: 0.5px solid #fecaca;
}

.pc-half-body {
  padding: 16px 20px;
}

.pc-half--pro .pc-half-body { background: #f0fdf4; }
.pc-half--con .pc-half-body { background: #fff5f5; }

.pc-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pc-section-label--pro { color: #15803d; }
.pc-section-label--con { color: #dc2626; }

.pc-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
}

.pc-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.pc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

.pc-dot--pro { background: #16a34a; }
.pc-dot--con { background: #dc2626; }

/* Recommendation */

.pressure-recommendation {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-top: 12px;
  margin-bottom: 15px;
}

.pressure-recommendation-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.pressure-recommendation-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.pressure-new-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0.5px solid var(--border-dark);
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  align-self: flex-start;
  margin-top: 6px;
}

.pressure-new-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}



/* ── NO SIDEBAR STATE ──────────────────────────────────────────────────────── */
.app-main.no-sidebar {
  margin-left: 0 !important;
}

/* ── ANALYZE HISTORY SIDEBAR ──────────────────────────────────────────────── */
.analyze-history-card {
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.analyze-history-card:hover { background: var(--surface); }
.analyze-history-card.active { background: var(--surface); border-left: 2px solid var(--accent); }

.analyze-history-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.analyze-history-card:hover .sidebar-card-menu-btn { opacity: 1; }

.analyze-history-score {
  font-size: 14px;
  font-weight: 700;
  min-width: 28px;
  font-family: 'Manrope', sans-serif;
}

.analyze-history-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  flex-wrap: wrap;
}

.analyze-history-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}

.analyze-history-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.15s;
}

.analyze-history-card:hover .analyze-history-delete { opacity: 1; }
.analyze-history-delete:hover { color: #E24B4A; }

.analyze-history-decision {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 3px;
}

.analyze-history-session {
  font-size: 11px;
  color: var(--accent);
  line-height: 1.4;
}
.analyze-history-solve-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 0;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  border-radius: 0 0 8px 8px;
}
.analyze-history-solve-btn:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
}

/* ── ANALYZE DECISION BLOCK ───────────────────────────────────────────────── */
.analyze-decision-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ── ANALYZE STALE WARNING ────────────────────────────────────────────────── *//* ── ANALYZE ACTIONS ROW ──────────────────────────────────────────────────── */
.analyze-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
}

/* ── ANALYZE SUBMIT BUTTON ────────────────────────────────────────────────── */
.analyze-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 12px;
}

.analyze-submit-btn:hover { opacity: 0.88; }
.analyze-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Inline submit button — sits inside the textarea footer */
.inline-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  padding: 7px 14px;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.inline-submit-btn:hover { opacity: 0.88; }
.inline-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.footer-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.analyze-submit-btn--ghost {
  background: none;
  color: var(--text-muted);
  border: 0.5px solid var(--border-dark);
  font-size: 13px;
  padding: 10px;
}

.analyze-submit-btn--ghost:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}

.analyze-submit-btn--solid {
  background: var(--accent-light);
  color: var(--accent);
  border: 0.5px solid #bfdbfe;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
}

.analyze-submit-btn--solid:hover {
  opacity: 1;
  background: #dbeafe;
  border-color: var(--accent);
  color: var(--accent-hover);
}
/* ── GUEST CTA BAR (T5-3) ────────────────────────────────────────────────── */
#guestCtaBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.guest-cta-text {
  font-size: 14px;
  color: var(--text-muted);
  flex: 1;
}

.guest-cta-btn {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 8px 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.guest-cta-btn:hover { opacity: 0.88; }

.guest-cta-dismiss {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.guest-cta-dismiss:hover { color: var(--text-muted); }

@media (max-width: 480px) {
  #guestCtaBar { padding: 10px 14px; gap: 10px; }
  .guest-cta-text { font-size: 13px; }
}

/* ── HEART / FAVORITES BUTTON ────────────────────────────────────────────── */
.heart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.heart-btn svg {
  width: 15px;
  height: 15px;
  transition: fill 0.15s;
}

.heart-btn:hover {
  border-color: #f43f5e;
  color: #f43f5e;
}

.heart-btn--liked {
  border-color: #f43f5e;
  color: #f43f5e;
  background: #fff1f2;
}

.heart-btn--liked:hover {
  background: #ffe4e6;
}

/* ── SIDEBAR TABS (Sessions / Favorites) ─────────────────────────────────── */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 0 0 8px 0;
  flex-shrink: 0;
}

.sidebar-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.sidebar-tab:hover { color: var(--text-muted); }

.sidebar-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── SIDEBAR NUDGE ───────────────────────────────────────────────────────── */
.sidebar-nudge {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 36px 16px 16px;
  margin: 10px 12px 12px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.sidebar-nudge-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.sidebar-nudge-close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.sidebar-nudge-icon {
  font-size: 18px;
  margin-bottom: 6px;
  color: #f43f5e;
}

.sidebar-nudge-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #fff;
}

.sidebar-nudge-body {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
}

.show-more-inline-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13px;
  color: #b91c1c;
  line-height: 1.5;
}

.show-more-inline-error button {
  background: none;
  border: none;
  cursor: pointer;
  color: #b91c1c;
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
  flex-shrink: 0;
}

.show-more-inline-error button:hover { opacity: 1; }

.sidebar-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── FAVORITES CARD STYLES ───────────────────────────────────────────────── */
.fav-card-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fav-badges {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.fav-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  letter-spacing: 0.03em;
}


/* ─── LENS BUTTON ─────────────────────────────────────────────────────────── */
.lens-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1.5px solid var(--border-dark);
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.lens-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37,99,235,0.04);
}

/* ─── LENS MODAL ──────────────────────────────────────────────────────────── */
.lens-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lens-modal {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 580px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lens-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  flex-shrink: 0;
}
.lens-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.lens-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.1s;
}
.lens-modal-close:hover { background: var(--surface2); }
.lens-modal-search-wrap {
  position: relative;
  padding: 14px 24px 18px;
  flex-shrink: 0;
}
.lens-modal-search-icon {
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.lens-modal-search {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border-dark);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--surface);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.lens-modal-search:focus { border-color: var(--accent); }
.lens-modal-body {
  overflow-y: auto;
  padding: 8px 24px 24px;
  flex: 1;
}
.lens-modal-section {
  margin-bottom: 35px;
}
.lens-modal-section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border-dark);
  letter-spacing: 0;
  text-transform: none;
}
.lens-modal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.lens-modal-pill {
  padding: 7px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.lens-modal-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37,99,235,0.04);
}
.lens-modal-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.lens-modal-no-results {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  padding: 24px;
}
@media (max-width: 600px) {
  .lens-modal { max-height: 90vh; }
  .lens-modal-overlay { padding: 12px; align-items: flex-end; }
  .lens-modal { border-radius: 16px 16px 0 0; max-width: 100%; }
}

/* ── PRODUCT TOUR ────────────────────────────────────────────────────────────── */
/* ── TOUR OVERLAY + SPOTLIGHT ───────────────────────────────────────────── */
/* Click-blocking overlay — covers whole page, blocks all interaction */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 590;
  pointer-events: auto;
}
/* Spotlight cutout — the box-shadow creates the dim around the highlighted element.
   The element itself is transparent so the target shows through undimmed.
   pointer-events:none so clicks on the highlighted element still work. */
.tour-spotlight {
  position: fixed;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.62);
  z-index: 592;
  pointer-events: none;
  outline: 2.5px solid rgba(255,255,255,0.35);
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}

/* ── TOUR BUBBLE ─────────────────────────────────────────────────────────── */
.tour-bubble {
  position: fixed;
  background: #fff;
  border: 0.5px solid #e4e7ec;
  border-radius: 14px;
  padding: 20px 22px 16px;
  width: 280px;
  z-index: 595;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  opacity: 1;
}
.tour-bubble-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border: 8px solid transparent;
}
.tour-bubble-arrow--right {
  /* Arrow points right — bubble is left of target */
  border-left-color: #fff;
  border-right: none;
  right: -8px;
  top: 20px;
  filter: drop-shadow(1px 0 0 #e4e7ec);
}
.tour-bubble-arrow--left {
  /* Arrow points left — bubble is right of target */
  border-right-color: #fff;
  border-left: none;
  left: -8px;
  top: 20px;
  filter: drop-shadow(-1px 0 0 #e4e7ec);
}
.tour-bubble-arrow--down {
  /* Arrow points down — bubble is above target */
  border-top-color: #fff;
  border-bottom: none;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 0 #e4e7ec);
}
.tour-bubble-arrow--up {
  /* Arrow points up — bubble is below target */
  border-bottom-color: #fff;
  border-top: none;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 -1px 0 #e4e7ec);
}
.tour-bubble-step { font-size: 11px; color: #94a3b8; margin-bottom: 6px; font-weight: 500; letter-spacing: 0.02em; }
.tour-bubble-title { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 8px; font-family: 'Manrope', sans-serif; line-height: 1.3; }
.tour-bubble-body { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 14px; }
.tour-bubble-badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 9px; border-radius: 20px; margin-bottom: 12px; }
.tour-badge-pro { background: rgba(37,99,235,0.1); color: var(--accent); }
.tour-badge-power { background: rgba(124,58,237,0.1); color: #7c3aed; }
.tour-bubble-footer { display: flex; align-items: center; justify-content: space-between; }
.tour-dots { display: flex; gap: 5px; align-items: center; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-dark); transition: background 0.2s; }
.tour-dot.active { background: var(--accent); }
.tour-bubble-btns { display: flex; gap: 8px; align-items: center; }
.tour-btn-skip { font-size: 12px; color: var(--text-dim); background: none; border: none; cursor: pointer; font-family: 'Inter', sans-serif; padding: 4px 0; }
.tour-btn-skip:hover { color: var(--text-muted); }
.tour-btn-next { font-size: 12px; font-weight: 600; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 6px 16px; cursor: pointer; font-family: 'Inter', sans-serif; transition: opacity 0.15s; }
.tour-btn-next:hover { opacity: 0.88; }


/* ── TOUR SKIP MODAL ────────────────────────────────────────────────────── */
.tour-skip-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
}
.tour-skip-modal-inner {
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 24px;
  width: 320px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  text-align: center;
}
.tour-skip-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  font-family: 'Manrope', sans-serif;
}
.tour-skip-modal-body {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 20px;
}
.tour-skip-modal-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.tour-skip-modal-btn:hover { opacity: 0.88; }

/* Replay Tour highlight in dropdown */
.nav-dropdown-item--highlight {
  background: rgba(37,99,235,0.1);
  color: var(--accent);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BLUEPRINT PANEL
   ══════════════════════════════════════════════════════════════════════════════ */

.blueprint-wrap {
  display: flex;
  flex-direction: column;
}

/* Sidebar quota bar */
.blueprint-quota-bar {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 0.5px solid var(--border);
}

/* Loading bar — reuses pressure-loading styles, own fill element */
.blueprint-loading-fill {
  height: 100%;
  width: 0%;
  background: #7c3aed;
  border-radius: 2px;
}

/* Report */
.blueprint-report {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section headings */
.bp-section-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 28px;
}

.bp-section-heading:first-child { margin-top: 0; }

/* Overview */
.bp-overview-card {
  background: #f5f3ff;
  border: 0.5px solid #ddd6fe;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 8px;
}

.bp-overview-text {
  font-size: 15px;
  color: #3c3489;
  line-height: 1.7;
}

/* Phases */
.bp-phases {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.bp-phase {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.bp-phase-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.bp-phase-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bp-phase-meta { flex: 1; }

.bp-phase-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.bp-phase-duration {
  font-size: 12px;
  color: var(--text-dim);
}

.bp-phase-objective {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--border);
}

.bp-phase-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-phase-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.bp-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c3aed;
  flex-shrink: 0;
  margin-top: 7px;
}

/* First move */
.bp-first-move {
  background: #1e293b;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 8px;
}

.bp-first-move .bp-section-heading {
  color: rgba(255,255,255,0.5);
  margin-top: 0;
}

.bp-first-move-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.65;
}

/* Tools */
.blueprint-loading-notice {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
}

.bp-section-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
}

.bp-section-card .bp-section-heading {
  margin-top: 0;
}

.bp-plain-para {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 10px;
}

.bp-plain-para:last-child { margin-bottom: 0; }

.bp-tools-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.bp-tool-item {
  padding-left: 0;
}

.bp-tool-name-row {
  margin-bottom: 4px;
}

.bp-tool-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.bp-tool-link:hover { text-decoration: underline; }

.bp-tool-name-plain {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.bp-tool-purpose {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Who to involve */
.bp-who-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.bp-who-item {
  padding-left: 0;
}

.bp-who-role {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.bp-who-how {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Key risks */
.bp-risks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.bp-risk-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bp-risk-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface2);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.bp-risk-content { flex: 1; }

.bp-risk-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.5;
}

.bp-risk-mitigation {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Plain text sections — timeline and budget */
.bp-plain-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

/* ── SAVED CARD PREVIEW ──────────────────────────────────────────────────────── */
.card-preview-box {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card-preview-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.card-preview-goal {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.card-preview-divider {
  height: 0.5px;
  background: var(--border);
  margin-bottom: 12px;
}

.card-preview-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.card-preview-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.card-preview-back {
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: block;
  text-align: center;
  width: 100%;
}

.card-preview-back:hover { color: var(--accent); }

.card-preview-strategy {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--border);
}

.card-preview-view-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.card-preview-view-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   REPORTS PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.reports-wrap {
  padding: 0 0 40px 0;
}

.wrap--reports {
  max-width: 808px !important;
}

.reports-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-top: 8px;
}

.reports-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
  font-family: var(--font-display, inherit);
}

.reports-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Toolbar */
.reports-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.reports-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reports-filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.reports-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reports-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.reports-filter-btn--power.active {
  background: #7c3aed;
  border-color: #7c3aed;
}

.reports-search-wrap {
  position: relative;
  margin-left: auto;
}

.reports-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.reports-search {
  padding: 6px 12px 6px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  width: 200px;
  outline: none;
  transition: border-color 0.15s;
}

.reports-search:focus {
  border-color: var(--accent);
}

/* Projects bar */
.reports-projects-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reports-project-chip {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.reports-project-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reports-project-chip.active {
  background: var(--surface-raised, #f8f9fb);
  border-color: var(--text-muted);
  color: var(--text);
  font-weight: 600;
}

.reports-project-chip--manage {
  color: var(--text-muted);
  font-size: 11px;
  background: transparent;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dashed;
}

.reports-project-new {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.reports-project-new:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Reports grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.report-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.report-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.report-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.report-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 10px;
}

.report-card-badge--pressure_test {
  background: #eff6ff;
  color: #2563eb;
}

.report-card-badge--blueprint {
  background: #f0fdf4;
  color: #15803d;
}

.report-card-badge--deep_dive {
  background: #faf5ff;
  color: #7c3aed;
}

.report-card-menu-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.15s, background 0.15s;
}

.report-card:hover .report-card-menu-btn {
  opacity: 1;
}

.report-card-menu-btn:hover {
  background: var(--border);
  color: var(--text);
  opacity: 1;
}

.report-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.report-card-preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.report-card-project {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.report-card-location {
  font-size: 11px;
  color: var(--text-muted);
}
.report-card-location--muted {
  color: var(--text-dim);
}
.report-card-location--unsaved {
  color: var(--accent, #285192);
  font-weight: 500;
}
.report-card-location--unsaved.urgent {
  color: #e53e3e;
}

.report-card-date {
  color: var(--text-muted);
}

/* Empty + loading states */
.reports-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.reports-empty-icon {
  margin-bottom: 16px;
  opacity: 0.35;
}

.reports-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.reports-empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

.reports-loading {
  display: flex;
  justify-content: center;
  padding: 60px;
}

.reports-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Detail view */
.reports-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.reports-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.reports-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reports-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-detail-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 10px;
}

.reports-detail-project {
  font-size: 12px;
  color: var(--text-muted);
}

.reports-detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.rh-btn--deliver {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.rh-btn--deliver:hover {
  opacity: 0.9;
}

.rh-btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.rh-btn--primary:hover { opacity: 0.88; background: var(--accent); color: #fff; }

.rh-btn--danger {
  color: #dc2626;
  border-color: #fee2e2;
}

.rh-btn--danger:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

.reports-detail-title-row {
  margin-bottom: 24px;
}

.reports-detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}

.reports-detail-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sidebar tools divider */
.sidebar-tools-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
  opacity: 0.6;
}

/* Save to Reports banner (shown below results) */
.save-report-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-raised, #f8f9fb);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 20px;
}

.save-report-banner-text {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.5;
}

.save-report-banner-text strong {
  color: var(--text);
  font-weight: 600;
}

.save-report-btn {
  padding: 7px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.save-report-btn:hover { opacity: 0.88; }

.save-report-btn--saved {
  background: #16a34a;
}

.save-report-btn--saved:hover { opacity: 0.9; }

.save-report-later {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-style: dashed;
}

.save-report-later:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   GENERIC MODALS (shared by reports + future use)
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg, #fff);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

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

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.modal-close:hover { background: var(--border); }

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-label-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.modal-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.modal-input:focus { border-color: var(--accent); }

.modal-select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  flex: 1;
  transition: border-color 0.15s;
}

.modal-select:focus { border-color: var(--accent); }

.modal-project-select {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-project-new-btn {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.modal-project-new-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}

.modal-btn-cancel {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-btn-cancel:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.modal-btn-primary {
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.modal-btn-primary:hover { opacity: 0.88; }

/* Save to Reports rh-bar button states */
.rh-btn--save-report {
  color: var(--accent);
  border-color: var(--accent);
}

.rh-btn--save-report:hover {
  background: var(--accent);
  color: #fff;
}

.rh-btn--save-report.saved {
  color: #16a34a;
  border-color: #16a34a;
  cursor: default;
}

.rh-btn--save-report.saved:hover {
  background: transparent;
  color: #16a34a;
}

/* Reports sidebar project list */
/* Reports sidebar items — use sidebar-tool-item as base, rsi-btn resets button defaults */
.rsi-btn {
  width: 100%;
  font-family: inherit;
  text-align: left;
  border: none;
}

.reports-sidebar-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--border);
  padding: 1px 6px;
  border-radius: 10px;
}

.reports-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 10px;
  opacity: 0.6;
}

.reports-sidebar-new-project {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  transition: background 0.12s;
}

.reports-sidebar-new-project:hover {
  background: var(--surface2);
}

/* Report card context menu dropdown */
.report-card-menu-dropdown {
  position: fixed;
  background: var(--bg, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 8000;
  min-width: 160px;
  padding: 4px 0;
  animation: fadeInScale 0.1s ease;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.report-card-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.report-card-menu-item:hover {
  background: var(--surface-raised, #f3f4f6);
}

.report-card-menu-item--danger {
  color: #dc2626;
}

.report-card-menu-item--danger:hover {
  background: #fee2e2;
}

/* Toast notification */
.solvur-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  transform: translateY(0);
  background: #16a34a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(22,163,74,0.35);
  z-index: 9999;
  white-space: nowrap;
  animation: toastIn 0.22s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 56px);
}

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

.solvur-toast.fading {
  animation: toastOut 0.3s ease forwards;
}

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

/* Reports - project context header */
.reports-project-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--surface-raised, #f8f9fb);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 12px;
}

.reports-project-context-label {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.reports-project-context-name {
  font-weight: 700;
  color: var(--text);
}

.reports-project-context-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.reports-project-action-btn {
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}

.reports-project-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reports-project-action-btn--danger:hover {
  border-color: #dc2626;
  color: #dc2626;
}

/* Reports detail bottom action bar */
.reports-detail-bottom-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Project rename/delete modals reuse existing modal CSS */

/* Sidebar project item with three-dots */
.reports-sidebar-item--project {
  position: relative;
}

.reports-sidebar-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.reports-sidebar-project-menu-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: var(--text-muted);
  transition: opacity 0.12s, background 0.12s;
  margin-left: 4px;
}

.reports-sidebar-item--project:hover .reports-sidebar-project-menu-btn {
  opacity: 1;
}

.reports-sidebar-project-menu-btn:hover {
  background: var(--border);
  opacity: 1;
}

/* ── EXAMPLE PROMPTS HELPER ─────────────────────────────────────────────────── */
.example-prompts {
  margin-top: 35px;
}

.example-prompts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.example-prompts-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.example-prompts-dismiss {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.example-prompts-dismiss:hover {
  color: var(--text-muted);
}

.example-prompt-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  margin-bottom: 4px;
  border: 0.5px solid var(--border);
  background: transparent;
}

.example-prompt-item:hover {
  background: var(--surface, #f8f9fb);
  border-color: var(--border);
}

.example-prompt-item:last-child {
  margin-bottom: 0;
}

.example-prompt-arrow {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  flex-shrink: 0;
  margin-top: 3px;
}

.example-prompt-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.example-prompt-item:hover .example-prompt-text {
  color: var(--text);
}

/* ── TOOL OVERLAY (Pressure Test / Blueprint from card) ──────────────────── */
.tool-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 800;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.tool-overlay-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.tool-overlay-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 62%;
  max-width: 860px;
  height: 100vh;
  background: var(--bg);
  z-index: 801;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}
.tool-overlay-panel.visible {
  transform: translateX(0);
}
@media (max-width: 768px) {
  .tool-overlay-panel { width: 100%; max-width: 100%; }
}
.tool-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tool-overlay-context {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tool-overlay-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.tool-overlay-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  max-width: 600px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-overlay-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
}
.tool-overlay-close:hover { color: var(--text); background: var(--surface2); }
.tool-overlay-close svg { width: 18px; height: 18px; }
.tool-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.tool-overlay-start-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  text-align: center;
}
.tool-overlay-start-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-light, #eef2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.tool-overlay-start-icon svg { width: 28px; height: 28px; }
.tool-overlay-start-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.6;
}
.tool-overlay-start-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tool-overlay-start-btn:hover { opacity: 0.88; }
.tool-overlay-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
}
.tool-overlay-loading-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.tool-overlay-loading-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: overlayLoadPulse 1.4s ease-in-out infinite;
}
@keyframes overlayLoadPulse {
  0% { width: 0%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0%; margin-left: 100%; }
}
.tool-overlay-result {
  display: none;
}
.tool-overlay-result.visible {
  display: block;
}
.tool-overlay-source-ref {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}
.tool-overlay-source-ref-icon { color: var(--text-dim); flex-shrink: 0; margin-top: 2px; }
.tool-overlay-source-ref-body { flex: 1; min-width: 0; }
.tool-overlay-source-ref-tag { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tool-overlay-source-ref-summary { color: var(--text-muted); line-height: 1.5; }
.tool-overlay-source-ref-link { color: var(--accent); text-decoration: none; font-size: 12px; margin-top: 4px; display: inline-block; }
.tool-overlay-source-ref-link:hover { text-decoration: underline; }
.tool-overlay-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: var(--bg);
}
.tool-overlay-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tool-overlay-save-btn:hover { opacity: 0.88; }
.tool-overlay-save-btn.saved {
  background: var(--success, #059669);
  cursor: default;
}
.tool-overlay-save-btn svg { width: 14px; height: 14px; }
.tool-overlay-expiry {
  font-size: 12px;
  color: var(--text-dim);
}
.tool-overlay-expiry strong { color: var(--text-muted); }

/* Unsaved bucket in Reports */
.reports-unsaved-section {
  margin-bottom: 28px;
}
.reports-unsaved-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.reports-unsaved-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.reports-unsaved-count {
  font-size: 11px;
  background: var(--surface2);
  color: var(--text-dim);
  border-radius: 10px;
  padding: 1px 7px;
}
.report-card-expiry {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
.report-card-expiry.urgent { color: #e53e3e; }
.reports-first-time-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #e8eef8;
  border: 0.5px solid #c5d4ec;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #1e3a6e;
}
.reports-first-time-notice svg { flex-shrink: 0; margin-top: 1px; }
.reports-first-time-notice-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #285192;
  opacity: 0.6;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0;
}
.reports-first-time-notice-close:hover { opacity: 1; }

/* ── REPORT DETAIL THREE-DOTS MENU ──────────────────────────────────────────── */
.report-detail-menu-btn {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  padding: 6px 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.report-detail-menu-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════════
   DEEP DIVE PANEL
   ══════════════════════════════════════════════════════════════════════════════ */

.deepdive-wrap {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── FILE DROP ZONE ── */
.dd-file-zone {
  border: 1.5px dashed var(--accent);
  border-radius: 12px;
  padding: 28px 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #f6f9ff;
  margin-bottom: 16px;
  user-select: none;
}
.dd-file-zone:hover,
.dd-file-zone.drag-over {
  border-color: var(--accent);
  background: #e0eaff;
}
.dd-file-zone-icon {
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}
.dd-file-zone:hover .dd-file-zone-icon,
.dd-file-zone.drag-over .dd-file-zone-icon {
  color: var(--accent);
}
.dd-file-zone-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.dd-file-zone-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.dd-file-zone-suggested {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 8px;
  border: 0.5px solid var(--border);
  text-align: left;
}
.dd-suggested-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dd-suggested-list {
  margin: 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dd-suggested-list li {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.dd-suggested-note {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  font-style: italic;
  border-top: 0.5px solid var(--border);
  padding-top: 6px;
  margin-top: 2px;
}

/* ── FILE LIST ── */
.dd-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.dd-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.dd-file-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.dd-file-name {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dd-file-size {
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.dd-file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
}
.dd-file-remove:hover { color: #dc2626; background: #fef2f2; }
.dd-file-error {
  border-color: #fca5a5;
  background: #fef2f2;
}
.dd-file-error .dd-file-icon { color: #dc2626; }

/* ── DEEP DIVE SMART PROMPT ── */
/* Flush below page-intro-row — no extra top margin */
#ddSmartPrompt.smart-prompt-panel { margin-top: 0; }
/* sp-body: no padding, white background — textarea fills full width between gray header and footer */
#ddSmartPrompt .sp-body { padding: 0; background: var(--bg); }
/* Charcount: white background, padded to align with textarea text */
#ddSmartPrompt .dd-sp-charcount { padding: 2px 14px 6px; background: var(--bg); }
/* Footer border-top to separate white textarea from gray footer */
#ddSmartPrompt .sp-footer { border-top: 1px solid var(--border); }
/* Suppress the global textarea:focus glow inside deepdive — the panel border handles focus state */
#ddSmartPrompt .dd-sp-textarea:focus { box-shadow: none; border-color: transparent; outline: none; }

/* Deep dive page-intro-row — no overrides needed, inherits from .page-intro-row exactly */
.dd-sp-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: var(--bg);
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  min-height: 120px;
  border-radius: 0;
  padding: 14px 14px 8px;
  display: block;
}
.dd-sp-textarea::placeholder { color: var(--text-dim); font-size: 13px; }
.dd-sp-textarea.error { background: #fff8f8; }
.dd-sp-charcount {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  margin-top: 4px;
}
/* Back button in sp-footer */
.dd-sp-back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0;
  font-family: inherit;
  transition: color 0.12s;
  white-space: nowrap;
}
.dd-sp-back:hover { color: var(--text); }

/* ── FILE UPLOAD SECTION ── */
.dd-files-section {
  margin-top: 40px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.dd-files-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dd-files-optional {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dd-files-subtext {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 10px;
  margin-bottom: 5px;
}

/* ── DEEPDIVE SUBMIT WRAP ── */
.dd-submit-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ── BACK TO QUESTIONS LINK ── */
.dd-back-to-questions {
  display: inline-block;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-dim);
  font-family: inherit;
  padding: 8px 0 0;
  transition: color 0.12s;
}
.dd-back-to-questions:hover { color: var(--text-muted); }

/* ── LOADING LABEL CYCLING ── */
.deepdive-wrap .pressure-loading {
  margin-top: 40px;
}

/* ══ DEEP DIVE REPORT ══════════════════════════════════════════════════════════ */

.dd-report {
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* In deepdive panel, constrain to readable column */
.deepdive-wrap .dd-report {
  max-width: 768px;
}

/* ── EYEBROW LABELS ── */
.dd-report-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ── SITUATION OVERVIEW ── */
.dd-situation-summary {
  padding: 0 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.dd-situation-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}
.dd-situation-text p { margin: 0 0 14px; }
.dd-situation-text p:last-child { margin-bottom: 0; }

/* ── PROBLEMS IDENTIFIED ── */
.dd-problems-section {
  padding: 0 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

/* Clickable index */
.dd-problem-index {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 48px;
}
.dd-pindex-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.dd-pindex-row:last-child { border-bottom: none; }
.dd-pindex-row:hover { background: var(--surface); }
.dd-pindex-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.dd-pindex-sev--critical { background: #dc2626; }
.dd-pindex-sev--high { background: #ea580c; }
.dd-pindex-sev--medium { background: #d97706; }
.dd-pindex-sev--low { background: #16a34a; }
.dd-pindex-num.dd-pindex-sev--critical { background: #dc2626; }
.dd-pindex-num.dd-pindex-sev--high { background: #ea580c; }
.dd-pindex-num.dd-pindex-sev--medium { background: #d97706; }
.dd-pindex-num.dd-pindex-sev--low { background: #16a34a; }
.dd-pindex-headline {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.dd-pindex-label {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dd-pindex-label.dd-pindex-sev--critical { background: #fef2f2; color: #dc2626; }
.dd-pindex-label.dd-pindex-sev--high { background: #fff7ed; color: #ea580c; }
.dd-pindex-label.dd-pindex-sev--medium { background: #fffbeb; color: #d97706; }
.dd-pindex-label.dd-pindex-sev--low { background: #f0fdf4; color: #16a34a; }

/* Problem articles */
.dd-problems-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.dd-problem-article {
  scroll-margin-top: 80px;
}

/* Section marker — "1 · Critical" divider */
.dd-pa-section-marker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dd-pa-marker-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.dd-pa-marker-num.dd-pindex-sev--critical { background: #dc2626; }
.dd-pa-marker-num.dd-pindex-sev--high { background: #ea580c; }
.dd-pa-marker-num.dd-pindex-sev--medium { background: #d97706; }
.dd-pa-marker-num.dd-pindex-sev--low { background: #16a34a; }
.dd-pa-marker-label {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.dd-pa-marker-label.dd-pindex-sev--critical { background: #fef2f2; color: #dc2626; }
.dd-pa-marker-label.dd-pindex-sev--high { background: #fff7ed; color: #ea580c; }
.dd-pa-marker-label.dd-pindex-sev--medium { background: #fffbeb; color: #d97706; }
.dd-pa-marker-label.dd-pindex-sev--low { background: #f0fdf4; color: #16a34a; }

/* Headline */
.dd-pa-headline {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* Problem and Solution blocks */
.dd-pa-block {
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 12px;
}
.dd-pa-block:last-child { margin-bottom: 0; }

.dd-pa-block--problem {
  background: var(--surface);
  border: 1px solid var(--border);
}
.dd-pa-block--solution {
  background: #f0f7ff;
  border: 1px solid rgba(37,99,235,0.15);
}
.dd-pa-block-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.dd-pa-block--problem .dd-pa-block-label {
  color: var(--text-dim);
}
.dd-pa-block--solution .dd-pa-block-label {
  color: var(--accent);
}
.dd-pa-block-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}
.dd-pa-block-text p { margin: 0 0 12px; }
.dd-pa-block-text p:last-child { margin-bottom: 0; }

/* Blueprint CTA */
.dd-blueprint-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 16px;
  transition: opacity 0.15s;
}
.dd-blueprint-btn:hover { opacity: 0.88; }

/* ── PATTERNS & CONNECTIONS ── */
.dd-patterns-section {
  padding: 0 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.dd-patterns-insight-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 28px;
}
.dd-patterns-insight-text p { margin: 0 0 12px; }
.dd-patterns-insight-text p:last-child { margin-bottom: 0; }
.dd-diagram-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.dd-diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 300px;
}
.dd-conn-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dd-conn-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.dd-conn-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.dd-conn-detail { flex: 1; }
.dd-conn-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 5px;
}
.dd-conn-explanation {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.dd-conn-affects-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dd-conn-tag {
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 4px;
  padding: 3px 8px;
  line-height: 1.4;
}

/* ── WHAT TO WATCH ── */
.dd-watch-section {
  padding: 0 0 40px;
  margin-bottom: 0;
}
.dd-watch-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dd-watch-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.dd-watch-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-dim);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.dd-watch-body { flex: 1; }
.dd-watch-signal {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}
.dd-watch-why {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── DEEPDIVE SIDEBAR HISTORY CARD ── */
.dd-history-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.1s;
}
.dd-history-card:hover { background: var(--surface); }
.dd-history-card.active { background: var(--accent-light); }
.dd-history-card-body { flex: 1; min-width: 0; }
.dd-history-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.dd-history-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.dd-history-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-history-card-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  color: var(--text-dim);
  border-radius: 5px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s;
}
.dd-history-card:hover .dd-history-card-menu-btn { opacity: 1; }
.dd-history-card-menu-btn:hover { background: var(--surface2); color: var(--text); }

/* ── DIAGRAM SVG ELEMENTS (styled inline by JS, these are fallbacks) ── */
.dd-diagram-node { }
.dd-diagram-link { }


/* ── DELIVER PANEL ──────────────────────────────────────────────────────────── */

/* Main panel wrap */
/* Picker: native page content, uses wrap padding directly */
#deliverPickerView {
  padding: 40px 0 80px;
}
/* Preview: no constraint */
#deliverPreviewView {
  padding: 16px 0 0;
}

/* ── SIDEBAR SETTINGS PANEL ── */
.deliver-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.dsb-field {
  margin-bottom: 12px;
}
.dsb-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.dsb-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
}
.dsb-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.12s;
}
.dsb-input:focus { border-color: var(--accent); }
.dsb-input::placeholder { color: var(--text-dim); }

/* Logo */
.dsb-logo-zone {
  border: 1.5px dashed var(--accent);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--accent-light);
  transition: background 0.12s;
  margin-bottom: 4px;
}
.dsb-logo-zone:hover { background: #e0eaff; }
.dsb-logo-placeholder {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.dsb-logo-img {
  max-height: 32px;
  max-width: 140px;
  object-fit: contain;
}
.dsb-logo-remove {
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.dsb-logo-remove:hover { color: #dc2626; }

/* Themes */
.dsb-themes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dsb-theme-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.dsb-theme-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.dsb-theme-btn--active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); font-weight: 600; }
.dsb-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* Export section */
.dsb-export-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dsb-export-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  width: 100%;
}
.dsb-export-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.dsb-export-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.dsb-export-btn--primary:hover:not(:disabled) { opacity: 0.88; color: #fff; background: var(--accent); }
.dsb-export-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dsb-export-status {
  font-size: 11px;
  color: var(--text-muted);
  min-height: 16px;
  line-height: 1.4;
}

/* ── REPORT PICKER — ACCORDION ── */
#deliverPickerView {
  padding: 40px 0 80px;
}
.dpicker-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.dpicker-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.dpicker-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 7px 11px;
  max-width: 280px;
  flex: 1;
  color: var(--text-dim);
}
.dpicker-search {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.dpicker-search::placeholder { color: var(--text-dim); }
.dpicker-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
}
.dpicker-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 32px 0;
  color: var(--text-dim);
  font-size: 13px;
}

/* Unsaved flat section */
.dpicker-unsaved-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.dpicker-flat-section {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.dpicker-flat-section .dpicker-row {
  border-bottom: 1px solid var(--border);
}
.dpicker-flat-section .dpicker-row:last-child {
  border-bottom: none;
}

/* Folder accordion */
.dpicker-folder {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.dpicker-folder-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--surface);
  user-select: none;
  transition: background 0.1s;
}
.dpicker-folder-header:hover { background: var(--surface2, #f1f5f9); }
.dpicker-folder-icon { color: var(--text-dim); flex-shrink: 0; display: flex; }
.dpicker-folder-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.dpicker-folder-count {
  font-size: 12px;
  color: var(--text-dim);
  margin-right: 4px;
}
.dpicker-folder-chevron {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.18s;
}
.dpicker-folder.open .dpicker-folder-chevron {
  transform: rotate(90deg);
}
.dpicker-folder-body {
  display: none;
  border-top: 1px solid var(--border);
}
.dpicker-folder.open .dpicker-folder-body {
  display: block;
}

/* Report rows — shared */
.dpicker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 11px 38px;
  cursor: pointer;
  transition: background 0.1s;
}
.dpicker-row:hover { background: var(--accent-light); }
.dpicker-row:hover .dpicker-arrow { color: var(--accent); }
.dpicker-info { flex: 1; min-width: 0; }
.dpicker-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.dpicker-meta { font-size: 11px; color: var(--text-dim); }
.dpicker-arrow { color: var(--text-dim); flex-shrink: 0; }

/* ── PREVIEW AREA ── */
.deliver-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.deliver-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: color 0.12s, border-color 0.12s;
}
.deliver-back-btn:hover { color: var(--text); border-color: var(--border-dark); }
.deliver-preview-report-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deliver-preview-loading-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.deliver-preview-frame {
  width: calc(100% + 40px); /* break out of .wrap 20px side padding */
  margin-left: -20px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  display: block;
  overflow: hidden;
}

/* Report detail Deliver button */
.report-deliver-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.report-deliver-btn:hover { opacity: 0.88; }

/* Spinner animation */
@keyframes deliver-spin {
  to { transform: rotate(360deg); }
}
.deliver-spinner {
  animation: deliver-spin 0.9s linear infinite;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .dd-problem-header { flex-direction: column; gap: 10px; }
  .dd-priority-badge { flex-direction: row; align-items: center; gap: 8px; }
}
