/* ==========================================================================
   Endpoint Pages — Shared styles for /sources/ endpoint documentation pages
   ========================================================================== */

/* Breadcrumbs */
.endpoint-page .breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  opacity: 0.6;
}
.endpoint-page .breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.endpoint-page .breadcrumbs a:hover {
  opacity: 1;
}
.endpoint-page .breadcrumbs .sep {
  margin: 0 0.5rem;
}

/* Hero */
.endpoint-hero {
  padding: 3rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255, 107, 53, 0.02), transparent);
}

.endpoint-hero .page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.endpoint-hero .page-subtitle {
  font-size: 1.125rem;
  line-height: 1.5;
  opacity: 0.8;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.trust-signals {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.trust-signal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

.trust-signal::before {
  content: "\2713";
  color: var(--data);
  font-weight: 700;
}

/* Content sections */
.endpoint-page .content-section {
  padding: 4rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.endpoint-page .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.endpoint-page .section-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.endpoint-page .section-subtitle {
  font-size: 1.125rem;
  opacity: 0.7;
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.5;
}

.endpoint-page .section-text {
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 1rem;
  opacity: 0.85;
}

.endpoint-page .section-text p {
  margin-bottom: 1.25rem;
}

/* Endpoint cards / data tables */
.endpoint-card {
  background: var(--bg-surface, #ffffff);
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.endpoint-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.endpoint-card .endpoint-url {
  background: #0c0c15;
  color: #9CDCFE;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  display: inline-block;
  margin: 0.5rem 0 1rem;
}

.endpoint-card p {
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.endpoint-card .credit-cost {
  font-size: 0.875rem;
  color: var(--data);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Data tables */
.endpoint-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.endpoint-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.endpoint-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: top;
}

.endpoint-table code {
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8125rem;
}

.endpoint-table tr:last-child td {
  border-bottom: none;
}

.endpoint-table tr:hover td {
  background: rgba(0,0,0,0.015);
}

/* Comparison table */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}

.comparison-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  background: var(--bg-surface, #ffffff);
  position: sticky;
  top: 0;
}

.comparison-table th:first-child {
  min-width: 140px;
}

.comparison-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: top;
}

.comparison-table tr:hover td {
  background: rgba(0,0,0,0.015);
}

.comparison-table strong {
  color: var(--accent);
}

/* Code blocks */
.endpoint-page .code-example {
  background: #0c0c15;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) rgba(255,255,255,0.05);
}

.endpoint-page .code-example pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: #eaeaf0;
  /* Keep code lines intact and scroll horizontally instead of wrapping at
     arbitrary characters (which broke curl commands / URLs mid-token). The
     .code-example container already has overflow-x:auto. */
  white-space: pre;
  overflow-x: auto;
}

.endpoint-page .code-example .comment { color: #6A9955; font-style: italic; }
.endpoint-page .code-example .keyword { color: #569CD6; font-weight: 500; }
.endpoint-page .code-example .string { color: #CE9178; }
.endpoint-page .code-example .function { color: #DCDCAA; }
.endpoint-page .code-example .class-name { color: #4EC9B0; }
.endpoint-page .code-example .number { color: #B5CEA8; }
.endpoint-page .code-example .key { color: #9CDCFE; }
.endpoint-page .code-example .flag { color: #DCDCAA; }
.endpoint-page .code-example .operator { color: #D4D4D4; }

.code-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  color: #eaeaf0;
  margin-bottom: 0.75rem;
  display: block;
}

/* Tab navigation */
.endpoint-page .tab-buttons {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 2rem;
  background: var(--bg-subtle, #f0f0f4);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}

.endpoint-page .tab-button {
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #666;
  transition: all 0.15s ease;
  border-radius: 8px;
  white-space: nowrap;
}

.endpoint-page .tab-button:hover {
  color: var(--text-secondary, #444);
}

.endpoint-page .tab-button.active {
  background: var(--bg-surface, #ffffff);
  color: var(--text, #0c0c14);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.endpoint-page .tab-content {
  display: none;
}

.endpoint-page .tab-content.active {
  display: block;
}

/* Use cases */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.use-case {
  background: var(--bg-surface, #ffffff);
  border-radius: 8px;
  padding: 2.5rem;
  border: 1px solid rgba(0,0,0,0.06);
}

.use-case h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.use-case h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.6;
  margin: 1rem 0 0.5rem;
}

.use-case p {
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

/* FAQ */
.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 1.5rem 0;
}

.faq-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.06);
}

.faq-question {
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.4;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  line-height: 1.6;
  opacity: 0.8;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 1rem;
}

/* Related endpoints */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.related-link {
  display: block;
  padding: 1.25rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.related-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.related-link h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.related-link p {
  font-size: 0.8125rem;
  opacity: 0.6;
  line-height: 1.4;
}

/* CTA footer */
.endpoint-cta {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(to top, rgba(255, 107, 53, 0.03), transparent);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.endpoint-cta h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.endpoint-cta p {
  font-size: 1.125rem;
  opacity: 0.7;
  max-width: 36rem;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.endpoint-cta .cta-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.6;
}

.endpoint-cta .cta-links a {
  color: inherit;
}

/* Endpoint overview grid */
.endpoints-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Pipeline / flow visualization */
.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.pipeline-step {
  background: var(--bg-surface, #ffffff);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}

.pipeline-arrow {
  opacity: 0.3;
  font-size: 1.25rem;
}

/* Two-column layout for sections */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Buttons */
.endpoint-page .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-block;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  .endpoint-hero {
    padding: 2rem 1rem 3rem;
  }

  .trust-signals {
    flex-direction: column;
    gap: 0.75rem;
  }

  .endpoint-page .content-section {
    padding: 3rem 0;
  }

  .endpoint-page .section-title {
    font-size: 1.5rem;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .endpoint-card {
    padding: 1.5rem;
  }

  .use-case {
    padding: 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-steps {
    flex-direction: column;
  }

  .pipeline-arrow {
    transform: rotate(90deg);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  .endpoint-table th,
  .endpoint-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .endpoint-page .code-example {
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }
}

/* ==========================================================================
   Mobile horizontal-overflow fixes (audit 2026-06)
   Targets the recurring culprits found across endpoint/product pages:
   nowrap hero CTAs, non-wrapping tab rows, unscrollable data tables, and
   long unbreakable URLs. Component class names are unique, so these are
   intentionally unscoped to cover both theme-template and DB-content pages.
   ========================================================================== */
@media (max-width: 768px) {
  /* CTA buttons (hero + mid-page): long labels like "Start with Starter Plan
     — 7-Day Free Trial" / "$49/mo After 7 Days" have white-space:nowrap and
     were forcing page-wide horizontal scroll. Let them wrap. */
  .hero-ctas .btn,
  .mid-cta .btn,
  .content-section .btn {
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Hero CTAs also stack full-width (better touch targets). */
  .hero-ctas {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .hero-ctas .btn {
    width: 100%;
  }

  /* Tab switchers: wrap instead of overflowing (instagram had an 805px row). */
  .tab-buttons {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Data tables: scroll within their own box rather than stretching the page.
     min-width:0 lets the block fit the viewport while nowrap headers keep
     columns from collapsing, so the content scrolls horizontally inside. */
  .endpoint-table,
  .comparison-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comparison-table-wrapper {
    max-width: 100%;
    min-width: 0;
  }

  /* Code blocks (pre): scroll within their box, never stretch the page. */
  .endpoint-page pre,
  .rest-api-page pre,
  .tab-content pre {
    max-width: 100%;
    overflow-x: auto;
  }

  /* Endpoint routes: keep them on ONE line and scroll, never break mid-path.
     Route boxes (.endpoint-url) become horizontally-scrollable blocks; routes
     inside data tables stay nowrap and ride the table's own horizontal scroll
     (tables are display:block;overflow-x:auto on mobile). This removes the ugly
     character-level line breaks in routes like /api/linkedin/search/users. */
  .endpoint-url {
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .endpoint-table code,
  .comparison-table code,
  .platform-table code,
  .status-table code,
  .pricing-table code {
    white-space: nowrap;
  }
  /* Inline code in prose and URL-bearing card headings: break only as a last
     resort (keep tokens whole where they fit) rather than at every character. */
  .endpoint-page code,
  .rest-api-page code,
  .endpoint-card h1,
  .endpoint-card h2,
  .endpoint-card h3,
  .endpoint-card h4 {
    overflow-wrap: break-word;
  }

  /* Multi-column grids: collapse so items can't force the page wide, and let
     grid/flex children shrink (min-width:0) so wide content inside a card
     (e.g. a data table) becomes the scroll point instead of stretching out. */
  .use-cases-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .use-cases-grid > *,
  .pricing-grid > *,
  .endpoint-card {
    min-width: 0;
  }

  /* Class A (DB-content) pages ship an inline `!important` rule that force-wraps
     code (white-space:pre-wrap + overflow-wrap:anywhere on .code-example pre code
     / .code-block-wrapper pre), which broke curl commands & URLs mid-token. Those
     pages render inside <main class="endpoint-page">, so prefixing the selector
     with `main.` raises specificity above the inline rule and lets us restore
     clean horizontal scrolling without editing each page's stored HTML. */
  main.endpoint-page .code-block-wrapper pre,
  main.endpoint-page .code-example pre,
  main.endpoint-page .code-example pre code {
    white-space: pre !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Body copy / headings: break overlong words at very narrow widths so a
     single long word can't push the page (break-word only breaks when needed). */
  .endpoint-page h1,
  .endpoint-page h2,
  .endpoint-page h3,
  .endpoint-page p,
  .endpoint-page li,
  .rest-api-page h1,
  .rest-api-page h2,
  .rest-api-page h3,
  .rest-api-page p {
    overflow-wrap: break-word;
  }
}

/* ==========================================================================
   Hero conversion components — price banner, social proof, sticky CTA, mid-CTA
   ========================================================================== */

.price-comparison-banner {
  max-width: 36rem;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem 0.875rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: var(--bg-surface, #ffffff);
  font-family: var(--font-mono, ui-monospace, monospace);
  text-align: left;
}

.price-comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.375rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.9375rem;
}

.price-comparison-row:last-of-type {
  border-bottom: 0;
}

.price-comparison-row--highlight {
  border-top: 2px solid var(--accent, #ff6b35);
  margin-top: 0.25rem;
  padding-top: 0.625rem;
  font-weight: 600;
}

.price-comparison-label {
  opacity: 0.75;
}

.price-comparison-row--highlight .price-comparison-label {
  opacity: 1;
}

.price-comparison-value {
  font-weight: 500;
  text-align: right;
}

.price-comparison-row--highlight .price-comparison-value {
  font-weight: 700;
}

.price-comparison-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: var(--accent, #ff6b35);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
}

.price-comparison-footnote {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  opacity: 0.65;
  text-align: center;
}

.hero-social-proof {
  margin: 0 auto 2rem;
  font-size: 0.875rem;
  opacity: 0.7;
  text-align: center;
  max-width: 36rem;
}

.mid-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-surface, #ffffff);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  font-family: var(--font-mono, ui-monospace, monospace);
  transition: transform 0.2s ease;
}

.sticky-cta-bar[hidden] {
  display: none !important;
}

.sticky-cta-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  max-width: 72rem;
  margin: 0 auto;
}

.sticky-cta-bar__text {
  font-size: 0.9375rem;
}

.sticky-cta-bar__btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .price-comparison-banner {
    padding: 0.875rem 1rem;
  }

  .price-comparison-row {
    font-size: 0.875rem;
    flex-wrap: wrap;
  }

  .price-comparison-badge {
    font-size: 0.625rem;
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .sticky-cta-bar__text {
    font-size: 0.8125rem;
  }

  .sticky-cta-bar__inner {
    padding: 0.5rem 0.75rem;
  }
}


/* --- source-* aliases (transitional dual; collapsed in final pass) --- */
/* ==========================================================================
   Endpoint Pages — Shared styles for /sources/ endpoint documentation pages
   ========================================================================== */

/* Breadcrumbs */
.source-page .breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  opacity: 0.6;
}
.source-page .breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.source-page .breadcrumbs a:hover {
  opacity: 1;
}
.source-page .breadcrumbs .sep {
  margin: 0 0.5rem;
}

/* Hero */
.source-hero {
  padding: 3rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255, 107, 53, 0.02), transparent);
}

.source-hero .page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.source-hero .page-subtitle {
  font-size: 1.125rem;
  line-height: 1.5;
  opacity: 0.8;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.trust-signals {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.trust-signal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

.trust-signal::before {
  content: "\2713";
  color: var(--data);
  font-weight: 700;
}

/* Content sections */
.source-page .content-section {
  padding: 4rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.source-page .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.source-page .section-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.source-page .section-subtitle {
  font-size: 1.125rem;
  opacity: 0.7;
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.5;
}

.source-page .section-text {
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 1rem;
  opacity: 0.85;
}

.source-page .section-text p {
  margin-bottom: 1.25rem;
}

/* Endpoint cards / data tables */
.source-card {
  background: var(--bg-surface, #ffffff);
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.source-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.source-card .source-url {
  background: #0c0c15;
  color: #9CDCFE;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  display: inline-block;
  margin: 0.5rem 0 1rem;
}

.source-card p {
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.source-card .credit-cost {
  font-size: 0.875rem;
  color: var(--data);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Data tables */
.source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.source-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(0,0,0,0.08);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.source-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: top;
}

.source-table code {
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8125rem;
}

.source-table tr:last-child td {
  border-bottom: none;
}

.source-table tr:hover td {
  background: rgba(0,0,0,0.015);
}

/* Comparison table */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}

.comparison-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  background: var(--bg-surface, #ffffff);
  position: sticky;
  top: 0;
}

.comparison-table th:first-child {
  min-width: 140px;
}

.comparison-table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: top;
}

.comparison-table tr:hover td {
  background: rgba(0,0,0,0.015);
}

.comparison-table strong {
  color: var(--accent);
}

/* Code blocks */
.source-page .code-example {
  background: #0c0c15;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) rgba(255,255,255,0.05);
}

.source-page .code-example pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: #eaeaf0;
  /* Keep code lines intact and scroll horizontally instead of wrapping at
     arbitrary characters (which broke curl commands / URLs mid-token). The
     .code-example container already has overflow-x:auto. */
  white-space: pre;
  overflow-x: auto;
}

.source-page .code-example .comment { color: #6A9955; font-style: italic; }
.source-page .code-example .keyword { color: #569CD6; font-weight: 500; }
.source-page .code-example .string { color: #CE9178; }
.source-page .code-example .function { color: #DCDCAA; }
.source-page .code-example .class-name { color: #4EC9B0; }
.source-page .code-example .number { color: #B5CEA8; }
.source-page .code-example .key { color: #9CDCFE; }
.source-page .code-example .flag { color: #DCDCAA; }
.source-page .code-example .operator { color: #D4D4D4; }

.code-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  color: #eaeaf0;
  margin-bottom: 0.75rem;
  display: block;
}

/* Tab navigation */
.source-page .tab-buttons {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 2rem;
  background: var(--bg-subtle, #f0f0f4);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}

.source-page .tab-button {
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #666;
  transition: all 0.15s ease;
  border-radius: 8px;
  white-space: nowrap;
}

.source-page .tab-button:hover {
  color: var(--text-secondary, #444);
}

.source-page .tab-button.active {
  background: var(--bg-surface, #ffffff);
  color: var(--text, #0c0c14);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.source-page .tab-content {
  display: none;
}

.source-page .tab-content.active {
  display: block;
}

/* Use cases */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.use-case {
  background: var(--bg-surface, #ffffff);
  border-radius: 8px;
  padding: 2.5rem;
  border: 1px solid rgba(0,0,0,0.06);
}

.use-case h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.use-case h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.6;
  margin: 1rem 0 0.5rem;
}

.use-case p {
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

/* FAQ */
.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 1.5rem 0;
}

.faq-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.06);
}

.faq-question {
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.4;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  line-height: 1.6;
  opacity: 0.8;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 1rem;
}

/* Related endpoints */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.related-link {
  display: block;
  padding: 1.25rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.related-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.related-link h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.related-link p {
  font-size: 0.8125rem;
  opacity: 0.6;
  line-height: 1.4;
}

/* CTA footer */
.source-cta {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(to top, rgba(255, 107, 53, 0.03), transparent);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.source-cta h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.source-cta p {
  font-size: 1.125rem;
  opacity: 0.7;
  max-width: 36rem;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.source-cta .cta-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.6;
}

.source-cta .cta-links a {
  color: inherit;
}

/* Endpoint overview grid */
.endpoints-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Pipeline / flow visualization */
.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.pipeline-step {
  background: var(--bg-surface, #ffffff);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}

.pipeline-arrow {
  opacity: 0.3;
  font-size: 1.25rem;
}

/* Two-column layout for sections */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Buttons */
.source-page .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-block;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  .source-hero {
    padding: 2rem 1rem 3rem;
  }

  .trust-signals {
    flex-direction: column;
    gap: 0.75rem;
  }

  .source-page .content-section {
    padding: 3rem 0;
  }

  .source-page .section-title {
    font-size: 1.5rem;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .source-card {
    padding: 1.5rem;
  }

  .use-case {
    padding: 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-steps {
    flex-direction: column;
  }

  .pipeline-arrow {
    transform: rotate(90deg);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  .source-table th,
  .source-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .source-page .code-example {
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }
}

/* ==========================================================================
   Mobile horizontal-overflow fixes (audit 2026-06)
   Targets the recurring culprits found across endpoint/product pages:
   nowrap hero CTAs, non-wrapping tab rows, unscrollable data tables, and
   long unbreakable URLs. Component class names are unique, so these are
   intentionally unscoped to cover both theme-template and DB-content pages.
   ========================================================================== */
@media (max-width: 768px) {
  /* CTA buttons (hero + mid-page): long labels like "Start with Starter Plan
     — 7-Day Free Trial" / "$49/mo After 7 Days" have white-space:nowrap and
     were forcing page-wide horizontal scroll. Let them wrap. */
  .hero-ctas .btn,
  .mid-cta .btn,
  .content-section .btn {
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Hero CTAs also stack full-width (better touch targets). */
  .hero-ctas {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .hero-ctas .btn {
    width: 100%;
  }

  /* Tab switchers: wrap instead of overflowing (instagram had an 805px row). */
  .tab-buttons {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Data tables: scroll within their own box rather than stretching the page.
     min-width:0 lets the block fit the viewport while nowrap headers keep
     columns from collapsing, so the content scrolls horizontally inside. */
  .source-table,
  .comparison-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comparison-table-wrapper {
    max-width: 100%;
    min-width: 0;
  }

  /* Code blocks (pre): scroll within their box, never stretch the page. */
  .source-page pre,
  .rest-api-page pre,
  .tab-content pre {
    max-width: 100%;
    overflow-x: auto;
  }

  /* Endpoint routes: keep them on ONE line and scroll, never break mid-path.
     Route boxes (.source-url) become horizontally-scrollable blocks; routes
     inside data tables stay nowrap and ride the table's own horizontal scroll
     (tables are display:block;overflow-x:auto on mobile). This removes the ugly
     character-level line breaks in routes like /api/linkedin/search/users. */
  .source-url {
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .source-table code,
  .comparison-table code,
  .platform-table code,
  .status-table code,
  .pricing-table code {
    white-space: nowrap;
  }
  /* Inline code in prose and URL-bearing card headings: break only as a last
     resort (keep tokens whole where they fit) rather than at every character. */
  .source-page code,
  .rest-api-page code,
  .source-card h1,
  .source-card h2,
  .source-card h3,
  .source-card h4 {
    overflow-wrap: break-word;
  }

  /* Multi-column grids: collapse so items can't force the page wide, and let
     grid/flex children shrink (min-width:0) so wide content inside a card
     (e.g. a data table) becomes the scroll point instead of stretching out. */
  .use-cases-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .use-cases-grid > *,
  .pricing-grid > *,
  .source-card {
    min-width: 0;
  }

  /* Class A (DB-content) pages ship an inline `!important` rule that force-wraps
     code (white-space:pre-wrap + overflow-wrap:anywhere on .code-example pre code
     / .code-block-wrapper pre), which broke curl commands & URLs mid-token. Those
     pages render inside <main class="source-page">, so prefixing the selector
     with `main.` raises specificity above the inline rule and lets us restore
     clean horizontal scrolling without editing each page's stored HTML. */
  main.source-page .code-block-wrapper pre,
  main.source-page .code-example pre,
  main.source-page .code-example pre code {
    white-space: pre !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Body copy / headings: break overlong words at very narrow widths so a
     single long word can't push the page (break-word only breaks when needed). */
  .source-page h1,
  .source-page h2,
  .source-page h3,
  .source-page p,
  .source-page li,
  .rest-api-page h1,
  .rest-api-page h2,
  .rest-api-page h3,
  .rest-api-page p {
    overflow-wrap: break-word;
  }
}

/* ==========================================================================
   Hero conversion components — price banner, social proof, sticky CTA, mid-CTA
   ========================================================================== */

.price-comparison-banner {
  max-width: 36rem;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem 0.875rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: var(--bg-surface, #ffffff);
  font-family: var(--font-mono, ui-monospace, monospace);
  text-align: left;
}

.price-comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.375rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.9375rem;
}

.price-comparison-row:last-of-type {
  border-bottom: 0;
}

.price-comparison-row--highlight {
  border-top: 2px solid var(--accent, #ff6b35);
  margin-top: 0.25rem;
  padding-top: 0.625rem;
  font-weight: 600;
}

.price-comparison-label {
  opacity: 0.75;
}

.price-comparison-row--highlight .price-comparison-label {
  opacity: 1;
}

.price-comparison-value {
  font-weight: 500;
  text-align: right;
}

.price-comparison-row--highlight .price-comparison-value {
  font-weight: 700;
}

.price-comparison-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: var(--accent, #ff6b35);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
}

.price-comparison-footnote {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  opacity: 0.65;
  text-align: center;
}

.hero-social-proof {
  margin: 0 auto 2rem;
  font-size: 0.875rem;
  opacity: 0.7;
  text-align: center;
  max-width: 36rem;
}

.mid-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-surface, #ffffff);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  font-family: var(--font-mono, ui-monospace, monospace);
  transition: transform 0.2s ease;
}

.sticky-cta-bar[hidden] {
  display: none !important;
}

.sticky-cta-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  max-width: 72rem;
  margin: 0 auto;
}

.sticky-cta-bar__text {
  font-size: 0.9375rem;
}

.sticky-cta-bar__btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .price-comparison-banner {
    padding: 0.875rem 1rem;
  }

  .price-comparison-row {
    font-size: 0.875rem;
    flex-wrap: wrap;
  }

  .price-comparison-badge {
    font-size: 0.625rem;
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .sticky-cta-bar__text {
    font-size: 0.8125rem;
  }

  .sticky-cta-bar__inner {
    padding: 0.5rem 0.75rem;
  }
}
