/* Author: Daniel Hallman */
/* GoHighLevel-Inspired Visual Theme & Moosh Works Pop Diagram Harmony */

: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;
}

.ghl-page .title-block {
  margin-top: 24px;
  margin-bottom: 20px;
}

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

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

.q-breadcrumbs:not(.ghl-nav-bar) {
  justify-content: flex-start;
  gap: 8px;
  color: var(--mute);
  font-weight: 600;
}

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

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

.ghl-breadcrumbs a:hover,
.q-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,
.q-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.q-pillar-badge,
.ghl-badge-blue {
  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);
}

.ghl-badge-cyan {
  display: inline-block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1.5px solid var(--ghl-navy);
}

.q-keyword-badge,
.ghl-badge-emerald {
  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: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  border: 2.5px solid var(--ghl-navy);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 28px;
  box-shadow: 4px 4px 0 var(--ghl-navy);
}

.q-steps-header {
  margin-bottom: 16px;
}

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

.q-steps-card ol.q-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.q-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  border: 2px solid var(--ghl-navy);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 2px 2px 0 var(--ghl-navy);
  margin: 0;
}

.q-step-num {
  flex-shrink: 0;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--ghl-blue);
  color: #ffffff;
  border: 1.5px solid var(--ghl-navy);
  margin-top: 2px;
}

.q-step-body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ghl-navy);
}

.q-step-body strong {
  color: #0b1426;
  font-weight: 800;
}

/* Annotated Real GHL Screenshot Cards Inside Step-by-Step Guide */
.q-step-item-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  border: 2px solid var(--ghl-navy);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 3px 3px 0 var(--ghl-navy);
  margin: 0;
}

.q-step-top-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.q-step-screen-frame {
  margin: 4px 0 0;
  border: 2px solid var(--ghl-navy);
  border-radius: 12px;
  background: #0b1426;
  overflow: hidden;
  box-shadow: 3px 3px 0 rgba(11, 20, 38, 0.18);
}

.q-step-screen-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: #0f172a;
  color: #f8fafc;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  border-bottom: 1.5px solid #1e293b;
}

.q-step-screen-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.q-step-screen-frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #0b1426;
}

.q-step-callouts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1.5px solid var(--ghl-navy);
}

.q-callout-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid var(--ghl-navy);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ghl-navy);
}

.q-callout-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  font-weight: 800;
}

/* Scannable Bullet Lists (Replaces Dense Text Blocks) */
.q-bullet-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q-bullet-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.48;
  color: var(--ghl-navy);
  font-weight: 500;
}

.q-answer-box.problem .q-bullet-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fee2e2;
  border: 1.5px solid #dc2626;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.q-answer-box.solution .q-bullet-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d1fae5;
  border: 1.5px solid #059669;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Visual Before/After Impact Bar Graph Card */
.q-graph-card {
  background: #ffffff;
  border: 2.5px solid var(--ghl-navy);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: 4px 4px 0 var(--ghl-navy);
}

.q-graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.q-graph-header h2 {
  font-size: 20px;
  margin: 4px 0 0;
  border: none;
  padding: 0;
}

.q-graph-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.q-graph-metric {
  border: 1.8px solid var(--ghl-navy);
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
}

.q-graph-metric-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ghl-navy);
  margin-bottom: 10px;
}

.q-bar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.q-bar-label-line {
  display: flex;
  justify-content: space-between;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.q-bar-track {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  border: 1.5px solid var(--ghl-navy);
  overflow: hidden;
}

.q-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.q-bar-fill.bad {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.q-bar-fill.good {
  background: linear-gradient(90deg, #10b981, #8ed640);
}

/* Responsive Quick-Reference Click Table (modern-web-guidance responsive-table) */
.q-table-section {
  margin-bottom: 28px;
}

.q-table-section h2 {
  font-size: 20px;
  margin: 4px 0 12px;
  border: none;
  padding: 0;
}

.table-wrapper {
  container-type: inline-size;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2.5px solid var(--ghl-navy);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 4px 4px 0 var(--ghl-navy);
}

.table-wrapper:focus-visible {
  outline: 3px solid var(--ghl-blue);
  outline-offset: 2px;
}

.q-click-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  text-align: left;
}

.q-click-table th {
  background: #0b1426;
  color: #ffffff;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 14px;
  border-bottom: 2px solid var(--ghl-navy);
}

.q-click-table td {
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--rule);
  color: var(--ghl-navy);
  vertical-align: top;
  line-height: 1.45;
}

.q-click-table tbody tr:last-child td {
  border-bottom: none;
}

.q-click-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.q-click-path-pill {
  display: inline-block;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ghl-blue-soft);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

@media (max-width: 560px) {
  .q-click-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .q-click-table tr {
    display: block;
    padding: 10px 12px;
    border-bottom: 2px solid var(--ghl-navy);
  }
  .q-click-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 4px;
    border-bottom: 1px dashed var(--rule);
  }
  .q-click-table td:last-child {
    border-bottom: none;
  }
  .q-click-table td::before {
    content: attr(data-label);
    font-family: "Spline Sans Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mute);
    flex-shrink: 0;
  }
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Question Tag Chips & Tag Directory */
.q-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.q-tags-label {
  font-family: "Spline Sans Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mute);
  margin-right: 2px;
}

.q-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.q-tag-chip:hover,
.q-tag-chip.active {
  background: var(--ghl-blue-soft);
  border-color: var(--ghl-blue);
  color: #1d4ed8;
  text-decoration: none;
}

.q-tag-count {
  font-size: 10.5px;
  opacity: 0.75;
}

.q-tag-directory {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: #f8fafc;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
}

/* Interactive Agent Prompt / MCP Codeblock Toggle Component */
/* Uses CSS :has() for state-based container styling + @supports fallback */
.code-toggle-card {
  color-scheme: dark;
  --toggle-accent: #38bdf8;
  --toggle-header-bg: #161b22;
  --toggle-badge-bg: #1f6feb;
  --toggle-badge-fg: #ffffff;

  position: relative;
  border: 2px solid #30363d;
  border-radius: 12px;
  background: #0d1117;
  color: #e6edf3;
  margin-top: 18px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(11, 20, 38, 0.14);
  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: #111927;
  --toggle-badge-bg: #0284c7;
  --toggle-badge-fg: #ffffff;
}

@supports not selector(:has(*)) {
  .code-toggle-card.is-mcp-mode {
    --toggle-accent: #25b7f0;
    --toggle-header-bg: #111927;
    --toggle-badge-bg: #0284c7;
    --toggle-badge-fg: #ffffff;
  }
}

.code-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--toggle-header-bg);
  border-bottom: 1px solid #30363d;
}

