/* ==============================================================================
   FOUNDER MARKETING & GTM STUDIO (EdoStra/Marketing-for-Founders)
   Clean Obsidian Surface + Cyan (#38bdf8) Accent — Zero card backdrop-filter blur
   ============================================================================== */

#marketingStudioPanel {
  display: grid;
  gap: 18px;
}

#marketingStudioPanel[hidden] {
  display: none !important;
}

.fm-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: linear-gradient(135deg, rgba(14, 23, 38, 0.96), rgba(9, 13, 22, 0.98));
}

.fm-hero-copy h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fm-hero-copy p {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 700px;
}

.fm-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.fm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fm-tab-btn {
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.fm-tab-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #f8fafc;
}

.fm-tab-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #38bdf8;
}

.fm-card {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(11, 16, 27, 0.94);
}

.fm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

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

.fm-field.full {
  grid-column: 1 / -1;
}

.fm-field label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.fm-field input,
.fm-field select,
.fm-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #070b14;
  color: #f8fafc;
  font-size: 13.5px;
  font-family: inherit;
}

.fm-field input:focus,
.fm-field select:focus,
.fm-field textarea:focus {
  outline: none;
  border-color: #38bdf8;
}

.fm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.fm-output-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: #060911;
}

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

.fm-output-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
  font-family: inherit;
}

.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.fm-mod-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(13, 19, 32, 0.94);
}

.fm-mod-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
}

.fm-mod-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.fm-mod-head h4 {
  margin: 0;
  font-size: 15px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fm-group-pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  text-transform: uppercase;
}

.fm-mod-desc {
  margin: 0;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

.fm-mod-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: #cbd5e1;
  display: grid;
  gap: 4px;
}

.fm-dir-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.fm-dir-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #080d18;
}

.fm-dir-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.fm-dir-top a {
  color: #38bdf8;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}

.fm-dir-top a:hover {
  text-decoration: underline;
}

.fm-flair {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.fm-pmf-result {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(8, 15, 28, 0.96);
}

.fm-pmf-score {
  font-size: 28px;
  font-weight: 800;
  color: #38bdf8;
}

.fm-pmf-score.ok {
  color: #34d399;
}

.fm-pmf-score.warn {
  color: #fbbf24;
}

.fm-muted {
  color: #94a3b8;
  font-size: 13px;
}

@media (max-width: 640px) {
  .fm-hero {
    padding: 16px;
  }
  .fm-grid,
  .fm-dir-list {
    grid-template-columns: 1fr;
  }
}

#marketingStudioPanel h2,
#marketingStudioPanel h3 {
  text-wrap: balance;
}

#marketingStudioPanel :is(.fm-pmf-score, .fm-badge) {
  font-variant-numeric: tabular-nums;
}

#marketingStudioPanel :is(button, a, summary, input, select, textarea):focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #marketingStudioPanel * {
    transition-duration: 0.001ms !important;
  }
}
