/* ══════════════════════════════════════════════════════════════
   mobile-fixes.css — Global mobile spacing & padding overrides
   Applied after style.css on every page.
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet & Mobile (≤768px) ── */
@media (max-width: 768px) {

  /* 1. Horizontal Padding — increase breathing room on edges */
  .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  /* Hero: force single-column + prevent overlaps */
  .hero {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  .hero h1 {
    font-size: 1.6rem !important;
    line-height: 1.15 !important;
  }

  .hero p {
    font-size: 0.95rem !important;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-panel {
    padding: 16px !important;
  }

  /* Copy button should not overlap code on mobile */
  .connect-block .copy-btn {
    position: static !important;
    width: 100%;
    margin: 8px 0 12px 0;
    border-radius: 10px;
    font-size: 0.85rem;
    min-height: 40px;
  }

  .connect-block pre {
    font-size: 11px !important;
    word-break: break-all !important;
    white-space: pre-wrap !important;
    padding-top: 12px !important;
  }

  /* Metrics grid (home page) */
  .metrics {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem;
  }

  /* Tool list — single column */
  .tool-list {
    grid-template-columns: 1fr !important;
  }

  /* 2. Vertical Spacing — section headings & content */
  .section {
    padding: 40px 0;
  }

  .section + .section {
    margin-top: 0.5rem;
  }

  .section h2,
  .stat-section h2,
  .content-section h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
  }

  .section h2 + p,
  .stat-section h2 + p,
  .content-section h2 + p,
  .section-title + .grid-3,
  .section-title + .grid-2-desktop {
    margin-top: 1rem;
  }

  .section-title {
    margin-bottom: 1.25rem;
  }

  .content-section h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
  }

  /* Cards & feature boxes — bigger gap */
  .grid-3 {
    gap: 1.25rem;
  }

  .card {
    padding: 22px;
  }

  .card h3 {
    margin-bottom: 0.75rem;
  }

  .card p {
    line-height: 1.65;
  }

  /* 3. Pricing page — card internal spacing */
  .pricing-card {
    gap: 20px;
    padding: 24px;
  }

  .pricing-card .price {
    margin-bottom: 0.5rem;
  }

  .pricing-card > div {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .pricing-card li {
    margin-bottom: 10px;
  }

  .pricing-grid {
    gap: 1.5rem;
  }

  /* Pricing CTA — "Coming Soon" / "Join waitlist" spacing */
  .pricing-cta {
    gap: 12px;
    margin-top: 1rem;
  }

  /* FAQ breathing room (pricing & general) */
  .faq {
    padding: 48px 0 56px;
  }

  details + details {
    margin-top: 14px;
  }

  .faq details summary {
    padding: 14px 16px;
  }

  .faq details p {
    padding: 4px 4px 8px;
    line-height: 1.65;
  }

  .faq-grid {
    gap: 16px;
  }

  /* 4. Docs page — code blocks & readability */
  .content-section {
    margin-bottom: 2.5rem;
  }

  .content-section p {
    line-height: 1.7 !important;
    margin-bottom: 1rem;
  }

  .tool-card {
    padding: 18px;
    margin-bottom: 0;
  }

  .tool-card p {
    line-height: 1.7 !important;
  }

  .tool-card pre {
    padding: 1rem !important;
    margin: 1rem 0 !important;
  }

  pre {
    padding: 1rem !important;
    margin: 1rem 0;
  }

  .tool-card code,
  .content-section code,
  p code {
    padding: 2px 6px;
  }

  .tool-grid {
    gap: 1.25rem;
  }

  /* Docs callout */
  .callout {
    padding: 16px;
    margin-bottom: 1.25rem;
  }

  .callout p {
    line-height: 1.65;
  }

  /* 5. Stats pages — tables, cards, charts */

  /* Tables: scrollable with momentum */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Stats big-number cards */
  .big-numbers {
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .big-number-card {
    padding: 20px;
  }

  /* Chart containers */
  .chart-wrap {
    margin: 1.5rem 0;
    padding: 16px;
  }

  /* Stat sections */
  .stat-section {
    margin-bottom: 3rem;
  }

  .stat-section h2 {
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .stat-section .section-intro {
    margin-bottom: 1.25rem;
    line-height: 1.65;
  }

  .stat-sentence {
    margin: 1.25rem 0;
    line-height: 1.6;
  }

  /* FAQ items in stats pages */
  .faq-item {
    margin-bottom: 1.25rem;
    padding: 20px 22px;
  }

  .faq-item h3 {
    margin-bottom: 0.625rem;
  }

  .faq-item p {
    line-height: 1.65;
    margin-bottom: 0.625rem;
  }

  /* 6. Signup page — form spacing */
  .form-card {
    padding: 24px;
  }

  .form-card form {
    gap: 1.25rem;
  }

  .form-card label {
    margin-bottom: 0.5rem;
  }

  .form-card button[type="submit"],
  .form-card .btn-primary {
    margin-top: 0.75rem;
  }

  .helper-grid {
    gap: 1.25rem;
    margin-top: 2rem;
  }

  .helper-grid .card {
    padding: 20px;
  }

  .result-card {
    margin-top: 1.5rem;
    padding: 20px;
  }

  /* TOC spacing */
  .toc {
    margin-bottom: 2rem;
    padding: 18px 20px;
  }

  .toc li {
    margin-bottom: 8px;
  }

  /* Bar chart rows */
  .bar-row {
    margin-bottom: 10px;
  }

  /* Two-col grids */
  .two-col {
    gap: 1.5rem;
  }

  /* Metrics grid (home page) */
  .metrics {
    gap: 1rem;
  }

  .metrics div {
    padding: 16px;
  }

  /* Hero sections */
  .pricing-hero,
  .docs-hero,
  .signup-hero {
    padding-top: 40px;
    padding-bottom: 28px;
  }

  .pricing-hero p,
  .docs-hero p,
  .signup-hero p {
    line-height: 1.65;
    margin-top: 0.75rem;
  }

  /* Stats hero */
  .stats-hero {
    padding: 40px 0 24px;
  }

  .stats-hero .subtitle {
    line-height: 1.6;
  }

  /* CTA section in stats pages */
  .cta-section {
    margin-top: 2rem;
    padding: 28px 24px;
  }
}

  /* ── Hero section — MUST go single-column on mobile ── */
  .hero {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  .hero h1 {
    font-size: 1.6rem !important;
    line-height: 1.15 !important;
  }

  .hero p {
    font-size: 0.95rem !important;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-panel {
    padding: 16px !important;
  }

  .hero-panel pre {
    font-size: 12px !important;
    padding: 12px !important;
  }

  .hero-panel h3 {
    font-size: 0.95rem !important;
  }

  /* Connect block on hero */
  .connect-block {
    padding: 16px !important;
  }

  .connect-block pre {
    font-size: 11px !important;
    word-break: break-all !important;
    white-space: pre-wrap !important;
  }

  /* Metrics grid — 2 col on tablet, stack on small */
  .metrics {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Tool list — single column on mobile */
  .tool-list {
    grid-template-columns: 1fr !important;
  }

  /* Quick start code blocks */
  .quick-start pre,
  .section pre {
    font-size: 12px !important;
    overflow-x: auto !important;
    white-space: pre !important;
    word-break: normal !important;
  }

}

/* ── Small Mobile (≤600px) ── */
@media (max-width: 600px) {

  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Section spacing */
  .section {
    padding: 28px 0;
  }

  /* Hero small mobile */
  .hero {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  .hero h1 {
    font-size: 1.4rem !important;
  }

  .metrics {
    grid-template-columns: 1fr !important;
  }

  .section h2,
  .stat-section h2,
  .content-section h2 {
    margin-top: 2rem;
  }

  /* Pricing cards */
  .pricing-card {
    padding: 20px;
    gap: 16px;
  }

  .pricing-grid {
    gap: 1.25rem;
  }

  /* Stats */
  .stats-hero {
    padding: 28px 0 16px;
  }

  .stat-section {
    margin-bottom: 2.5rem;
  }

  .big-numbers {
    margin-bottom: 2rem;
  }

  /* Form */
  .form-card {
    padding: 20px;
  }

  .form-card form {
    gap: 1.25rem;
  }

  .signup-hero {
    padding: 28px 0 20px;
  }

  /* Docs */
  .docs-hero {
    padding: 28px 0 16px;
  }

  .tool-card {
    padding: 16px;
  }

  .tool-card pre {
    padding: 0.875rem;
    margin: 0.875rem 0;
  }

  .content-section {
    margin-bottom: 2rem;
  }

  /* Hero small mobile */
  .hero {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  .hero h1 {
    font-size: 1.4rem !important;
  }

  .hero-panel pre {
    font-size: 11px !important;
  }

  .metrics {
    grid-template-columns: 1fr !important;
  }

  /* FAQ */
  .faq {
    padding: 32px 0 44px;
  }

  .faq-grid {
    gap: 12px;
  }
}
