/* Keep the desktop composition; reflow controls and reading surfaces on phones. */
.skip-link{position:fixed;top:8px;left:16px;z-index:100;padding:12px 18px;background:var(--panel);border:2px solid var(--accent);border-radius:8px;transform:translateY(-150%)}
.skip-link:focus{transform:none}
.mxpan{display:none}
.mobile-chart-hint{display:none}
.send:disabled,.chip:disabled{opacity:.5;cursor:not-allowed}
.jdialog-toolbar{display:contents}
#main-content{scroll-margin-top:80px}
@media (pointer:coarse){
  .chartbox .mxmap svg,.mxmap svg{touch-action:pan-y}
  .chartbox .mxmap svg.move-map,.mxmap svg.move-map{touch-action:none}
  .mxzoom .mxpan{display:block;font-size:12px}
}

@media (max-width:1020px){
  .view{scroll-margin-top:130px}
  #v-contribute .contrib-layout{grid-template-columns:minmax(0,1fr);gap:28px}
  #v-contribute .incident-form,#v-contribute .contrib-guide{min-width:0}
  .trends>*{min-width:0}
  .trends>aside{order:2}
}

@media (max-width:760px){
  .chartbox .mxmap svg,.mxmap svg{touch-action:pan-y;cursor:default;min-height:320px}
  .chartbox .mxmap svg.move-map,.mxmap svg.move-map{touch-action:none;cursor:grab}
  .mxzoom .mxpan{display:block;font-size:12px}
  .mxpan[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent-ink)}
  .mxlist{max-height:240px}
  .mxgrid>*{min-width:0}
  .mxinc-h,.nc-toolbar,.nc-list-head,.nc-list-head>div{flex-wrap:wrap}
  .nc-status{white-space:normal}
  .nc-overview,.nc-series-grid{grid-template-columns:minmax(0,1fr)}
  .nc-record-body{padding-left:0}
  .nc-source{grid-template-columns:minmax(0,1fr)}
  .nc-story>div{flex-wrap:wrap}
  .nc-story h4{max-width:100%}
  .nc-story li{grid-template-columns:minmax(0,1fr);gap:6px}
  .nc-record summary>span,.nc-breakdown span,.nc-series>span{min-width:0}
  .jbox{padding-top:16px}
  .jdialog-toolbar{display:flex;justify-content:flex-end;position:sticky;top:-16px;z-index:2;background:var(--panel);margin:-16px -20px 14px;padding:12px 20px;border-bottom:1px solid var(--line)}
  .jclose{position:static;float:none;margin:0}
  #joe-now{flex-wrap:wrap;gap:4px 10px}
}

