/* ═══════════════════════════════════════════════════════════════════════════
   Moltgate — Design System
   Light brand palette: black ink, coral red, warm paper, restrained dark chrome
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand palette */
  --mg-red: #e63946;
  --mg-red-dark: #c1121f;
  --mg-coral: #ff5a4f;
  --mg-coral-soft: #ffe4df;
  --mg-coral-glow: rgba(255, 90, 79, 0.24);
  --mg-orange: #ffb000;
  --mg-ink: #111111;
  --mg-paper: #ffffff;
  --mg-cream: #fffaf6;
  --mg-blush: #fff0eb;
  --mg-border-muted: #d8d8d8;

  /* Surfaces */
  --mg-bg: var(--mg-paper);
  --mg-surface: var(--mg-paper);
  --mg-surface-raised: var(--mg-paper);
  --mg-border: var(--mg-border-muted);
  --mg-border-subtle: var(--mg-border-muted);

  /* Dark chrome */
  --mg-chrome-bg: #0b0f19;
  --mg-chrome-border: #1e2536;
  --mg-chrome-text: #e8ecf4;
  --mg-chrome-muted: #8892a6;
  --mg-chrome-subtle: #5a6478;

  /* Text */
  --mg-text: var(--mg-ink);
  --mg-text-secondary: #3b3b3b;
  --mg-text-muted: #676767;
  --mg-text-tertiary: #7a7a7a;

  /* Accent */
  --mg-accent: linear-gradient(135deg, var(--mg-red) 0%, var(--mg-coral) 100%);

  /* Functional */
  --mg-success: #34D399;
  --mg-info: #60A5FA;
  --mg-warning: #FBBF24;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ──────────────────────────────────────────────────────────────── */

