/* ===========================
   Demos Page — Mobile (≤1200px)
   =========================== */
@media (max-width: 1200px) {

  .demos-page .hero-headline {
    font-size: 1.6em;
    margin-top: 30px;
  }

  .demos-page .hero-subtitle {
    font-size: 1rem;
    padding: 0 var(--page-padding-x);
  }

  /* Proof strip — 2 columns on tablet */
  .demos-proof-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 var(--page-padding-x);
  }

  /* Anchor nav */
  .demos-anchor-nav {
    top: 52px;
    padding: 12px var(--page-padding-x);
    gap: 10px;
    flex-wrap: wrap;
    overflow: visible;
    justify-content: center;
    border-radius: 12px;
    margin: 15px auto 5px;
  }

  .demos-anchor-link {
      flex: 0 0 auto;
      white-space: nowrap;
      padding: 5px 10px;
      font-size: 0.85rem;
  }

  /* Sections — reduce padding */
  .intro-section,
  .bug-reports-section,
  .test-runner-section,
  .test-cases-section,
  .deliverables-section {
    padding: 30px var(--page-padding-x) 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 18px;
  }

  .demos-section-kicker {
    font-size: 0.8rem;
  }

  /* Bug reports — 2 columns on tablet */
  .bug-reports-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .bug-report-card {
    min-height: 420px;
    padding: 18px 18px 26px;
  }

  .bug-reports-carousel {
    margin: 30px 0 20px;
    gap: 8px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  /* Test runner */
  .test-runner-demo {
    padding: 16px;
    border-radius: 16px;
  }

  .test-runner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .test-runner-title {
    font-size: 0.85em;
    word-break: break-all;
  }

  .run-tests-btn {
    width: 100%;
    justify-content: center;
  }

  /* Test case accordion — single column on tablet */
  .test-case-accordion {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .test-case-header {
    padding: 14px;
    gap: 8px;
  }

  .test-case-title {
    font-size: 0.95em;
  }

  /* Deliverables — 2 columns on tablet */
  .deliverables-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .demos-inline-cta .brand-cta-primary {
    min-width: 220px;
  }
}

/* ===========================
   Demos Page — Phones (≤768px)
   =========================== */
@media (max-width: 768px) {

  .demos-page .hero-headline {
    font-size: 1.3em;
    margin-top: 20px;
  }

  .demos-page .hero-subtitle {
    font-size: 0.9rem;
  }

  /* Proof strip — single column */
  .demos-proof-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .report-flow-track {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .report-flow-step {
    padding: 18px 16px;
  }

  .demos-proof-card {
    padding: 16px;
  }

  /* Bug reports — single column */
  .bug-reports-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bug-reports-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .bug-report-card,
  .bug-report-card.expanded {
    min-height: 0;
    height: auto;
    padding: 14px 14px 20px;
  }

  .bug-reports-carousel {
    gap: 0;
    position: relative;
    padding-left: 40px;
    padding-right: 40px;
  }

  .carousel-arrow {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  .carousel-arrow.carousel-prev {
    left: 6px;
  }

  .carousel-arrow.carousel-next {
    right: 6px;
  }

  .demos-page .carousel-arrow.site-slider-arrow::before {
    width: 10px;
    height: 10px;
  }

  .demos-page .carousel-arrow.site-slider-arrow.carousel-prev::before {
    transform: translate(-50%, -50%) rotate(-135deg);
  }

  .demos-page .carousel-arrow.site-slider-arrow.carousel-next::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .bug-header {
    gap: 12px;
    margin-bottom: 20px;
  }

  .bug-severity {
    font-size: 0.75em;
    padding: 7px 12px;
  }

  .bug-report-card h3 {
    font-size: 1.05em;
    padding-right: 0;
  }

  .expand-btn {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 0.9em;
  }

  /* Test runner */
  .test-runner-description {
    padding: 12px 14px;
  }

  .test-stats {
    gap: 16px;
  }

  .test-results .stat-number {
    font-size: 1.5em;
  }

  .test-finding-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .test-finding-top strong {
    font-size: 0.9rem;
  }

  /* Test cases */
  .test-case-header {
    flex-wrap: wrap;
    padding: 12px;
    gap: 6px;
  }

  .test-case-id {
    min-width: auto;
    font-size: 0.8em;
  }

  .test-case-title {
    font-size: 0.9em;
  }

  .test-case-status {
    font-size: 0.7em;
  }

  /* Deliverables — single column */
  .deliverables-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .deliverable-card {
    padding: 18px;
  }

  /* Sections padding */
  .intro-section,
  .bug-reports-section,
  .test-runner-section,
  .test-cases-section,
  .deliverables-section {
    padding: 24px var(--page-padding-x) 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 14px;
  }

  .demos-inline-cta .brand-cta-primary {
    min-width: auto;
    width: 100%;
    max-width: 320px;
  }

  /* Slider status bar */
  .bug-reports-carousel > .site-slider-status {
    left: 44px;
    right: 44px;
  }
}

/* ===========================
   Very small screens (≤400px)
   =========================== */
@media (max-width: 400px) {
  .bug-type-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}
