/* ==========================================================================
   Spexo — Site Footer
   Multi-column responsive footer: brand + blurb, nav link groups, and a
   bottom legal bar. Also carries the required speed-test data disclosure.
   ========================================================================== */
.site-footer{
  position:relative; z-index:1; margin-top:60px;
  border-top:1px solid var(--panel-border);
  background:linear-gradient(180deg, transparent, var(--footer-tint));
}
.footer-inner{ max-width:var(--content-max); margin:0 auto; padding:44px 20px 26px; }

.footer-grid{
  display:grid; grid-template-columns:1.3fr 0.85fr 0.95fr 1.1fr 0.95fr; gap:28px;
}
@media (max-width:1020px){ .footer-grid{ grid-template-columns:1fr 1fr 1fr; row-gap:28px; } }
@media (max-width:700px){ .footer-grid{ grid-template-columns:1fr 1fr; row-gap:28px; } }
@media (max-width:480px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-brand{ grid-column:span 1; }
@media (max-width:1020px){ .footer-brand{ grid-column:1 / -1; } }

.footer-brand .logo-chip{ margin-bottom:12px; }
.footer-brand img.brand-logo{ height:44px; width:auto; display:block; }
.footer-brand p{ color:var(--text-low); font-size:13px; line-height:1.7; max-width:280px; margin:0; }

.footer-col h4{
  font-family:'JetBrains Mono',monospace; font-size:11px; letter-spacing:0.1em; text-transform:uppercase;
  color:var(--text-low); margin:0 0 14px;
}
.footer-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.footer-col a{ color:var(--text-mid); text-decoration:none; font-size:13.5px; transition:color .2s; display:inline-block; min-height:22px; }
@media (hover:hover) and (pointer:fine){
  .footer-col a:hover{ color:var(--cyan); }
}

.footer-bottom{
  margin-top:36px; padding-top:20px; border-top:1px solid var(--panel-border);
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.footer-legal-links{ display:flex; gap:16px; flex-wrap:wrap; }
.footer-legal-links a{ color:var(--text-low); font-size:12px; text-decoration:none; font-family:'JetBrains Mono',monospace; padding:4px 0; }
@media (hover:hover) and (pointer:fine){
  .footer-legal-links a:hover{ color:var(--text-mid); }
}
.footer-copyright{ color:var(--text-low); font-size:12px; font-family:'JetBrains Mono',monospace; }

.footer-disclosure{
  margin-top:22px; padding-top:18px; border-top:1px solid var(--hairline);
  color:var(--text-low); font-size:11.5px; font-family:'JetBrains Mono',monospace; letter-spacing:0.01em; line-height:1.8;
}

@media (max-width:600px){
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
}

/* Large screens / smart TVs */
@media (min-width:1600px){
  .footer-inner{ max-width:1360px; }
  .footer-col a, .footer-brand p{ font-size:14.5px; }
}

/* Cross-device hardening */
html{overflow-x:hidden;}
img,svg,canvas,video{max-width:100%;}
button,input,select,textarea{max-width:100%;}
@media(max-width:700px){
  .wrap{width:100%;box-sizing:border-box;}
  .graph-card,.history-card{padding:16px 14px;}
  .graph-head,.history-head{align-items:flex-start;}
  .controls{width:100%;}
  .start-btn{width:min(100%,360px);padding:14px 28px;}
  .progress-track{width:min(100%,360px);}
}
@media(max-width:520px){
  .hero{padding-top:8px;}
  .hero p{font-size:14px;margin-bottom:22px;}
  .gauge-shell{width:min(360px,94vw);}
  .dashboard{grid-template-columns:1fr 1fr!important;}
  .card{padding:14px 12px;}
  .card-value{font-size:22px;}
  .connection-details{gap:10px;}
  .history-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .history-actions{flex-wrap:wrap;}
}
@media(max-width:380px){
  .dashboard{grid-template-columns:1fr!important;}
  .quick-stats{gap:16px;width:100%;}
  .gauge-shell{width:92vw;}
}

/* Theme-aware footer logo visibility guard. Keep this in footer.css because it
   is loaded after header.css on content/legal pages. */
.site-footer .footer-brand .logo-chip img.logo-for-light { display: block !important; }
.site-footer .footer-brand .logo-chip img.logo-for-dark { display: none !important; }
:root[data-theme="dark"] .site-footer .footer-brand .logo-chip img.logo-for-light { display: none !important; }
:root[data-theme="dark"] .site-footer .footer-brand .logo-chip img.logo-for-dark { display: block !important; }
