/* [polish1126] Site polish pass, staging only, Nov 26 2026. Loaded at the end of <head> on public pages by lib/polish1126.js. Some pages load their own CSS later in <body>, so rules that must win start with "html ".
   Removes dead white space and fixes phone layout. Undo: remove the [polish1126] lines in server.js. */

/* 1. Phones: the Sign in link shares the date row instead of taking a row of its own */
@media (max-width:640px){
  .masthead>.wrap{position:relative}
  .masthead .mx-acct{position:absolute;top:6px;right:12px;margin:0;z-index:2}
  .masthead .date-line{text-align:left;padding-right:96px;min-height:30px;display:flex;align-items:center}
}
@media (max-width:480px){
  .masthead .mx-acct .mx-badge .mx-t2{display:none}
}

/* 2. Phones: hub page hero bands. The emoji icon floats beside the heading instead of sitting in its own tall column */
@media (max-width:600px){
  .ex-banner:not(.scwp-banner){display:block}
  .ex-banner:not(.scwp-banner)>.ex-b-ic{float:left;font-size:1.6rem;line-height:1.15;margin:0 10px 2px 0;width:auto;height:auto;min-width:0}
  .ex3-banner>.ex-b-ic{width:40px;height:40px;display:flex;align-items:center;justify-content:center}
  .ex-banner:not(.scwp-banner)::after{content:"";display:block;clear:both}
}

/* 3. Phones and tablets: smaller Radar button, and room under the footer so it never covers the last content */
@media (max-width:768px){
  aside.rlaunch{scale:.82;transform-origin:100% 100%}
  html:not(.rl-off) body:has(aside.rlaunch) footer.footer{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
}

/* 4. Phones: /scan kept 96px of empty space at the end of the observations block for the Radar button; the footer now handles that */
@media (max-width:700px){
  html .obs{padding-bottom:20px}
}

/* 5. Phones: tighter section spacing on the instrument pages */
@media (max-width:600px){
  html body:has(.station-boundaries) section.guide{margin-top:22px;margin-bottom:22px}
  html .station-boundaries{margin-top:18px;padding-bottom:20px}
  html section.learning{margin-top:20px;margin-bottom:20px}
  html section.scw-keys.wrap,html section.scw-how.wrap{margin-top:26px}
}

/* 6. Sky Light Meter moon chart: the long left label ran into the "altitude" and "illumination %" legend; legend moved one line down */
html .chart.moon-compare text[x="70"][y="218"]{font-size:11px}
html .chart.moon-compare text[x="400"][y="218"],html .chart.moon-compare text[x="470"][y="218"]{font-size:12px;transform:translate(-60px,16px)}

/* 7. Phones: newsletter signup row. The email box was squeezed to about 100px; label on its own line, email box full width */
@media (max-width:480px){
  html .nl-slim-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
  html .nl-slim-row>.nl-slim-label{flex:1 0 100%;margin:0}
  html .nl-slim-row>input[type=email]{flex:1 1 0;min-width:0;width:auto}
  html .nl-slim-row>button{flex:0 0 auto}
}

/* 8. Newsletter topic chips: the checkbox sat above its label, making each chip about 47px tall; checkbox and label now share one line */
html .nl-chips .nl-chip{display:inline-flex;flex-direction:row;align-items:center;gap:6px}
html .nl-chips .nl-chip>input[type=checkbox]{display:inline-block;margin:0;flex:0 0 auto}
