/* OddsQ r72: mobile homepage sequence, companion rails, and boundary repair. */
@media (max-width: 760px) {
  /* Keep the hero first, all market windows second, and the two live rails
   * immediately before the footer. display: contents preserves the desktop DOM. */
  .dashboard {
    display: flex !important;
    flex-direction: column;
    row-gap: 12px;
  }

  .dashboard > .top-grid {
    display: contents !important;
  }

  .top-grid > .lead-panel {
    order: 1;
  }

  .dashboard > .window-grid {
    order: 2;
  }

  .top-grid > .certain-panel {
    order: 3;
    margin-top: 2px;
  }

  .top-grid > .asset-panel {
    order: 4;
  }

  /* Four complete 66px rows plus the header, row gaps, and sequence padding. */
  .top-grid > .certain-panel,
  .top-grid > .asset-panel {
    width: 100%;
    height: 351px !important;
    min-height: 351px !important;
    max-height: 351px !important;
  }

  .certain-panel .intel-list,
  .asset-panel .asset-scroll {
    height: 307px !important;
  }

  .asset-panel .asset-track,
  .asset-panel .asset-body {
    height: 100% !important;
  }

  .certain-panel .intel-scroll-sequence,
  .asset-panel .asset-sequence {
    gap: 8px !important;
    padding: 8px 9px 11px !important;
  }

  .certain-panel .intel-scroll-sequence > .intel-row,
  .certain-panel .intel-scroll-track > .intel-row,
  .certain-panel .intel-scroll-track > .intel-row[aria-hidden="true"],
  .asset-panel .asset-scroll .asset-row,
  .asset-panel .asset-scroll .asset-row:nth-child(odd) {
    flex-basis: 66px !important;
    height: 66px !important;
    min-height: 66px !important;
  }

  /* The tape label and moving headlines share one mobile type scale. */
  .market-ticker {
    grid-template-columns: 116px minmax(0, 1fr) !important;
    min-height: 42px !important;
  }

  .ticker-status {
    padding: 0 12px !important;
  }

  .ticker-status b,
  .ticker-item b,
  .ticker-probability {
    font-family: var(--sans) !important;
    font-size: 10.5px !important;
    line-height: 1.2;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
  }

  .ticker-status b {
    font-weight: 700 !important;
  }

  .ticker-item b {
    font-weight: 600 !important;
  }

  /* A legacy tablet selector kept the final primary window in a horizontal
   * scroller. Restore the same full-width mobile boundary as every other row. */
  .primary-window-grid .window-column[data-window="30d"] .card-list-primary {
    display: grid !important;
    width: 100% !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
  }

  .primary-window-grid .window-column[data-window="30d"] .market-card,
  .continuation-stream .window-continuation[data-window="30d"] .market-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}
