/* Home responsive status pass: browser zoom changes CSS viewport width.
   Let grid tracks shrink; never stretch the WOTD card into unused rows. */
body[data-current-view="home"] #content .h162-root{
  min-width:0;
}
body[data-current-view="home"] #content .h162-root .h162-primary{
  display:grid!important;
  grid-template-columns:minmax(0,1.65fr) minmax(335px,.85fr)!important;
  grid-template-rows:auto!important;
  align-items:start!important;
  min-width:0!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary > .h162-card{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box;
}
body[data-current-view="home"] #content .h162-root .h162-primary .h162-wotd{
  grid-column:1!important;
  grid-row:1!important;
  align-self:start!important;
  height:auto!important;
  min-height:0!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary .h162-status{
  grid-column:2!important;
  grid-row:1!important;
  align-self:start!important;
  height:auto!important;
  min-height:0!important;
}
/* Preserve optional Video of the Week in the right column without making
   an empty second grid row when the video is disabled. */
body[data-current-view="home"] #content .h162-root .h162-primary:has(>.h162-votw){
  grid-template-rows:auto auto!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary:has(>.h162-votw) .h162-wotd{
  grid-row:1/span 2!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary:has(>.h162-votw) .h162-votw{
  grid-column:2!important;
  grid-row:2!important;
  height:auto!important;
  align-self:start!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary .h162-wotd .h162-world-foot{
  margin-top:10px!important;
  padding-top:0!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary .h162-wotd .h162-world-photo{
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  height:auto!important;
  aspect-ratio:auto!important;
  overflow:hidden!important;
}
body[data-current-view="home"] #content .h162-root .h162-primary .h162-wotd .h162-world-photo img{
  display:block;
  width:100%!important;
  height:auto!important;
  max-width:100%!important;
  max-height:none!important;
  object-fit:contain!important;
}
/* The chart now has its own stable box; browser zoom or a narrow card never
   creates a viewport-sized SVG or overlaps the stats underneath it. */
body[data-current-view="home"] #content .h162-status .h245-server-history{
  min-width:0!important;
  overflow:hidden!important;
}
body[data-current-view="home"] #content .h162-status .h245-server-history .h165-history-head{
  display:flex!important;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 12px;
}
body[data-current-view="home"] #content .h162-status .h245-history-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-left:auto;
  min-width:0;
}
body[data-current-view="home"] #content .h162-status .h245-history-range{
  display:inline-flex;
  align-items:center;
  padding:3px;
  gap:3px;
  border-radius:9px;
  background:rgba(11,35,69,.5);
  border:1px solid rgba(145,205,249,.24);
}
body[data-current-view="home"] #content .h162-status .h245-history-range button{
  cursor:pointer;
  border:1px solid transparent;
  background:transparent;
  color:#a9c8e8;
  font-weight:850;
  font-size:10px;
  letter-spacing:.02em;
  padding:5px 9px;
  min-width:37px;
  min-height:29px;
  border-radius:6px;
}
body[data-current-view="home"] #content .h162-status .h245-history-range button[aria-pressed="true"]{
  border-color:rgba(157,224,254,.43);
  background:linear-gradient(145deg,rgba(101,180,255,.29),rgba(42,92,160,.38));
  color:#f0fbff;
  box-shadow:inset 0 1px rgba(255,255,255,.20);
}
body[data-current-view="home"] #content .h162-status .h245-history-range button:focus-visible,
body[data-current-view="home"] #content .h162-status #h165-server-chart:focus-visible{
  outline:2px solid #a1e5ff;
  outline-offset:2px;
}
body[data-current-view="home"] #content .h162-status .h245-chart-shell{
  position:relative;
  box-sizing:border-box;
  width:100%;
  height:clamp(138px,12vw,176px);
  min-width:0;
  min-height:0;
  isolation:isolate;
}
body[data-current-view="home"] #content .h162-status .h245-server-history #h165-server-chart{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
  box-sizing:border-box;
  cursor:crosshair;
  touch-action:pan-y;
}
body[data-current-view="home"] #content .h162-status .h245-chart-tooltip{
  position:absolute;
  top:2px;
  z-index:5;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:7px 9px;
  min-width:max-content;
  max-width:calc(100% - 12px);
  transform:translateX(-50%);
  pointer-events:none;
  white-space:nowrap;
  color:#eafaff;
  background:rgba(7,28,55,.95);
  border:1px solid rgba(158,224,255,.52);
  border-radius:8px;
  box-shadow:0 6px 18px rgba(1,12,30,.35);
  font-size:10px;
}
body[data-current-view="home"] #content .h162-status .h245-chart-tooltip[hidden]{
  display:none!important;
}
body[data-current-view="home"] #content .h162-status .h245-chart-tooltip strong{
  font-size:12px;
  color:#f0fbff;
  font-variant-numeric:tabular-nums;
}
body[data-current-view="home"] #content .h162-status .h245-chart-tooltip span{color:#a9cbe8;}
body[data-current-view="home"] #content .h162-status .h245-history-axis{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 2px;
  margin:1px 0 9px;
  color:#91b4d2;
  font-size:9px;
  font-variant-numeric:tabular-nums;
}
body[data-current-view="home"] #content .h162-status .h245-server-chart-meta{
  min-width:0;
}
/* The supplied 80×80 pixel sprites are the genuine green/red status markers.
   Unknown status stays neutral: do not show a misleading green/red indicator. */