@media (max-width:600px){
  body{margin:0}
  .bar{gap:8px;height:64px}
  .bar .brand{gap:6px;margin-right:auto;min-height:44px}
  .bar .brand b{font-size:16px}
  .bar .sp{display:none}
  .bar .mode{display:flex;padding:2px;gap:0}
  .mode button{width:44px;height:44px;padding:0;font-size:0}
  .mode button::before{font-size:20px;line-height:1}
  .mode button[data-m="light"]::before{content:"☀"}
  .mode button[data-m="dark"]::before{content:"☾"}
  .gh{width:44px;height:44px;padding:0;justify-content:center}
  .gh span{display:none}
  .tabs-m{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:8px 12px;overflow:visible}
  .tabs-m .tab{height:44px;padding:0 4px;font-size:12.5px}
  .view{padding-block:28px 48px;scroll-margin-top:176px}
  #main-content,#v-timeline .ent{scroll-margin-top:184px}
  .vhead{gap:14px}
  .ask h1{font-size:clamp(32px,9vw,42px)}
  .globe{height:270px}
  .globe svg.planet{width:260px;height:260px}
  .askbar{padding-left:14px;gap:8px}
  .send{width:44px;height:44px}
  .chip{min-height:44px;padding:10px 14px}
  .strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px;width:100%;margin-top:28px}
  .strip b{font-size:26px}
  .chatting .askdock{width:calc(100% - 24px);padding-bottom:max(12px,env(safe-area-inset-bottom));}
  .chatting .msg-a,.chatting .msg-u{scroll-margin-top:180px}
  .msg-a{grid-template-columns:24px minmax(0,1fr);gap:8px}
  .msg-a .av{width:24px;height:24px}
  .msg-a .body,.msg-u{overflow-wrap:anywhere}
  .ttabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
  .ttab{min-height:44px;padding:10px 6px}
  .ttab:nth-child(odd){border-left:0}
  .ttab:nth-child(n+3){border-top:1px solid var(--line)}
  .tpanel{padding:18px}
  .mobile-chart-hint{display:block;color:var(--muted);font-size:12px;margin:12px 0}
  .chart-scroll,.nc-chart{overflow-x:auto}
  #impsvg,.nc-chart>svg{min-width:560px}
  .nc-comparison-controls select,.nc-month-label select{font-size:16px;min-height:44px}
  .mxbar .seg button,.seg button{min-height:44px;height:auto;padding:8px 12px}
  .mxpiv button,.mxi,.mxzoom button,.mxsel-h button,.mxchip,.nc-segment button,.nc-link,.tg{min-height:44px}
  .mxzoom{position:relative;top:auto;right:auto;justify-content:center;margin-bottom:8px}
  .mxzoom button{min-width:44px}
  .mxmap .mxlegend{gap:8px 12px}
  .mxrow{overflow-wrap:anywhere}
  .range{height:44px}
  .range input{height:36px;top:0}
  .range input::-webkit-slider-thumb{width:32px;height:32px}
  .range input::-moz-range-thumb{width:28px;height:28px}
  .nc-ribbon{gap:14px}
  .nc-dot{width:24px;height:24px}
  .nc-record summary{flex-wrap:wrap;gap:8px}
  .nc-record summary time{width:100%}
  .nc-record-body,.nc-source{overflow-wrap:anywhere}
  #v-timeline .tl-date-tools{flex-direction:column;align-items:stretch;gap:10px}
  #v-timeline .tl-date-tools label{display:grid;gap:6px}
  #v-timeline select{margin-left:0;width:100%;font-size:16px;min-height:44px}
  .search{height:44px}
  .search input{font-size:16px}
  .co{min-height:44px;height:auto}
  .cite,.explain-record{min-height:44px;align-items:center}
  #asknote a{display:inline-flex;align-items:center;min-height:44px;color:var(--accent-ink)}
  #v-timeline .share-btn{width:44px;height:44px}
  #v-timeline .ent-actions{grid-template-columns:minmax(0,1fr)}
  #v-timeline .ent-actions .joe,.joe,.inline-cta{min-height:44px;height:auto;white-space:normal;padding-block:8px}
  .thr summary,.tl-correction{min-height:44px}
  .post .top{flex-wrap:wrap}
  .post .top .t{margin-left:0}
  .mixl{flex-wrap:wrap;gap:8px}
  .jsrcs,.jfacts,.jmeta{overflow-wrap:anywhere}
  .jbtn,.jbtn.main,.jclose{width:44px;height:44px}
  .jctl{gap:8px}
  #joe-count{display:block}
  #v-contribute .incident-form{padding:18px}
  #v-contribute .contrib-pair{grid-template-columns:minmax(0,1fr)}
  #v-contribute input:not([type=checkbox]),#v-contribute select,#v-contribute textarea{font-size:16px;min-height:44px}
  #v-contribute .contrib-consent{padding-block:8px}
  #v-contribute .contrib-consent input{width:24px;height:24px;flex:none}
  .doc-card a,.fl a{min-height:44px;display:inline-flex;align-items:center}
  .foot{gap:14px;align-items:flex-start}
  .fl{flex-wrap:wrap}
}

@media (max-width:360px){.bar .brand b{font-size:14px}}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}
