/* Tablet: <= 900px */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4rem 0 3rem;
  }
  .hero h1 { font-size: 2.2rem; }
  .hero p { max-width: 100%; }

  .service-featured { grid-template-columns: 1fr; }
  .service-featured-visual { border-left: none; border-top: 1px solid var(--border); }
  .service-pair { grid-template-columns: 1fr; }

  .process-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .results-left { border-right: none; border-bottom: 1px solid var(--border); }

  .founder-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .audit-steps { grid-template-columns: 1fr; }

  .bestfit-section { flex-direction: column; gap: 1rem; }

  .stack-inner { flex-direction: column; align-items: flex-start; }
  .stack-note { padding-left: 0; margin-left: 0; }

  /* Article pages */
  .article-body { max-width: 100%; }
  .stat-callout { flex-direction: column; gap: 1.25rem; }
  .article-title { font-size: 1.8rem; }

  /* Insights index */
  .insights-grid { grid-template-columns: 1fr; }
}

/* Mobile: <= 600px */
@media (max-width: 600px) {
  .container {
    padding: 0 1.25rem;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
  }

  /* Mobile nav */
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 12px 12px;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.75rem;
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-cta { text-align: center; }
  nav { position: relative; }

  /* Mobile dropdown - expanded inline, clean layout */
  .nav-dropdown {
    display: flex;
    flex-direction: column;
  }
  .nav-dropdown-trigger {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
  }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    margin-left: 0.5rem;
    min-width: auto;
  }
  .nav-dropdown-menu a {
    display: block;
    padding: 0.35rem 0 0.35rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
  }

  .hero { padding: 3rem 0 2rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero-cta-group { flex-direction: column; align-items: flex-start; }

  /* Terminal on mobile */
  .hero-terminal { overflow: hidden; }
  .terminal-body { font-size: 0.62rem; line-height: 1.7; overflow-x: auto; }

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

  .proof-strip { flex-direction: column; gap: 1rem; }
  .proof-clients { flex-direction: column; gap: 0.5rem; }

  .service-featured { overflow: hidden; }
  .service-featured-content { padding: 1.5rem; }
  .service-featured-content h3 { font-size: 1.3rem; }
  .service-featured-content p { font-size: 0.85rem; }
  .service-featured-metrics { flex-direction: column; gap: 1rem; }
  .service-featured-visual { padding: 1.25rem; overflow-x: auto; }
  .service-card { padding: 1.75rem; }

  /* Dashboard on mobile */
  .service-dashboard { min-width: 0; }
  .dash-topbar { flex-wrap: wrap; }
  .dash-nav { display: none; }
  .dash-table-header { flex-wrap: wrap; }
  .dash-table { display: block; overflow-x: auto; white-space: nowrap; }

  /* Founder section - smaller photo, smaller heading */
  .founder-photo {
    width: 120px;
    height: 120px;
  }
  .founder-section { gap: 1.5rem; }
  .founder-content h2 { font-size: 1.4rem; }
  .founder-content p { font-size: 0.88rem; }
  .founder-advantages li { font-size: 0.85rem; }

  .cta-section h2 { font-size: 1.8rem; }
  .cta-buttons { flex-direction: column; gap: 1rem; }
  .cta-trust { flex-direction: column; gap: 0.75rem; align-items: center; }

  .dash-stats { grid-template-columns: 1fr; }
  .dash-table { font-size: 0.6rem; }
  .dash-table th, .dash-table td { padding: 5px 4px; }

  footer { flex-direction: column; gap: 1rem; text-align: center; }

  /* Article pages */
  .article-header { padding: 2.5rem 0 1.5rem; }
  .article-title { font-size: 1.5rem; }
  .article-meta { flex-direction: column; gap: 0.4rem; }
  .article-body p { font-size: 0.9rem; }
  .article-body h2 { font-size: 1.25rem; }
  .stat-callout { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .pull-quote { margin: 1.5rem 0; }
  .pull-quote p { font-size: 0.95rem; }
  .article-cta { padding: 1.75rem; }
  .article-cta h3 { font-size: 1.1rem; }

  /* Insights index */
  .insights-header { padding: 2.5rem 0 1.5rem; }
  .insight-card { padding: 1.5rem; }
  .insight-card-title { font-size: 1.1rem; }

  /* Subpage inline grids - force stack */
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }

  /* Prevent any overflow from subpage visuals */
  .service-dashboard { overflow-x: auto; }
  [style*="max-width: 600px"] {
    max-width: 100% !important;
  }
}
/* cache-bust: 1774981536 */