body {
  background: var(--mg-bg);
  color: var(--mg-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
.display-4,
.display-5,
.display-6,
.mg-final-cta-title {
  font-family: 'IBM Plex Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.navbar-brand,
footer .footer-brand,
footer .navbar-brand {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

main { flex: 1; }

a { color: var(--mg-coral); }
a:hover { color: var(--mg-red); }

::selection {
  background: var(--mg-coral-soft);
  color: var(--mg-text);
}

/* ── Typography ────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--mg-text);
}

.text-coral { color: var(--mg-coral) !important; }
.text-red { color: var(--mg-red) !important; }
.text-muted-custom { color: var(--mg-text-muted) !important; }
.text-secondary-custom { color: var(--mg-text-secondary) !important; }
.hero-readable-muted { color: var(--mg-text-secondary) !important; }

/* ── Navbar ────────────────────────────────────────────────────────────── */

.navbar {
  background: var(--mg-chrome-bg) !important;
  border-bottom: 1px solid var(--mg-chrome-border) !important;
  padding: 0.75rem 0;
}

.navbar-brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mg-chrome-text) !important;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.navbar-brand .brand-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar .nav-link {
  color: var(--mg-chrome-muted) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  padding: 0.35rem 0.6rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px var(--mg-coral);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

.navbar .nav-link:hover {
  color: var(--mg-paper) !important;
  background: rgba(255, 255, 255, 0.08);
}

/* ── Dropdown ──────────────────────────────────────────────────────────── */

.dropdown-menu {
  background: var(--mg-paper) !important;
  border: 1px solid var(--mg-border-muted) !important;
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow: var(--bs-box-shadow);
}

.dropdown-item {
  color: var(--mg-text) !important;
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: linear-gradient(135deg, var(--mg-red) 0%, var(--mg-coral) 100%) !important;
  color: var(--mg-paper) !important;
}

.dropdown-divider {
  border-color: var(--mg-border) !important;
  margin: 0.3rem 0;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn-coral {
  background: linear-gradient(135deg, var(--mg-red) 0%, var(--mg-coral) 100%);
  border: 1px solid transparent;
  color: var(--mg-paper) !important;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s;
}

.btn-coral:hover,
.btn-coral:focus,
.btn-coral:active,
.btn-coral:visited {
  color: var(--mg-paper) !important;
}

.btn-coral:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--mg-coral-glow);
}

.btn-coral-lg,
.btn-ghost-lg.btn-ghost-coral {
  padding: 0.85rem 2.2rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.btn-ghost-coral {
  background: var(--mg-paper);
  border: 1px solid var(--mg-red);
  color: var(--mg-red) !important;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s var(--ease-out);
}

.btn-ghost-coral:hover,
.btn-ghost-coral:focus,
.btn-ghost-coral:active {
  border-color: var(--mg-coral);
  background: var(--mg-coral-soft);
  color: var(--mg-red) !important;
}

.btn-ghost-lg {
  padding: 0.85rem 2.2rem;
  font-size: 1.05rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--mg-border);
  color: var(--mg-text);
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  border-color: var(--mg-coral);
  background: var(--mg-coral-soft);
  color: var(--mg-text);
}

.btn-ghost-hover-default {
  border-color: var(--mg-coral);
  background: var(--mg-coral-soft);
  color: var(--mg-text);
}

.lane-example-page-section {
  padding-top: 5.5rem !important;
  padding-bottom: 5.5rem !important;
}

.mg-docs-page .badge-success-soft,
.mg-docs-page .badge-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.65em;
  border-radius: 5px;
}

.mg-docs-page .badge-success-soft {
  background: rgba(52, 211, 153, 0.12);
  color: var(--mg-success);
  border: 1px solid color-mix(in srgb, var(--mg-success) 50%, var(--mg-paper));
}

.mg-docs-page .badge-tag {
  background: rgba(96, 165, 250, 0.1);
  color: var(--mg-info);
  border: 1px solid color-mix(in srgb, var(--mg-info) 50%, var(--mg-paper));
}

.mg-docs-page code {
  color: var(--mg-text-muted);
  background: color-mix(in srgb, var(--mg-border-muted) 35%, var(--mg-paper));
  border: none;
}

.mg-analytics-page .badge-tag,
.mg-analytics-page .badge-warning-soft,
.mg-analytics-page .badge-success-soft,
.mg-analytics-page .badge-muted {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.65em;
  border-radius: 5px;
}

.mg-analytics-page .badge-tag {
  background: rgba(96, 165, 250, 0.1);
  color: var(--mg-info);
  border: 1px solid color-mix(in srgb, var(--mg-info) 50%, var(--mg-paper));
}

.mg-analytics-page .badge-warning-soft {
  background: rgba(245, 158, 11, 0.12);
  color: var(--mg-warning);
  border: 1px solid color-mix(in srgb, var(--mg-warning) 50%, var(--mg-paper));
}

.mg-analytics-page .badge-success-soft {
  background: rgba(52, 211, 153, 0.12);
  color: var(--mg-success);
  border: 1px solid color-mix(in srgb, var(--mg-success) 50%, var(--mg-paper));
}

.mg-analytics-page .badge-muted {
  background: rgba(138, 146, 166, 0.12);
  color: var(--mg-text-secondary);
  border: 1px solid color-mix(in srgb, var(--mg-text-secondary) 35%, var(--mg-paper));
}

@media (max-width: 767.98px) {
  .lane-example-page-section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

.btn-ghost.active,
.btn-ghost:active {
  border-color: var(--mg-coral);
  background: var(--mg-coral-soft);
  color: var(--mg-text);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.25);
}

#laneTabs .btn-ghost[aria-selected="true"] {
  border-color: var(--mg-coral);
  background: var(--mg-coral-soft);
  color: var(--mg-text);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.25);
}

.btn-sm-custom {
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  border-radius: 6px;
}

.browse-switch .btn {
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0;
}

.browse-switch .btn:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.browse-switch .btn:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.browse-switch .btn.active {
  border-color: var(--mg-coral);
  background: var(--mg-coral-soft);
  color: var(--mg-text);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.25);
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.mg-interactive-card:hover {
  border-color: var(--mg-coral);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.08);
}

.mg-highlight-card {
  background: color-mix(in srgb, var(--mg-coral-soft) 45%, var(--mg-paper));
  border-color: color-mix(in srgb, var(--mg-red) 45%, var(--mg-border-muted));
}

.badge.rounded-pill.border {
  background: var(--mg-coral-soft) !important;
  border-color: var(--mg-border) !important;
  color: var(--mg-text) !important;
}

.mg-proof-badge {
  background: var(--mg-coral-soft) !important;
  border-color: var(--mg-border) !important;
  color: var(--mg-text-secondary) !important;
}

.mg-brand-panel {
  background: var(--mg-paper) !important;
  border-color: var(--mg-border) !important;
}

.mg-brand-panel-tint {
  background: color-mix(in srgb, var(--mg-coral-soft) 45%, var(--mg-paper)) !important;
  border-color: color-mix(in srgb, var(--mg-red) 45%, var(--mg-border-muted)) !important;
}

.mg-success-panel {
  background: color-mix(in srgb, var(--mg-success) 10%, var(--mg-paper)) !important;
  border-color: color-mix(in srgb, var(--mg-success) 34%, var(--mg-border)) !important;
}

.mg-sticky-subnav {
  top: 68px;
  z-index: 10;
  background: var(--mg-paper) !important;
  border-bottom: 1px solid var(--mg-border);
}