.code-tab-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
}

.code-tab-btn {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #8b949e;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.code-tab-btn .tab-dot {
  display: none;
}

.code-tab-btn:hover {
  color: #f0f6fc;
}

.code-tab-btn[aria-expanded="true"] {
  background: var(--toggle-badge-bg);
  color: var(--toggle-badge-fg);
}

.code-copy-wrap {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid #30363d;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.code-copy-btn:hover {
  background: #30363d;
  border-color: #8b949e;
  color: #ffffff;
}

.code-copy-btn .copy-check-svg {
  display: none;
}

.code-copy-btn.copied {
  background: #132f20;
  border-color: #2ea043;
  color: #3fb950;
}

.code-copy-btn.copied .copy-icon-svg {
  display: none;
}

.code-copy-btn.copied .copy-check-svg {
  display: block;
}

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

.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: 11px;
  color: #8b949e;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #21262d;
}

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

.code-panel-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid #21262d;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8b949e;
}

.code-panel-note strong {
  color: #e6edf3;
}

.code-panel-note code {
  color: #79c0ff;
  background: rgba(110, 118, 129, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
}

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

.q-visual-frame.q-poster-frame {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

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

.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);
}

/* Related Questions: Compact 1-Per-Row Question-Only List */
.q-similar-section {
  margin-top: 28px;
  margin-bottom: 28px;
}

.q-similar-section h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--mute);
  margin-top: 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}

.q-similar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.q-similar-item {
  margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
}

.q-similar-item:last-child {
  border-bottom: none;
}

.q-similar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 4px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ghl-navy);
  text-decoration: none;
  transition: color 0.12s ease;
}

.q-similar-link::after {
  content: "→";
  font-family: "Spline Sans Mono", monospace;
  font-size: 13px;
  color: var(--mute);
  flex-shrink: 0;
}

.q-similar-link:hover {
  color: var(--ghl-blue);
  text-decoration: underline;
}

.q-similar-link:hover::after {
  color: var(--ghl-blue);
}

/* Tag Archive Question List */
.q-tag-results-section {
  margin-top: 16px;
  margin-bottom: 32px;
}

.q-tag-question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.q-tag-question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.q-tag-question-row:last-child {
  border-bottom: none;
}

.q-tag-question-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q-tag-question-link {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ghl-navy);
  text-decoration: none;
  line-height: 1.38;
}

.q-tag-question-link:hover {
  color: var(--ghl-blue);
  text-decoration: underline;
}

.q-tag-playbook {
  flex-shrink: 0;
}

/* 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,
.cta-btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.q-cta-btn,
.btn-ghl-primary,
.btn-ghl-secondary,
.btn-ghl-outline {
  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,
.btn-ghl-primary:hover,
.btn-ghl-secondary:hover,
.btn-ghl-outline:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

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

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

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

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

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.filter-btn {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1.5px solid var(--rule);
  background: #ffffff;
  color: var(--ghl-navy);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.filter-btn:hover {
  border-color: var(--ghl-navy);
  background: var(--ghl-blue-soft);
}

.filter-btn.active {
  background: var(--ghl-navy);
  color: #ffffff;
  border-color: var(--ghl-navy);
}

.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;
  padding: 18px 20px;
  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-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

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

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

.q-card-tags {
  margin-top: 8px;
  margin-bottom: 12px;
}

.q-card-cta,
.q-index-footer {
  display: inline-flex;
  align-items: center;
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ghl-blue);
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  text-decoration: none;
}

.q-card-cta:hover {
  text-decoration: underline;
}

.q-index-card-link {
  color: var(--ghl-navy);
  text-decoration: none;
}

.q-index-card-link:hover {
  color: var(--ghl-blue);
  text-decoration: underline;
}

.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;
}

/* 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-breadcrumbs,
  .q-hero-banner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .q-answer-grid,
  .q-graph-grid,
  .q-index-grid {
    grid-template-columns: 1fr;
  }
  .q-tag-question-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .code-toggle-header {
    padding: 6px 8px;
    gap: 6px;
  }
  .code-tab-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
}
