/* ==========================================================================
   Claude Enterprise DIY Kit — Modern, Minimalistic, Ultra-Smooth AI Interface
   Colors: White/Dark paper background, #222 headings, #00BBEE cyan-blue (--teal),
   #7519D2 violet (--gold), #1F9D5C emerald (--green), #D64545 crimson (--rust).
   ========================================================================== */

:root {
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F8F9FA;
  --surface-3: #F1F3F5;
  --border: #E4E4E7;
  --border-hover: #CBD5E1;
  --ink: #1E293B;
  --ink-muted: #64748B;
  
  --gold: #7519D2;
  --gold-soft: #F3E8FF;
  --teal: #00BBEE;
  --teal-hover: #0099C4;
  --teal-soft: #E0F8FF;
  --green: #10B981;
  --green-soft: #ECFDF5;
  --amber: #D97706;
  --amber-soft: #FEF3C7;
  --rust: #EF4444;
  --rust-soft: #FEF2F2;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.12), 0 4px 12px -4px rgba(15, 23, 42, 0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F172A;
    --surface: #1E293B;
    --surface-2: #192231;
    --surface-3: #243044;
    --border: #334155;
    --border-hover: #475569;
    --ink: #F8FAFC;
    --ink-muted: #94A3B8;
    
    --gold: #C084FC;
    --gold-soft: #2E1065;
    --teal: #38BDF8;
    --teal-hover: #0EA5E9;
    --teal-soft: #082F49;
    --green: #34D399;
    --green-soft: #064E3B;
    --amber: #FBBF24;
    --amber-soft: #451A03;
    --rust: #F87171;
    --rust-soft: #450A0A;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 36px -8px rgba(0, 0, 0, 0.5);
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.display {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mono {
  font-family: "SF Mono", "Cascadia Code", Consolas, "Roboto Mono", monospace;
  font-variant-numeric: tabular-nums;
}

code {
  font-family: "SF Mono", "Cascadia Code", Consolas, "Roboto Mono", monospace;
  font-size: 0.88em;
  background: var(--surface-3);
  color: var(--teal);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

textarea {
  resize: vertical;
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- Layout & Sidebar ---------- */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

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

.brand-logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.brand-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-tagline {
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 600;
}

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

.step-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  width: 100%;
  color: var(--ink-muted);
  transition: var(--transition);
}

.step-nav-item:hover {
  background: var(--surface);
  color: var(--ink);
}

.step-nav-item.active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.step-nav-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface-2);
  transition: var(--transition);
}

.step-nav-item.active .step-nav-badge {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.step-nav-item.done .step-nav-badge {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
}

.step-nav-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.step-nav-sub {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.save-note {
  font-size: 11px;
  color: var(--ink-muted);
}

.btn-reset-all {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  text-align: left;
  transition: var(--transition);
}

.btn-reset-all:hover {
  color: var(--rust);
  border-color: var(--rust);
  background: var(--rust-soft);
}

/* ---------- Main Content Area ---------- */

.main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 120px;
}

.main-inner {
  max-width: 740px;
  margin: 0 auto;
}

.stage-eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 4px;
}

.stage-eyebrow:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.stage-title {
  margin: 4px 0 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stage-intro {
  max-width: 64ch;
  color: var(--ink-muted);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ---------- Cards & Form Fields ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

/* ---------- Portal Home ---------- */

.portal-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 28px 0;
  max-width: 64ch;
}

.portal-progress-track {
  flex: 1;
  height: 8px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.portal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.portal-card {
  margin-bottom: 0;
}

.portal-card:not(.locked):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.portal-card.locked {
  box-shadow: none;
}

.card h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.card .card-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: -8px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.field label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.field .why-line {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 1px 0 4px;
  line-height: 1.45;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  width: 100%;
  color: var(--ink);
  font-size: 14px;
  transition: var(--transition);
  box-shadow: inset 0 1.5px 3px rgba(15, 23, 42, 0.03);
}

.field input:hover, .field select:hover, .field textarea:hover {
  border-color: var(--border-hover);
  background: var(--surface-3);
}

.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--paper);
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px var(--teal-soft), inset 0 1px 2px rgba(0, 0, 0, 0.02);
  outline: none;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
  padding: 12px 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Buttons & Interactive Components ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 187, 238, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

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

.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.actions-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-green { background: var(--green-soft); color: var(--green); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }

.status-msg {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  display: none;
  line-height: 1.45;
}
.status-msg.show { display: block; }
.status-msg.ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green); }
.status-msg.err { background: var(--rust-soft); color: var(--rust); border: 1px solid var(--rust); }

