/* Page-specific rules that sit on top of the design system (design-system/components.css),
   which is a copy of the external artifact and is not where page layout belongs. */

.ap-page { padding: var(--space-12) var(--space-4) var(--space-8); display: grid; gap: var(--space-6); max-width: 720px; margin: 0 auto; }
.ap-page > p.ap-lede { max-width: 65ch; color: var(--ink-muted); }

/* The phone list view: real 44px tap rows, since the map's own points are too small to tap. */
.ap-maplist { list-style: none; margin: 0; padding: 0; display: grid; }
.ap-maplist li { border-top: 1px solid var(--line); }
.ap-maplist a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; padding: var(--space-2) 0; color: var(--ink); text-decoration: none; }
.ap-maplist a:hover, .ap-maplist a:focus-visible { color: var(--signal); }

.ap-map a { cursor: pointer; }

/* Buttons never wrap their text by default in the browser's own stylesheet; the axis picker's
   dimension names are long enough that this alone drives the page wider than the phone's
   viewport. Let the text wrap inside the chamfered box instead of spilling past it. */
.ap-axis button { white-space: normal; text-align: center; }

/* The display heading is fixed at 52px for desktop; a long word like "PREDICTIONS" is wider than
   a phone viewport at that size and gets clipped rather than wrapped. Shrink it below 480px so the
   widest word always fits. */
@media (max-width: 480px) {
  .ap-display { font-size: clamp(28px, 9vw, 52px); line-height: 1.15; }
}

/* .ap-nav lays out the mark and the links in one unwrapped row; with five links that spills off a
   phone screen. Wrap both so every link stays reachable without a hidden hamburger. */
.ap-nav { flex-wrap: wrap; row-gap: var(--space-2); padding-block: var(--space-2); }
.ap-nav-links { flex-wrap: wrap; }
