/* Coin pages: the facts list leaves out rows without a value, so its count varies (the design always shows six).
 * The last fact fills the rest of its row instead of leaving empty grid cells (2 columns on phones, 3 from 640 px). */
@media (width < 640px) {
  html main section[aria-label="About"] > dl > div:nth-child(2n+1):last-child { grid-column: 1 / -1; }
}
@media (width >= 640px) {
  html main section[aria-label="About"] > dl > div:nth-child(3n+1):last-child { grid-column: 1 / -1; }
  html main section[aria-label="About"] > dl > div:nth-child(3n+2):last-child { grid-column: span 2; }
}

/* Right column: "Similar coins" is as wide as the converter above it (it shrank to its content, 254–288 px under a
 * 360 px card). */
html main aside[aria-label="Tools"] > * { justify-self: stretch; width: 100%; box-sizing: border-box; }

/* Performance (1h · 24h · 7d · 30d · 1y) on phones: a 3 + 2 grid instead of a sideways scroller that hid 30d and 1y. */
@media (width < 640px) {
  html main section[aria-label="Performance"] > div { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; width: auto; }
  html main section[aria-label="Performance"] > div > div { min-width: 0; }
}

/* Phones: the chart's range buttons are at least 36px tall (they were 28px, hard to hit). */
@media (width < 600px) {
  html main [role="tablist"][aria-label="Time range"] button { min-height: 36px; }
}
