/* Founder Calendar has four summary actions, while the contractor Calendar
   has nine. Do not reserve five empty desktop/tablet tracks for the founder
   row; let its four actions share the full available width. */
@media (min-width: 761px) {
  #app .premium-app .ironflow-calendar-page
    .calendar-focus-grid:has(> .calendar-focus-metric:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
}

/* QA989: Calendar summary cards use a readable two-up phone grid. */
@media (max-width: 760px) {
  #app .premium-app .ironflow-calendar-page .calendar-focus-strip {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-metric {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 84px !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 10px !important;
    border: 1px solid rgba(148, 163, 184, .2) !important;
    border-radius: 9px !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-icon,
  #app .premium-app .ironflow-calendar-page .calendar-focus-metric .calendar-focus-icon {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-icon svg,
  #app .premium-app .ironflow-calendar-page .calendar-focus-metric .calendar-focus-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-metric > div {
    min-width: 0 !important;
    column-gap: 6px !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-metric small {
    font-size: 11px !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-metric strong {
    font-size: 23px !important;
    line-height: 1 !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-metric div > span {
    min-width: 0 !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 390px) {
  #app .premium-app .ironflow-calendar-page .calendar-focus-grid {
    gap: 7px !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-metric {
    min-height: 80px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 7px !important;
    padding: 9px 8px !important;
  }

  #app .premium-app .ironflow-calendar-page .calendar-focus-icon,
  #app .premium-app .ironflow-calendar-page .calendar-focus-metric .calendar-focus-icon {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
  }
}