/* ---------- Chip Toggles ---------- */

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.chip-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.chip-toggle.on {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.chip-toggle input {
  display: none;
}

/* ---------- Concept & Recommend Cards ---------- */

.concept-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.concept-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.concept-card:last-child {
  border-bottom: none;
}

.concept-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.concept-card h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.concept-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.concept-example {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.recommend-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.recommend-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-top: 2px;
  background: var(--gold-soft);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.recommend-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

/* ---------- Research Banner ---------- */

.research-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, var(--teal-soft) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(0, 187, 238, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.research-banner__icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Workflow Problem Cards ---------- */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.problem-item {
  display: flex;
  flex-direction: column;
}

.problem-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  user-select: none;
}

.problem-card:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  transform: translateY(-1px);
}

.problem-card.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.problem-card__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  transition: var(--transition);
  background: var(--surface);
}

.problem-card.selected .problem-card__check {
  border-color: var(--teal);
  background: var(--teal);
  color: #FFFFFF;
}

.problem-card__body {
  flex: 1;
  min-width: 0;
}

.problem-card__label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}

.problem-card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.problem-fields {
  display: none;
  flex-direction: column;
  gap: 12px;
  border: 2px solid var(--teal);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px 18px;
  background: var(--surface-2);
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.problem-fields.open {
  display: flex;
}

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

/* ---------- Toast Notification ---------- */

.app-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  max-width: calc(100vw - 40px);
  text-align: center;
  white-space: nowrap;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast--success { border-color: var(--green); color: var(--green); }
.app-toast--warn { border-color: var(--rust); color: var(--rust); }
.app-toast--info { border-color: var(--teal); color: var(--teal); }

/* ---------- Runbook Progress ---------- */

.rb-overall {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.rb-track {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border);
  overflow: hidden;
}

.rb-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rb-pct {
  font-size: 16px;
  font-weight: 700;
  min-width: 2.8em;
  text-align: right;
}

.foot-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.load-msg {
  padding: 48px;
  color: var(--ink-muted);
  font-size: 14.5px;
  text-align: center;
}

/* ---------- Responsive Adjustments ---------- */

@media (max-width: 840px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    overflow-x: auto;
    padding: 16px;
  }
  .steps-nav {
    flex-direction: row;
  }
  .sidebar-foot {
    display: none;
  }
  .main {
    padding: 24px 20px 80px;
  }
}

/* ---------- Welcome Timeline Card ---------- */
.welcome-timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.welcome-step:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.welcome-step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-step strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--ink);
}
.welcome-step p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* ---------- Vertical Department Cards ---------- */
.dept-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.dept-vcard {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.dept-vcard:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  transform: translateY(-1px);
}

.dept-vcard.selected,
.problem-card.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom: 1px dashed rgba(20, 184, 166, 0.4) !important;
}

.problem-fields {
  display: none;
}

.problem-fields.open {
  display: block;
  border: 2px solid var(--teal);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  padding: 20px 22px;
  background: var(--surface-2);
  margin-top: -1px;
  position: relative;
  z-index: 0;
}

.dept-vcard__check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  background: var(--surface);
  transition: var(--transition);
  margin-top: 2px;
}

.dept-vcard.selected .dept-vcard__check {
  border-color: var(--teal);
  background: var(--teal);
  color: #FFFFFF;
}

.dept-vcard__body {
  flex: 1;
  min-width: 0;
}