.mg-bg-default {
  background: var(--mg-bg) !important;
}

.mg-bg-surface {
  background: var(--mg-surface) !important;
}

.mg-brand-badge {
  background: var(--mg-coral-soft) !important;
  color: var(--mg-coral) !important;
}

.mg-success-text {
  color: var(--mg-success) !important;
}

.mg-accent-border {
  border-color: var(--mg-coral) !important;
}

.mg-agent-icon {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-color: var(--mg-border) !important;
}

.mg-agent-icon-sm {
  top: -20px;
  right: -20px;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-color: var(--mg-border) !important;
}

/* ── Profile cards in directory ────────────────────────────────────────── */

.profile-card {
  cursor: pointer;
}

.profile-card:hover {
  border-color: var(--mg-coral) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(230, 57, 70, 0.1);
}

.profile-card:hover .directory-lanes {
  color: var(--mg-coral) !important;
}

.profile-card-featured {
  border-color: var(--mg-coral) !important;
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.3);
}

.profile-card .badge-muted {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.25em 0.6em;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* ── Lane selector ─────────────────────────────────────────────────────── */

/* Ultra profile branding (scoped to profile content only) */
body.profile-ultra {
  background: var(--profile-bg, var(--mg-bg));
  color: var(--profile-text, var(--mg-text));
}

body.profile-ultra .profile-branding-scope {
  --mg-bg: var(--profile-bg, var(--mg-paper));
  --mg-surface: var(--profile-form-bg, var(--mg-paper));
  --mg-surface-raised: var(--profile-form-bg, var(--mg-paper));
  --mg-text: var(--profile-text, var(--mg-ink));
  --profile-accent-solid: var(--profile-accent, #ff5a4f);
  --profile-accent-fill: var(--profile-accent, linear-gradient(135deg, #e63946 0%, #ff5a4f 100%));
  --profile-border: color-mix(in srgb, var(--mg-text) 24%, transparent);
  --profile-border-strong: color-mix(in srgb, var(--mg-text) 40%, transparent);
  --profile-accent-soft: color-mix(in srgb, var(--profile-accent-solid) 14%, transparent);
  --profile-accent-shadow: color-mix(in srgb, var(--profile-accent-solid) 28%, transparent);
  --mg-border: var(--profile-border);
  --mg-border-subtle: var(--profile-border);
  --mg-text-secondary: color-mix(in srgb, var(--mg-text) 78%, transparent);
  --mg-text-muted: color-mix(in srgb, var(--mg-text) 62%, transparent);
  --mg-text-tertiary: color-mix(in srgb, var(--mg-text) 52%, transparent);
  --mg-coral: var(--profile-accent-solid);
  --mg-red: var(--profile-accent-solid);
  --mg-coral-soft: var(--profile-accent-soft);
  --mg-coral-glow: var(--profile-accent-shadow);
  background: var(--mg-bg);
  color: var(--mg-text);
  min-height: 100%;
}

body.profile-ultra .profile-branding-scope .btn-coral {
  background: var(--profile-accent-fill);
  color: var(--mg-paper) !important;
  border-color: var(--profile-accent-solid);
}

body.profile-ultra .profile-branding-scope .btn-coral:hover {
  color: var(--mg-paper) !important;
  box-shadow: 0 8px 24px var(--profile-accent-shadow, var(--mg-coral-glow));
}

body.profile-ultra .profile-branding-scope .text-coral {
  color: var(--profile-accent-text, var(--profile-accent-solid, var(--mg-coral))) !important;
}

body.profile-ultra .profile-branding-scope .btn-ghost:hover {
  border-color: var(--profile-accent-solid);
  background: var(--profile-accent-soft);
}

body.profile-ultra .profile-branding-scope .mg-bg-surface,
body.profile-ultra .profile-branding-scope .mg-bg-surface .lane-link-card {
  background: var(--mg-surface) !important;
  border-color: var(--profile-border) !important;
  color: var(--mg-text);
}

body.profile-ultra .profile-branding-scope .mg-bg-surface .lane-link-card:hover {
  border-color: var(--profile-accent-solid) !important;
  background:
    linear-gradient(var(--profile-accent-soft), var(--profile-accent-soft)),
    var(--mg-surface) !important;
}

body.profile-ultra .profile-branding-scope .profile-header-avatar,
body.profile-ultra .profile-branding-scope .border {
  border-color: var(--profile-border-strong) !important;
}

body.profile-ultra .profile-branding-scope .border-start,
body.profile-ultra .profile-branding-scope .lane-public-divider,
body.profile-ultra .profile-branding-scope .lane-public-form-col,
body.profile-ultra .profile-branding-scope .profile-header-row-split .profile-header-details {
  border-color: var(--profile-border) !important;
}

body.profile-ultra .profile-branding-scope .text-secondary-custom,
body.profile-ultra .profile-branding-scope .profile-header-bio,
body.profile-ultra .profile-branding-scope .lane-public-section-body,
body.profile-ultra .profile-branding-scope .form-label {
  color: var(--mg-text-secondary) !important;
}

body.profile-ultra .profile-branding-scope .text-muted-custom,
body.profile-ultra .profile-branding-scope .profile-header-entity,
body.profile-ultra .profile-branding-scope .profile-header-avatar-placeholder i,
body.profile-ultra .profile-branding-scope .lane-link-card .bi-arrow-right-circle,
body.profile-ultra .profile-branding-scope small {
  color: var(--mg-text-muted) !important;
}

body.profile-ultra .profile-branding-scope .form-control,
body.profile-ultra .profile-branding-scope .form-select {
  background: var(--mg-surface) !important;
  border-color: var(--profile-border) !important;
  color: var(--mg-text) !important;
}

body.profile-ultra .profile-branding-scope .form-control::placeholder {
  color: var(--mg-text-tertiary) !important;
}

body.profile-ultra .profile-branding-scope .form-control:focus,
body.profile-ultra .profile-branding-scope .form-select:focus,
body.profile-ultra .profile-branding-scope .form-check-input:focus {
  border-color: var(--profile-accent-solid) !important;
  box-shadow: 0 0 0 3px var(--profile-accent-shadow) !important;
}

body.profile-ultra .profile-branding-scope .badge-tag {
  color: var(--mg-text-tertiary);
  background: color-mix(in srgb, var(--mg-text-tertiary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--mg-text-tertiary) 38%, transparent);
}

body.profile-ultra .profile-branding-scope .profile-delivery-note {
  color: var(--mg-text-tertiary) !important;
}

body.profile-ultra .profile-branding-scope .profile-delivery-note strong {
  color: inherit;
  font-weight: 600;
}

/* ── Badges ────────────────────────────────────────────────────────────── */

.badge-red {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  background: var(--mg-coral-soft);
  color: var(--mg-red);
  border: 1px solid color-mix(in srgb, var(--mg-coral) 45%, var(--mg-paper));
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.3em 0.65em;
  border-radius: 5px;
}

.badge-tag {
  background: rgba(96, 165, 250, 0.1);
  color: var(--mg-info);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.25em 0.6em;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.badge-success-soft {
  background: rgba(52, 211, 153, 0.12);
  color: var(--mg-success);
}

.badge-danger-soft {
  background: rgba(230, 57, 70, 0.12);
  color: var(--mg-coral);
}

.badge-warning-soft {
  background: rgba(245, 158, 11, 0.12);
  color: var(--mg-warning);
}

.badge-muted {
  background: rgba(138, 146, 166, 0.12);
  color: var(--mg-text-secondary);
}

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-mg {
  --bs-table-bg: transparent;
  --bs-table-color: var(--mg-text);
  --bs-table-hover-bg: var(--mg-coral-soft);
  border-color: var(--mg-border);
}

.table-mg thead th {
  border-bottom-color: var(--mg-border);
  color: var(--mg-text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-mg td {
  border-color: var(--mg-border-subtle);
  vertical-align: middle;
  padding: 0.75rem;
}

.cursor-pointer { cursor: pointer; }
.cursor-pointer:hover { background: var(--mg-coral-soft); }

/* ── Forms ─────────────────────────────────────────────────────────────── */

.form-control,
.form-select {
  background-color: var(--mg-surface) !important;
  border: 1px solid var(--mg-border) !important;
  color: var(--mg-text) !important;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--mg-coral) !important;
  box-shadow: 0 0 0 3px var(--mg-coral-glow) !important;
}

.form-control::placeholder {
  color: var(--mg-text-muted) !important;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--mg-text-secondary);
  margin-bottom: 0.35rem;
}

/* ── Code / Mono ───────────────────────────────────────────────────────── */

code {
  color: var(--mg-text-muted);
  background: color-mix(in srgb, var(--mg-border-muted) 35%, var(--mg-paper));
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.88em;
}

pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  word-wrap: break-word;
}

.terminal-block {
  background: var(--mg-paper) !important;
  border: 1px solid var(--mg-border) !important;
  border-radius: 8px;
  padding: 1.25rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

.terminal-block .prompt { color: var(--mg-red); }
.terminal-block .output { color: var(--mg-text-secondary); }

.terminal-block.bg-light {
  background: var(--bs-light) !important;
}

.terminal-block.border-danger {
  border-color: var(--bs-danger) !important;
}

.terminal-block.fs-6,
.terminal-block.fs-6 pre,
.terminal-block.fs-6 code {
  font-size: 1rem;
}

/* ── Accordion (FAQ) ──────────────────────────────────────────────────── */

.accordion-item {
  background: var(--mg-paper) !important;
  border: 1px solid var(--mg-border) !important;
  border-radius: 10px !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.accordion-button {
  background: var(--mg-paper) !important;
  color: var(--mg-text) !important;
  font-weight: 500;
  box-shadow: none !important;
}

.accordion-button::after { filter: invert(0.7); }
.accordion-button:not(.collapsed) { background: var(--mg-surface-raised) !important; }

#pricingFaq .accordion-button,
#pricingFaq .accordion-button:not(.collapsed),
.mg-faq-accordion .accordion-button,
.mg-faq-accordion .accordion-button:not(.collapsed) {
  background-color: var(--bs-light) !important;
}

.accordion-body {
  color: var(--mg-text-secondary);
  padding: 1rem 1.25rem;
}

/* ── Alerts ────────────────────────────────────────────────────────────── */

.alert-coral {
  background: var(--mg-coral-soft);
  border: 1px solid rgba(230, 57, 70, 0.25);
  color: var(--mg-coral);
  border-radius: 10px;
}


/* ── Feature grid ──────────────────────────────────────────────────────── */

.hero-gradient-top {
  background-color: var(--mg-paper);
}

section.sticky-top {
  background: var(--mg-paper) !important;
  border-bottom: 1px solid var(--mg-border) !important;
}

.mg-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--mg-coral) 50%, var(--mg-paper));
  border-radius: 999px;
  background: var(--mg-coral-soft);
  color: var(--mg-red);
  font-size: .85rem;
}

.mg-hero-proof-pill {
  background: var(--bs-light) !important;
  border: 1px solid var(--mg-border-muted) !important;
  color: var(--mg-text-secondary) !important;
}

.mg-hero-rail {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mg-hero-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 76px;
  margin-right: 1rem;
  margin-left: 1rem;
  padding: .8rem;
  border: 2px solid var(--mg-border);
  border-radius: 10px;
  background: var(--mg-paper);
  color: var(--mg-text);
  text-decoration: none;
  text-align: center;
  box-shadow: var(--bs-box-shadow-sm);
}

.mg-hero-mini-card i {
  color: var(--mg-red);
  font-size: 1.85rem;
  line-height: 1;
}

.mg-hero-rail-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-right: 1rem;
  margin-left: 1rem;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--mg-paper);
  color: var(--mg-text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
}

.mg-hero-rail-heading i {
  font-size: 1rem;
  line-height: 1;
}

.mg-hero-idea-heading {
  color: var(--mg-text-tertiary);
  border-color: var(--mg-border-muted);
  border-style: dashed;
}

.mg-hero-validated-heading {
  color: var(--mg-success);
  border-color: var(--mg-success);
  background: color-mix(in srgb, var(--mg-success) 12%, var(--mg-paper));
}

.mg-hero-mini-card span {
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 700;
}

.mg-hero-mini-card small {
  color: var(--mg-text-muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.mg-hero-idea-mini {
  border-style: dashed;
  border-color: var(--mg-border-muted);
  background: var(--mg-paper);
  color: var(--mg-text-tertiary);
  box-shadow: none;
}

.mg-hero-idea-mini i,
.mg-hero-idea-mini small {
  color: var(--mg-text-tertiary);
}

.mg-hero-idea-mini span {
  color: var(--mg-text-muted);
  font-weight: 600;
}

.mg-hero-offer-mini {
  border-color: color-mix(in srgb, var(--mg-red) 45%, var(--mg-border-muted));
  background: color-mix(in srgb, var(--mg-coral-soft) 45%, var(--mg-paper));
  color: var(--mg-red-dark);
}

.mg-offer-tint {
  border-color: color-mix(in srgb, var(--mg-red) 45%, var(--mg-border-muted)) !important;
  background: color-mix(in srgb, var(--mg-coral-soft) 45%, var(--mg-paper)) !important;
}

.mg-offer-border-soft {
  border-color: color-mix(in srgb, var(--mg-red) 20%, var(--mg-border-muted)) !important;
}

.mg-hero-offer-mini i {
  color: var(--mg-red);
}

.mg-hero-offer-mini span {
  color: var(--mg-text-muted);
}

.mg-hero-offer-mini strong {
  color: var(--mg-red-dark);
  font-size: inherit;
  line-height: 1;
}

.mg-hero-offer-mini small strong {
  font-weight: 800;
}

.mg-hero-offer-mini:hover,
.mg-hero-offer-mini:focus {
  color: var(--mg-red-dark);
  background: color-mix(in srgb, var(--mg-coral-soft) 60%, var(--mg-paper));
  border-color: color-mix(in srgb, var(--mg-red) 55%, var(--mg-border-muted));
}

.mg-hero-mobile-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.mg-hero-mobile-column {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mg-hero-mobile-column .mg-hero-mini-card {
  min-height: 72px;
}

@media (max-width: 420px) {
  .mg-hero-mobile-compare {
    grid-template-columns: 1fr;
  }
}

.mg-product-flow {
  background: var(--mg-paper);
}

.mg-flow-card {
  border-radius: 8px;
}

.mg-flow-card-title {
  color: var(--mg-red);
}

.mg-publish-active:hover,
.mg-publish-active:focus {
  background: var(--mg-coral-soft);
  border-color: var(--mg-red);
  color: var(--mg-red);
}

.mg-how-step-heading h3 {
  color: var(--mg-red);
}

.mg-signal-strong {
  background: var(--mg-accent);
}

.mg-supported-icons {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: center;
}

.mg-supported-icons span {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
}

.mg-supported-icons span:has(img + img) {
  padding-top: 10px;
}

.mg-supported-icons img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--mg-red) 20%, var(--mg-border-muted));
  border-radius: 8px;
  background: var(--mg-paper);
  box-shadow: var(--bs-box-shadow-sm);
}

.mg-supported-icons span img + img {
  position: absolute;
  width: 36px;
  height: 36px;
  top: -10px;
  right: 4px;
  border-radius: 4px;
}

@media (max-width: 575.98px) {
  .mg-supported-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mg-offer-marquee {
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  /* Room for pill box-shadows (overflow-x: hidden clips vertical bleed too). */
  padding: 0.35rem 0 0.85rem;
}

.mg-offer-marquee-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  padding: 0.35rem 1rem;
  animation: mg-offer-marquee 42s linear infinite;
}

.mg-offer-marquee:hover .mg-offer-marquee-track,
.mg-offer-marquee:focus-within .mg-offer-marquee-track {
  animation-play-state: paused;
}

.mg-offer-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  border: 1px solid var(--mg-red);
  border-radius: 999px;
  background: var(--mg-surface);
  color: var(--mg-text);
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--bs-box-shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.mg-offer-pill:hover,
.mg-offer-pill:focus {
  background: var(--mg-coral-soft);
  border-color: var(--mg-red);
  color: var(--mg-text);
  transform: translateY(-1px);
  box-shadow: var(--bs-box-shadow);
}

.mg-offer-pill strong {
  color: var(--mg-red);
}

.mg-featured-user-card {
  background: var(--mg-paper);
  border-color: var(--mg-border-muted);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

a.mg-featured-user-link:hover .mg-featured-user-card,
a.mg-featured-user-link:focus-visible .mg-featured-user-card {
  border-color: var(--mg-red) !important;
  transform: translateY(-1px);
  box-shadow: var(--bs-box-shadow);
}

.mg-featured-user-card-avatar {
  border: 2px solid var(--mg-border);
  object-fit: cover;
  flex-shrink: 0;
}

.mg-featured-user-card-avatar-fallback {
  font-size: 2.75rem;
  line-height: 1;
  color: var(--mg-text-muted);
  flex-shrink: 0;
}

.mg-featured-user-card-name {
  font-size: 0.92rem;
}

.mg-featured-user-card-type {
  font-size: 0.74rem;
}

.mg-featured-user-card-bio {
  font-size: 0.86rem;
  line-height: 1.5;
}

.mg-featured-user-card-offer {
  font-size: 0.72rem;
  padding: 0.25em 0.55em;
}

.mg-featured-user-card-offer strong {
  color: var(--mg-red);
}

@keyframes mg-offer-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-offer-marquee {
    overflow-x: auto;
  }

  .mg-offer-marquee-track {
    animation: none;
  }
}

.mg-final-cta {
  background: linear-gradient(135deg, var(--mg-red) 0%, var(--mg-coral) 100%);
  border-top: none;
}

.mg-final-cta h2,
.mg-final-cta-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--mg-paper);
}

