/* ---------- phones and tall screens (matches IS_PHONE in the script) ---------- */
@media (max-width: 900px) {
  .hero-title { grid-column: 1 / -1; }
  .hero-copy { grid-column: 1 / span 8; }
  .status { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .head h2, .head-side { grid-column: 1 / -1; }
  .tr-head { display: none; }
  .tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 14px; }
  .tr .when { grid-column: 1; grid-row: 1; }
  .tr .state { grid-column: 2; grid-row: 1; }
  .tr .mission { grid-column: 1 / -1; }
  .tr .where { grid-column: 1 / -1; }
  .further { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .foot-links { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { padding-top: max(260px, 40svh); background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) calc(max(260px, 40svh) - 90px), #000 max(260px, 40svh)); }

}
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  :root { --nav-h: 56px; }
  .hero { min-height: 0; padding-bottom: 0; }
  .hero-grid { row-gap: 24px; }
  .hero-title { font-size: clamp(38px, 10.6vw, 64px); }
  .hero-copy { grid-column: 1 / -1; }
  /* the live numbers sit below the moonrise and slide up over it like a sheet */
  .status { position: relative; margin: 46svh calc(-1 * var(--margin)) 0; padding: 28px var(--margin) 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; background: #000; box-shadow: 0 -48px 48px #000; }
  #poster { width: 110vh; height: 110vh; left: calc(50% - 55vh); top: calc(119% - 55vh); }
  .chapter { align-items: flex-end; padding-bottom: 6svh; }
  #scrim, body.scrim-right #scrim { background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.9) 50%, rgba(0, 0, 0, 0.6) 62%, transparent 80%); }
  .ch { width: 100%; padding: 28px 0 8px; gap: 14px; }
  .yr { font-size: clamp(64px, 18vw, 96px); }
  .yr--range { font-size: clamp(44px, 12vw, 64px); }
  .ex-row { flex-wrap: wrap; justify-content: center; }
  .scrub { width: min(100%, 420px); order: -1; flex: 1 1 100%; }
  .ex-hint { display: none; }
  .ex-zoom { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 170px); transform: none; }
  .ex-top { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; pointer-events: auto; left: 0; right: 0; padding: 0 var(--margin) 6px; }
  .ex-top::-webkit-scrollbar { display: none; }
  .ex-top .seg { flex-shrink: 0; }
  .detail { left: 8px; right: 8px; top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); width: auto; max-height: 56svh; border-radius: 24px; z-index: 2; }
  body.has-detail .ex-time { visibility: hidden; }
}
@media (max-width: 900px) {
  .ob { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 6px; }
  .ob-head { display: none; }
  .ob-n { grid-column: 1 / -1; }
  .rr { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
  .rr-y { font-size: 30px; }
}
@media (max-width: 560px) {
  .rr { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .rr-head { display: none; }
  .rr-c:nth-of-type(1) li .d::before { content: "United States, "; }
  .rr-c:nth-of-type(2) li .d::before { content: "China, "; }
  .rr-c:empty { display: none; }

  .status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend, .attempts { grid-template-columns: minmax(0, 1fr); }
  .attempts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .further { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