body[data-current-view="home"] #content .h162-status .h245-server-badge .h245-signal-sprite{
  width:26px!important;
  height:26px!important;
  flex:0 0 26px;
  object-fit:contain;
  image-rendering:pixelated;
}
body[data-current-view="home"] #content .h162-status .h245-server-badge{
  padding:5px 10px!important;
  min-height:37px;
}
body[data-current-view="home"] #content .h162-status .h245-server-source{
  gap:5px!important;
}
body[data-current-view="home"] #content .h162-status .h245-source-pulse{
  width:7px;height:7px;
  border-radius:50%;
  background:#91d7ff;
  box-shadow:0 0 0 3px rgba(145,215,255,.12);
  flex:0 0 7px;
}
body[data-current-view="home"] #content .h162-status .h245-status-explanation{
  font-size:11px!important;
  line-height:1.4!important;
  margin:2px 0!important;
  color:#d0e6f9!important;
}
body[data-current-view="home"] #content .h162-status .h245-server-source small{
  font-size:9px!important;
  line-height:1.35!important;
}
@container (max-width:540px){
  .h245-server-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .h245-server-top{
    flex-direction:row!important;
    align-items:center!important;
  }
  .h245-server-primary,.h245-server-source{
    min-height:0!important;
    padding:10px!important;
  }
  .h245-server-primary .h245-stat-icon{
    display:none!important;
  }
}
@container (max-width:415px){
  .h245-server-summary{
    grid-template-columns:minmax(0,1fr)!important;
  }
}
@media(max-width:1020px){
  body[data-current-view="home"] #content .h162-root .h162-primary{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:none!important;
    gap:14px!important;
  }
  body[data-current-view="home"] #content .h162-root .h162-primary > :is(.h162-wotd,.h162-status,.h162-votw){
    grid-column:1!important;
    grid-row:auto!important;
    height:auto!important;
  }
}
@media(max-width:620px){
  body[data-current-view="home"] #content .h162-status .h245-history-actions{
    margin-left:0;
  }
  body[data-current-view="home"] #content .h162-status .h245-chart-shell{
    height:140px!important;
  }
  body[data-current-view="home"] #content .h162-status .h245-history-range button{
    min-height:33px;
    padding:6px 10px;
  }
}
@media(prefers-reduced-motion:reduce){
  body[data-current-view="home"] #content .h162-status .h245-history-range button{
    transition:none!important;
  }
}