.mg-final-cta-eyebrow {
  color: var(--mg-paper) !important;
  letter-spacing: 0.04em;
}

.mg-final-cta-subhead {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.mg-final-cta .btn-light,
.mg-final-cta .btn-outline-light {
  padding: 0.85rem 2.2rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.mg-final-cta .btn-light {
  background: var(--mg-paper);
  border-color: var(--mg-paper);
  color: var(--mg-red) !important;
}

.mg-final-cta .btn-light:hover,
.mg-final-cta .btn-light:focus {
  background: var(--bs-light);
  border-color: var(--bs-light);
  color: var(--mg-red) !important;
}

.mg-final-cta .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.78);
  color: var(--mg-paper) !important;
}

.mg-final-cta .btn-outline-light:hover,
.mg-final-cta .btn-outline-light:focus {
  background: var(--mg-paper);
  border-color: var(--mg-paper);
  color: var(--mg-red) !important;
}

.mg-final-cta .badge.rounded-pill.border {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: var(--mg-paper) !important;
}

.mg-final-cta .mg-hero-proof-pill {
  background: var(--mg-coral) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: var(--mg-paper) !important;
}

.mg-final-cta .mg-hero-proof-pill i {
  color: var(--mg-paper) !important;
}

/* ── Pricing ───────────────────────────────────────────────────────────── */

