/* HYPE Fundamentals: mobile-only values and correctly fitted price/revenue SVG plots.
   Keep after mobile-metric-alignment.css in the index stylesheet cascade. */
@media (max-width: 720px), (min-width: 721px) and (max-width: 1060px) and (orientation: landscape) and (max-height: 500px) and (any-pointer: coarse) {
  /* The 2x2 metric grid and its four headings stay exactly where they are. */
  #mobileTokenCards .one-line-metrics.hf-chart-expanded > .hf-four-grid .hf-tile-value {
    font-size: clamp(10px, 3.0vw, 13px) !important;
    font-weight: 750 !important;
    line-height: 1.03 !important;
    letter-spacing: -0.025em !important;
    margin-top: 3px !important;
    max-width: calc(100% - 3px) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    min-height: 0 !important;
    display: block !important;
    text-align: center !important;
  }
  /* Missing-data strings may need smaller text; don't let them overflow a tile. */
  #mobileTokenCards .one-line-metrics.hf-chart-expanded > .hf-four-grid .hf-tile-value.hf-value-unavailable,
  #mobileTokenCards .one-line-metrics.hf-chart-expanded > .hf-four-grid .hf-value-unavailable {
    font-size: clamp(7px, 1.8vw, 9px) !important;
    white-space: normal !important;
    line-height: 1.05 !important;
    margin-top: 0 !important;
    overflow-wrap: anywhere !important;
  }
  /* Existing chart box dimensions and SVG heights are unchanged. */
  #heroSpark svg.hero-sparkline-svg,
  #mobileTokenCards .mobile-chart-field .mobile-token-field-value svg.mini-chart-svg {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Horizontal plotting is done by JS in the SVG coordinate system.
     Prevent stretch of stroke width when the viewBox is adjusted. */
  #heroSpark svg.hero-sparkline-svg path,
  #mobileTokenCards .mobile-chart-field svg.mini-chart-svg path {
    vector-effect: non-scaling-stroke;
  }
}

/* At the narrowest 320px layouts, retain every digit in the fixed-width tiles. */
@media (max-width: 350px) {
  #mobileTokenCards .one-line-metrics.hf-chart-expanded > .hf-four-grid .hf-tile-value:not(.hf-value-unavailable) {
    font-size: 9px !important;
    letter-spacing: -0.05em !important;
  }
}
