/* Phone reading and touch rules, applied after the collection styles. */
@media (max-width:760px) {
  /* Keep iOS form focus at the user's chosen page scale. Do not disable zoom. */
  body input:not([type=range]):not([type=checkbox]):not([type=radio]),
  body select, body textarea { font-size:16px!important; min-height:44px; min-width:0; max-width:100%; }
  body button, body summary { min-height:44px!important; min-width:44px; font-size:14px!important; }
  body main label { font-size:14px!important; }
  body main figcaption { font-size:14px!important; line-height:1.65; flex-wrap:wrap; }
  .ww-hero-art figcaption span { font-size:14px!important; }
  .ww-graphic figcaption { align-items:flex-start; }
  .ww-graphic figcaption a,.al-diagram figcaption a { min-height:44px; }
  .ww-graphic figcaption b { margin-left:8px; }
  .nav #navigation a { min-width:44px; }
  #reading-dialog { width:calc(100% - 24px); max-width:460px; max-height:90dvh; padding:20px; }
  #reading-dialog .dialog-head { align-items:flex-start; gap:12px; }
  #reading-dialog .dialog-head>div { min-width:0; }
  #reading-dialog .dialog-head h2 { font-size:28px; line-height:1.2; }
  #reading-dialog .dialog-head button { flex:none; }
  #reading-dialog>p { font-size:16px; line-height:1.65; }
  #reading-dialog .saved-item { display:grid; grid-template-columns:64px minmax(0,1fr); gap:10px 12px; align-items:start; }
  #reading-dialog .saved-item>a:first-child { width:64px; }
  #reading-dialog .saved-item>a:nth-child(2) { min-width:0; font-size:20px; line-height:1.3; overflow-wrap:anywhere; }
  #reading-dialog .saved-item small { font-size:12px; line-height:1.5; }
  #reading-dialog .saved-item button { grid-column:2; justify-self:start; width:auto; padding:6px 10px; display:flex; gap:7px; }
  #reading-dialog .saved-item button:after { content:'Remove'; font-size:14px; }
  main nav a { min-height:44px!important; min-width:44px!important; align-content:center; }
  .al-breadcrumb,.u9-breadcrumb,.bk-breadcrumb,.tb-breadcrumb { flex-wrap:wrap; row-gap:0; }
  .bk-jump { row-gap:4px; }
  .essay-sidebar a { min-height:44px; }
  .tb-card-topic,.tb-number { font-size:12px!important; }
  .tb-card-copy>p { font-size:14px!important; }
  .tb-results-line>p,.tb-more p,.tb-hub-link,.tb-read { font-size:14px; }
  .tb-archive-head { gap:20px; }
  .ra-inspect { grid-template-columns:minmax(0,1fr); }
  .ra-inspect>* { min-width:0; }
  .ra-inspect strong { font-size:clamp(24px,7.5vw,34px); overflow-wrap:anywhere; }
  .tb-results-line { flex-wrap:wrap; gap:4px 16px; }
  .dx-small,.fl-chart-hint,.fl-small,.fl-results,.atlas-caption,.human-note,
  .chart-scroll-note,.ww-page .ww-small,.ww-lens p,.ra-poster-unit,#ra-map-sub,
  .ra-map-note,.dx-page .ra-small,.ra-result,.tl-image-note,.mx-lab-caveat,
  .al-small,.al-spec-section>.al-heading>p,.al-cabin-facts p,.al-spec-note p,.al-sources p,.u9-callout p,
  .u9-sources p,.wa-footnote,.wa-image-note p,.wa-sources li p,.wa-sources>p,
  .bk-small,.bk-questions>p,.bk-sources li>p,.bk-intro aside p,.hist-count,
  .moat-ticker,.en-search-row>p,.sc-orbit-chart li,.cu-bars li { font-size:14px!important; }
  .ww-lens p { line-height:1.75; }
  .ww-source,.ww-sources a,.ww-sources strong,.al-sources li span,.bk-sources li>span { font-size:14px; line-height:1.65; }
  .ww-source { min-height:44px; align-content:center; }
  /* A long badge name should wrap inside its card, never widen the page. */
  .auto-brand-card,.auto-brand-card>* { min-width:0; overflow-wrap:anywhere; }
  .auto-brand-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  main :is(h1,h2,h3,h4,p,li,dd,dt) { overflow-wrap:break-word; }
  main :is(.sources,.essay-references,.al-sources,.bk-sources) a { overflow-wrap:anywhere; }
  /* Viewer actions stay reachable above phone browser bars and safe areas. */
  dialog { max-width:100%; }
  .vector-reader-head,.gold-viewer-head,.silver-viewer-head,
  .auto-viewer>header,.cu-viewer>header,.wa-viewer>header { min-width:0; }
  .vector-reader-head h2 { overflow-wrap:anywhere; font-size:18px; line-height:1.3; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  .vector-reader-head button { flex:none; white-space:nowrap; }
  .vector-reader-foot,.gold-viewer-foot,.silver-viewer-foot,
  .auto-viewer>footer,.cu-viewer>footer,.wa-viewer>footer { padding-bottom:max(12px,env(safe-area-inset-bottom)); }
}
@media(max-width:430px) { .auto-brand-grid { grid-template-columns:minmax(0,1fr); } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