.price-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--mg-text);
  line-height: 1;
}

.price-amount .currency {
  font-size: 1.4rem;
  vertical-align: super;
  color: var(--mg-text-secondary);
  font-weight: 500;
}

.price-amount .period {
  font-size: 1rem;
  color: var(--mg-text-muted);
  font-weight: 400;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--mg-chrome-border) !important;
  background: var(--mg-chrome-bg) !important;
}

footer.footer-powered-only {
  border-top: none !important;
}

.footer-powered-link {
  color: var(--mg-text-muted) !important;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.footer-powered-link .brand-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

body.profile-ultra footer.footer-powered-only {
  background: var(--profile-bg, var(--mg-bg)) !important;
}

body.profile-ultra .footer-powered-link {
  color: color-mix(in srgb, var(--profile-text, var(--mg-text)) 62%, var(--profile-bg, var(--mg-bg))) !important;
}

body.profile-ultra .footer-powered-link:hover {
  color: var(--profile-accent-text, var(--profile-accent, var(--mg-coral))) !important;
}

footer a {
  color: var(--mg-chrome-muted) !important;
  text-decoration: none;
}

footer h5,
footer small {
  color: var(--mg-chrome-muted) !important;
}

footer .footer-brand {
  color: var(--mg-chrome-text) !important;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

footer .footer-brand .brand-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

footer a:hover {
  color: var(--mg-coral) !important;
}

footer .hero-readable-muted {
  color: var(--mg-chrome-muted) !important;
}

footer .text-muted-custom {
  color: var(--mg-chrome-muted) !important;
}

footer a.footer-cta {
  color: var(--mg-paper) !important;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.2;
}

footer a.footer-cta:hover {
  color: var(--mg-paper) !important;
}

/* ── Overflow guard ────────────────────────────────────────────────────── */

html, body { overflow-x: hidden; }

.terminal-block { overflow-x: auto; }

.table-mg { table-layout: auto; }

/* Ensure cards with tables scroll instead of pushing the viewport */
.card > .table-responsive,
.card > table { overflow-x: auto; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .price-amount { font-size: 2.4rem; }
  .terminal-block { font-size: 0.75rem; }
  .terminal-block.fs-6,
  .terminal-block.fs-6 pre,
  .terminal-block.fs-6 code {
    font-size: 0.9375rem;
  }
  .terminal-block pre { white-space: pre-wrap; word-break: break-all; }
}

/* ── Input groups (search, file uploads) ───────────────────────────────── */

.input-group {
  display: flex;
  width: 100%;
}

.input-group .form-control {
  flex: 1;
}

/* Button on the right (like search) */
.input-group .form-control + .btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  white-space: nowrap;
}

.input-group .form-control:has(+ .btn) {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Button on the left (like file upload) */
.input-group .btn + .form-control {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.input-group .btn:has(+ .form-control) {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  white-space: nowrap;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--mg-bg); }
::-webkit-scrollbar-thumb { background: var(--mg-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--mg-text-muted); }

/* Pricing revenue table */
.revenue-grid .col-md-4 {
  display: flex;
}

.revenue-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 1rem;
  background: var(--mg-surface);
  border: 1px solid var(--mg-border);
  border-radius: 8px;
}

.revenue-title {
  color: var(--mg-red);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.revenue-lines {
  display: grid;
  gap: 0.65rem;
}

.revenue-lines div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--mg-border);
  color: var(--mg-text-secondary);
  font-size: 0.9rem;
}