.dept-vcard__label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.dept-vcard__desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* ---------- Guided Software & Tools Wizard ---------- */
.tool-guided-progress {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.tool-guided-progress__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tool-guided-progress__title {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.tool-guided-progress__pct {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal);
}
.tool-guided-progress__bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.tool-guided-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: var(--radius-full);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-guided-container.fade-in {
  animation: toolFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tool-guided-card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.tool-summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.tool-summary-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: var(--transition);
}
.tool-summary-row:hover {
  border-color: var(--border-hover);
}
.tool-summary-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tool-summary-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Pain Point File Upload Dropzone (Minimalist & Compact) ---------- */
.pain-file-upload-min {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.file-dropzone-min {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: var(--transition);
  max-width: fit-content;
}

.file-dropzone-min:hover, .file-dropzone-min.dragover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.file-dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}

.file-dropzone__icon {
  font-size: 24px;
}

.file-dropzone__sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.file-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--teal);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.file-badge__remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

/* Animations for website data extraction & field populating */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fieldPopHighlight {
  0% { border-color: #00BBEE; box-shadow: 0 0 0 4px rgba(0,187,238,0.35); background: rgba(0,187,238,0.08); }
  50% { border-color: #10B981; box-shadow: 0 0 0 4px rgba(16,185,129,0.35); background: rgba(16,185,129,0.08); }
  100% { border-color: var(--border); box-shadow: none; background: var(--surface); }
}

.field-populated {
  animation: fieldPopHighlight 2.5s ease-out;
}

/* Drip Campaign Test & Preview Buttons */
.drip-day-item {
  transition: var(--transition);
}
.drip-day-item:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.btn-preview-drip-day:hover {
  border-color: var(--teal) !important;
  color: var(--teal) !important;
  background: var(--teal-soft) !important;
}

.btn-test-drip-day:hover {
  background: var(--teal-hover) !important;
  transform: translateY(-1px);
}

/* ---------- Print + Keep (the Basics page's quick-reference card) ---------- */
/* window.print() prints the whole document by default — this hides
   everything else (sidebar, other cards) so only the reference table
   comes out of the printer, matching what the card's name promises.
   Landscape + a fixed per-column width budget (rather than the auto-layout
   table used on screen) is what keeps all 8 rows on a single page instead
   of wrapping onto a second sheet. */
@media print {
  @page {
    size: landscape;
    margin: 0.4in;
  }
  body * {
    visibility: hidden;
  }
  #print-keep-card, #print-keep-card * {
    visibility: visible;
  }
  #print-keep-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  /* The on-screen heading/Print button are swapped out for the branded
     masthead — see #print-keep-header in the Basics page markup. */
  #print-keep-topbar {
    display: none !important;
  }
  #print-keep-header {
    display: flex !important;
  }
  /* !important below: every cell already carries an inline font-size/padding
     from the on-screen styling (see the Basics page markup in app.js), and an
     inline style beats any external selector — including an #id one — that
     isn't !important. Without it here, the table silently kept its full-size
     on-screen type in print and ran onto a second page. */
  #print-keep-table {
    table-layout: fixed;
    font-size: 8.5pt !important;
  }
  #print-keep-table th,
  #print-keep-table td {
    padding: 4px 7px !important;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
  /* The Module column pairs an icon with a label inside a nowrap flex row —
     fine at full width on screen, but "Enterprise Search" doesn't fit this
     column's fixed print width on one line; nowrap doesn't wrap it, it just
     overflows visibly into the next cell. Let it wrap in print instead. */
  #print-keep-table td:nth-child(1) strong {
    white-space: normal !important;
  }
  #print-keep-table th:nth-child(1),
  #print-keep-table td:nth-child(1) {
    width: 14%;
  }
  #print-keep-table th:nth-child(2),
  #print-keep-table td:nth-child(2) {
    width: 28%;
  }
  #print-keep-table th:nth-child(3),
  #print-keep-table td:nth-child(3) {
    width: 27%;
  }
  #print-keep-table th:nth-child(4),
  #print-keep-table td:nth-child(4) {
    width: 31%;
  }
  #print-keep-table tr {
    page-break-inside: avoid;
  }
}

