/* Author: Daniel Hallman */
/* GoHighLevel-Inspired Visual Theme & Moosh Works Pop Diagram Harmony */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;600;700&display=swap');

:root {
  /* GHL & Moosh Pop Core Palette */
  --sheet: #e8f1fb;
  --fill: #ffffff;
  --ink: #0b1426;
  --mute: #475569;
  --rule: #cbd5e1;
  --stamp: #155eef;
  --stamp-hover: #004eeb;
  --grid: rgba(21, 94, 239, 0.065);

  /* Extended GHL Brand & Diagram Accents */
  --ghl-navy: #0b1426;
  --ghl-midnight: #060d1a;
  --ghl-blue: #155eef;
  --ghl-blue-soft: #eff6ff;
  --ghl-blue-border: #93c5fd;
  --ghl-cyan: #25b7f0;
  --ghl-cyan-soft: #f0f9ff;
  --ghl-mint: #10b981;
  --ghl-mint-soft: #ecfdf5;
  --ghl-lime: #8ed640;
  --ghl-lime-soft: #f3fee0;
  --ghl-amber: #f59e0b;
  --ghl-amber-soft: #fefce8;
  --ghl-orange: #f97316;
  --ghl-orange-soft: #fff7ed;
}

html, body {
  background-color: var(--sheet);
  background-image:
    radial-gradient(rgba(21, 94, 239, 0.12) 1.25px, transparent 1.25px),
    radial-gradient(rgba(16, 185, 129, 0.1) 1.25px, var(--sheet) 1.25px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.025em;
  color: var(--ghl-navy);
}

.container {
  max-width: 920px;
  margin: 28px auto 72px;
  padding: 0 0 64px;
  background: var(--fill);
  border: 2.5px solid var(--ghl-navy);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ghl-navy);
  overflow: hidden;
}

.container::before {
  content: "";
  display: block;
  height: 12px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #155eef 0% 22%,
    #25b7f0 22% 45%,
    #10b981 45% 68%,
    #8ed640 68% 85%,
    #f59e0b 85% 100%
  );
  border-bottom: 2.5px solid var(--ghl-navy);
}

.container > * {
  margin-left: 44px;
  margin-right: 44px;
}

.container > .ghl-top-ribbon,
.container > .q-hero-banner {
  margin-left: 0;
  margin-right: 0;
}

/* Top Navigation Bar for GHL Pages */
.ghl-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 44px;
  margin: 0 !important;
  background: #f8fafc;
  border-bottom: 2px solid var(--rule);
  font-family: "Spline Sans Mono", monospace;
  font-size: 12.5px;
}

.ghl-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--mute);
  font-weight: 600;
}

.ghl-breadcrumbs a {
  color: var(--ghl-blue);
  text-decoration: none;
}

.ghl-breadcrumbs a:hover {
  text-decoration: underline;
}

.ghl-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ghl-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--ghl-navy);
  background: #fff;
  color: var(--ghl-navy);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ghl-navy);
  transition: transform 0.12s ease, background 0.12s ease;
}

.ghl-nav-pill:hover {
  background: var(--ghl-blue-soft);
  text-decoration: none;
  transform: translate(-1px, -1px);
}

.ghl-nav-pill.primary {
  background: var(--ghl-blue);
  color: #fff;
}

.ghl-nav-pill.primary:hover {
  background: var(--ghl-stamp-hover, #004eeb);
}

/* Question Page Hero Banner */
.q-hero-banner {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border-bottom: 2px solid var(--ghl-navy);
  padding: 32px 44px 28px;
  margin-bottom: 32px !important;
}

.q-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.q-pillar-badge {
  display: inline-block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  border: 1.8px solid var(--ghl-navy);
  box-shadow: 2px 2px 0 var(--ghl-navy);
}

.q-keyword-badge {
  display: inline-block;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ghl-lime-soft);
  color: #1f4d06;
  border: 1.5px solid var(--ghl-navy);
}

.q-read-time {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  color: var(--mute);
}

.q-hero-banner h1 {
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.18;
  margin: 0 0 14px;
  color: var(--ghl-navy);
}

.q-tldr {
  font-size: 18px;
  line-height: 1.55;
  color: #1e293b;
  margin: 0;
  font-weight: 500;
}

/* Short Answer Callout Grid */
.q-answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
  margin-bottom: 28px;
}

.q-answer-box {
  border: 2px solid var(--ghl-navy);
  border-radius: 14px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ghl-navy);
}

.q-answer-box.problem {
  background: var(--ghl-orange-soft);
  border-top: 5px solid var(--ghl-orange);
}

.q-answer-box.solution {
  background: var(--ghl-mint-soft);
  border-top: 5px solid var(--ghl-mint);
}

.q-box-label {
  display: inline-block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--ghl-navy);
  background: #fff;
  margin-bottom: 10px;
}

.q-answer-box p {
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0;
  color: var(--ghl-navy);
}

.q-steps-card {
  background: #f8fafc;
  border: 2px solid var(--ghl-navy);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 3px 3px 0 var(--ghl-navy);
}

.q-steps-card h2 {
  font-size: 19px;
  margin: 0 0 12px;
  padding: 0;
  border: none;
}

.q-steps-card ol {
  margin: 0;
  padding-left: 22px;
}