.revenue-lines strong {
  color: var(--mg-text);
}

/* Blog article body */
.blog-body {
  color: var(--mg-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.blog-body h2,
.blog-body h3 {
  color: var(--mg-text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-body p,
.blog-body ul,
.blog-body ol {
  margin-bottom: 1.1rem;
}

.blog-body a {
  color: var(--mg-coral);
}

.blog-body code {
  color: var(--mg-text);
  background: var(--mg-surface);
  border: 1px solid var(--mg-border);
  border-radius: 4px;
  padding: 0.12rem 0.3rem;
}

/* ── Public profile header ───────────────────────────────────────────────── */

.profile-header-bio {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.profile-header-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.profile-header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
}

.profile-header-social-btn {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.profile-header-avatar,
.profile-header-avatar-placeholder {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 992px) {
  .profile-header-row-split {
    --bs-gutter-x: 0;
    display: grid !important;
    grid-template-columns: minmax(11.5rem, 13.5rem) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
  }

  .profile-header-row-split > .profile-header-identity,
  .profile-header-row-split > .profile-header-details {
    flex: none;
    width: auto;
    max-width: none;
    min-height: 100%;
    align-self: stretch;
  }

  .profile-header-identity {
    padding-right: 2rem;
  }

  .profile-header-row-split .profile-header-details {
    border-left: 1px solid var(--mg-border);
    padding-left: 2rem;
  }

  .profile-header-bio {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .profile-header-tags {
    justify-content: flex-start;
  }

  .profile-header-links {
    justify-content: flex-start;
  }
}

/* ── Public offer page (lane detail) ─────────────────────────────────────── */

.lane-public-layout {
  max-width: 720px;
}

.lane-public-offer-title {
  font-size: 1.15rem;
  line-height: 1.35;
}

.lane-public-offer-card {
  overflow: visible;
}

.lane-public-content {
  --lane-content-pad-start: 1.15rem;
  --lane-content-pad-end: 1.15rem;
  padding: 0 var(--lane-content-pad-end) 1rem var(--lane-content-pad-start);
}

.lane-public-form-col {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--mg-border);
  display: flex;
  flex-direction: column;
}

.lane-public-section-body {
  color: var(--mg-text-secondary);
  white-space: pre-wrap;
  line-height: 1.55;
}

.lane-public-divider {
  margin: 1.25rem calc(-1 * var(--lane-content-pad-end)) 1.25rem calc(-1 * var(--lane-content-pad-start));
  border: 0;
  border-top: 1px solid var(--mg-border);
  opacity: 1;
}

.lane-public-detail-block + .lane-public-detail-block {
  margin-top: 1.35rem;
}

.lane-public-detail-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mg-text);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.lane-public-form .mb-3 {
  margin-bottom: 1.15rem !important;
}

.lane-public-form textarea.form-control {
  min-height: 6.5rem;
}

@media (min-width: 992px) {
  .lane-public-layout {
    max-width: 1320px;
  }

  .lane-public-content {
    --lane-content-pad-start: 1.35rem;
    --lane-content-pad-end: 1.5rem;
    padding: 0 var(--lane-content-pad-end) 1.15rem var(--lane-content-pad-start);
  }

  .lane-public-form-col {
    padding: 1.15rem 1.35rem 1.15rem 1.5rem;
    border-top: 0;
    border-left: 1px solid var(--mg-border);
    min-height: 100%;
  }

  .lane-public-checkout {
    flex: 1;
  }

  .lane-public-offer-title {
    font-size: 1.75rem;
  }

  .lane-public-section-body {
    font-size: 1.02rem;
  }

  .lane-public-divider {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .lane-public-detail-label {
    font-size: 1.2rem;
  }

  .lane-public-detail-block + .lane-public-detail-block {
    margin-top: 1.5rem;
  }

  .lane-public-checkout {
    position: sticky;
    top: 88px;
    align-self: flex-start;
  }

  .lane-public-form .form-label {
    font-size: 1rem;
    margin-bottom: 0.45rem;
  }

  .lane-public-form .form-control {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .lane-public-form textarea.form-control {
    min-height: 7.5rem;
  }

  .lane-public-form .profile-delivery-note {
    font-size: 0.88rem !important;
    line-height: 1.5;
  }

  .lane-public-submit-btn {
    padding: 1rem 1.25rem !important;
    font-size: 1.1rem;
    font-weight: 600;
  }
}

@media (min-width: 1200px) {
  .lane-public-offer-title {
    font-size: 1.9rem;
  }

  .lane-public-detail-label {
    font-size: 1.28rem;
  }

  .lane-public-form textarea.form-control {
    min-height: 8rem;
  }

  .lane-public-submit-btn {
    padding: 1.05rem 1.35rem !important;
    font-size: 1.15rem;
  }
}