.q-steps-card li {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.q-steps-card li:last-child {
  margin-bottom: 0;
}

/* Interactive Agent Prompt / MCP Codeblock Toggle Component */
/* Uses CSS :has() for state-based container styling + @supports fallback */
.code-toggle-card {
  --toggle-accent: #155eef;
  --toggle-header-bg: #0f172a;
  --toggle-badge-bg: #8ed640;
  --toggle-badge-fg: #0b1426;

  border: 2.5px solid var(--ghl-navy);
  border-radius: 14px;
  background: #0b1426;
  color: #f8fafc;
  margin-top: 28px;
  margin-bottom: 32px;
  box-shadow: 5px 5px 0 var(--ghl-navy);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

/* Child-state styling when MCP tab is active */
.code-toggle-card:has([data-code-tab="mcp"][aria-expanded="true"]) {
  --toggle-accent: #25b7f0;
  --toggle-header-bg: #091e3a;
  --toggle-badge-bg: #25b7f0;
  --toggle-badge-fg: #06152d;
}

@supports not selector(:has(*)) {
  .code-toggle-card.is-mcp-mode {
    --toggle-accent: #25b7f0;
    --toggle-header-bg: #091e3a;
    --toggle-badge-bg: #25b7f0;
    --toggle-badge-fg: #06152d;
  }
}

.code-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: var(--toggle-header-bg);
  border-bottom: 2px solid #1e293b;
}

.code-tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-tab-btn {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.code-tab-btn:hover {
  border-color: #94a3b8;
  color: #ffffff;
}

.code-tab-btn[aria-expanded="true"] {
  background: var(--toggle-badge-bg);
  color: var(--toggle-badge-fg);
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.code-copy-btn {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid #fff;
  background: var(--ghl-blue);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  width: auto;
}

.code-copy-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.code-copy-btn.copied {
  background: var(--ghl-mint);
  border-color: #a7f3d0;
  color: #06281e;
}

/* Important: apply padding/styles to nested child wrapper inside hidden="until-found" panel */
.code-panel-inner {
  padding: 20px 22px;
  background: #0b1426;
}

.code-panel-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #1e293b;
}

.code-panel-pre {
  margin: 0;
  font-family: "Spline Sans Mono", monospace;
  font-size: 13.5px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* Visual Diagram Showcase Frame */
.q-visual-frame {
  border: 2.5px solid var(--ghl-navy);
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px;
  margin-top: 28px;
  margin-bottom: 32px;
  box-shadow: 4px 4px 0 var(--ghl-navy);
}

.q-visual-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1.5px solid var(--rule);
}

.q-visual-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 6px 0;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  color: var(--mute);
}

/* Similar Questions Grid (Hacking with Swift style) */
.q-similar-section {
  margin-top: 36px;
  margin-bottom: 36px;
}

.q-similar-section h2 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 8px;
}

.q-similar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.q-similar-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  background: #ffffff;
  border: 2px solid var(--ghl-navy);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ghl-navy);
  text-decoration: none;
  color: var(--ghl-navy);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.q-similar-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--ghl-blue);
  background: var(--ghl-blue-soft);
  text-decoration: none;
}

.q-similar-card .sim-cat {
  font-family: "Spline Sans Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ghl-blue);
  margin-bottom: 6px;
}

.q-similar-card .sim-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--ghl-navy);
  margin-bottom: 10px;
}

.q-similar-card .sim-arrow {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ghl-blue);
}

/* Product & Community CTA Card */
.q-product-cta {
  background: linear-gradient(135deg, #0b1426 0%, #102447 100%);
  color: #ffffff;
  border: 2.5px solid var(--ghl-navy);
  border-radius: 16px;
  padding: 28px 30px;
  margin-top: 36px;
  margin-bottom: 24px;
  box-shadow: 5px 5px 0 var(--ghl-blue);
}

.q-product-cta .cta-eyebrow {
  display: inline-block;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ghl-lime);
  color: #0b1426;
  margin-bottom: 12px;
}

.q-product-cta h2 {
  color: #ffffff;
  font-size: 24px;
  border: none;
  margin: 0 0 10px;
  padding: 0;
}

.q-product-cta p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 20px;
}

.q-cta-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.q-cta-btn {
  display: inline-block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.q-cta-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.q-cta-btn.primary {
  background: var(--ghl-lime);
  color: #0b1426;
  border: 2px solid #ffffff;
}

.q-cta-btn.secondary {
  background: var(--ghl-blue);
  color: #ffffff;
  border: 2px solid #93c5fd;
}

.q-cta-btn.outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1.5px solid #64748b;
}

/* Questions Index Hub Directory Cards */
.q-index-search-bar {
  display: flex;
  gap: 12px;
  margin: 20px 0 18px;
}

.q-index-search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  border: 2px solid var(--ghl-navy);
  border-radius: 12px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ghl-navy);
  margin-bottom: 0;
}

.q-index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
  margin-bottom: 36px;
}

.q-index-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 2px solid var(--ghl-navy);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--ghl-navy);
  text-decoration: none;
  color: var(--ghl-navy);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.q-index-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ghl-blue);
  text-decoration: none;
}

.q-index-thumb {
  width: 100%;
  height: 175px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 2px solid var(--ghl-navy);
  background: #eff6ff;
}

.q-index-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.q-index-body h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 8px 0 8px;
  color: var(--ghl-navy);
}

.q-index-body p {
  font-size: 14px;
  line-height: 1.48;
  color: var(--mute);
  margin: 0 0 12px;
}

.q-index-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ghl-blue);
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
}

/* Responsive Overrides */
@media (max-width: 720px) {
  .container {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .container > * {
    margin-left: 20px;
    margin-right: 20px;
  }
  .ghl-nav-bar,
  .q-hero-banner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .q-answer-grid,
  .q-similar-grid,
  .q-index-grid {
    grid-template-columns: 1fr;
  }
}
