@media (min-width:768px){
     .footer-grid{
         grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,2fr);
    }
}
 .footer-card{
     background:var(--home-panel-bg);
     border:1px solid transparent;
     padding:16px;
     -webkit-mask:none;
     mask:none;
}
 .footer-bottom{
     display:flex;
     flex-wrap:wrap;
     gap:8px 16px;
     justify-content:space-between;
     align-items:center;
     padding-top:12px;
     border-top:1px solid var(--border-soft);
     font-size:11px;
}
 .site-footer a{
     color:var(--muted-foreground);
     text-decoration:underline;
     text-underline-offset:3px;
}
 .go-top{
     position:fixed;
     right:max(20px,calc((100vw - var(--max)) / 2 - 56px));
     bottom:var(--go-top-bottom,20px);
     width:39.6px;
     height:39.6px;
     border-radius:0;
     background:var(--category-pill-bg);
     color:var(--foreground);
     border:1px solid transparent;
     display:grid;
     place-items:center;
     cursor:pointer;
     box-shadow:none;
     opacity:0;
     pointer-events:none;
     transition:opacity .2s ease,transform .2s ease;
     z-index:40;
     font-size:19.8px;
}
 .go-top-arrow{position:relative;z-index:1;line-height:1}
 .go-top-progress{position:absolute;inset:0;width:100%;height:100%;display:none;overflow:visible;pointer-events:none}
 .go-top.has-reading-progress .go-top-progress{display:block}
 .go-top-progress-track{stroke:var(--border-soft);opacity:.55}
 .go-top-progress-bar{stroke:var(--foreground);stroke-dasharray:88;stroke-dashoffset:88;stroke-linecap:round;transition:stroke-dashoffset .12s linear}
 .go-top.show{
     opacity:1;
     pointer-events:auto;
}
 .alert{
     padding:14px 16px;
     border-radius:0;
     border:0;
     border-left:4px solid var(--border);
     margin:16px 0;
     font-size:14px;
}
 .alert-info{
     background:color-mix(in oklab, #5a8fb5 6%, var(--card));
     border-left:4px solid #5a8fb5;
}
 .alert-success{
     background:color-mix(in oklab, #6a9e6a 6%, var(--card));
     border-left:4px solid #6a9e6a;
}
 .alert-warning{
     background:color-mix(in oklab, #d4a017 6%, var(--card));
     border-left:4px solid #d4a017;
}
 .alert-danger{
     background:color-mix(in oklab, #c27a7a 6%, var(--card));
     border-left:4px solid #c27a7a;
}
 #matrixCanvas{
     width:100%;
     height:100%;
     display:block;
}
 @keyframes livePulse{
     0%,100%{
         opacity:1;
         transform:scale(1);
    }
     50%{
         opacity:0.45;
         transform:scale(0.85);
    }
}
 @media (max-width:768px){
     .footer-card:nth-child(1){
         min-height:140px !important;
    }
}


.lang-switch-toggle{ display:grid; place-items:center; width:26px; height:26px; border-radius:999px; color:var(--muted-foreground); border:none; background:transparent; padding:0; font:inherit; cursor:pointer; }
.lang-switch-toggle:hover{ color:var(--foreground); }
.lang-switch-menu{ top:auto; bottom:100%; left:auto; right:0; margin-bottom:8px; min-width:140px; }
.lang-switch-menu a.active{ color:var(--foreground); font-weight:700; }
.lang-switch-menu a.active:hover{ color:var(--background); }



/* Guess the Vulnerability - footer quiz */
.gtv-opt{ display:block; width:100%; text-align:left; font-size:10px;
  background:transparent; color:var(--foreground); border:1px solid color-mix(in oklab, var(--border) 40%, transparent); padding:5px 7px;
  margin-top:4px; cursor:pointer; }
.gtv-opt:hover:not(:disabled){ border-color:var(--foreground); }
.gtv-opt:disabled{ cursor:default; opacity:.7; }
.gtv-opt.gtv-correct{ border-color:#7ee787; color:#7ee787; opacity:1; }
.gtv-opt.gtv-wrong{ border-color:#ff6b6b; color:#ff6b6b; opacity:1; }
.gtv-hi{ color:#7ee787; }
.gtv-bad{ color:#ff6b6b; }
.gtv-body{ flex:1; padding:10px 12px; font-size:10px; display:flex; flex-direction:column; justify-content:center; gap:5px; }
/* static/js/footer-widgets.js replaces .gtv-body's children wholesale (a fresh question, or
   the final score card) via innerHTML rather than transitioning individual elements, so
   there's nothing for a plain CSS transition to animate between. footer-widgets.js instead
   toggles this class off then back on around each swap (forcing a reflow in between) to
   restart the @keyframes fade on the container itself each time. */
.gtv-body.gtv-fade{
  animation:gtvFadeIn .3s ease;
}
@keyframes gtvFadeIn{
  from{ opacity:0; transform:translateY(4px); }
  to{ opacity:1; transform:translateY(0); }
}
.gtv-code{ margin:0 0 6px; white-space:pre-wrap; opacity:.9; }
.gtv-feedback{ min-height:14px; font-size:9.5px; margin-top:4px; }
.gtv-progress{ font-size:9px; opacity:.6; }
.gtv-done{ text-align:center; }
.gtv-done-score{ font-size:12px; margin-bottom:4px; }
.gtv-done-verdict{ font-size:9.5px; opacity:.7; margin-bottom:8px; }
.gtv-replay{ display:inline-block; width:auto; padding:5px 14px; }

/* Footer diagnostics/stats panels - shared skeleton for the three footer-card widgets */
.footer-card--panel{ overflow:hidden; padding:0; display:flex; flex-direction:column; min-height:132px; }
/* Wraps each card's header+body (footer.html) so .footer-card itself can stay at padding:0 -
   its border+mask notch (above) needs zero self-padding to line up cleanly, per the
   structure this was ported from: border+mask on an unpadded box, padding on a plain
   child instead. flex:1/column passes .footer-card--panel's flex context through so
   .diag-grid/.gtv-body/.stats-body's own flex:1 still stretches to fill the card as before. */
.padding-footer{ display:flex; flex-direction:column; flex:1; padding:15px; }
/* Plain headers: spacing separates them from the body without another divider. */
.footer-card-header{ margin:0; padding:6px 10px; padding-bottom:0; border-bottom:none; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted-foreground); }
.footer-card-header--split{ display:flex; justify-content:space-between; align-items:center; }

.diag-grid{ padding:8px; flex:1; overflow:hidden; display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; font-size:10px; line-height:1.4; align-content:start; }
.diag-row{ display:flex; justify-content:space-between; gap:8px; }
.diag-row--wide{ grid-column:1 / -1; margin-top:6px; padding-top:6px; }
.diag-label{ color:var(--muted-foreground); }
.diag-label--shrink{ flex-shrink:0; }
.diag-value{ color:var(--foreground); }
.diag-value--host{ overflow:hidden; text-overflow:ellipsis; max-width:90px; }
.diag-value--useragent{ font-size:8px; line-height:1.2; word-break:break-all; text-align:right; max-width:62%; opacity:0.85; }

.stats-body{ flex:1; padding:10px 12px; font-size:10.5px; line-height:17px; color:color-mix(in oklab, var(--foreground) 88%, transparent); display:flex; flex-direction:column; justify-content:center; }
.stats-row{ display:flex; justify-content:space-between; }
.stats-label{ opacity:.6; }

.fs-flag{ color:var(--foreground); opacity:0.96; font-weight:700; background:color-mix(in oklab, var(--foreground) 14%, transparent); padding:0 1px; border-radius:1px; }

.footer-bottom-right{ display:flex; gap:12px; align-items:center; }
.footer-subtext{ font-size:11px; letter-spacing:.14em; text-transform:uppercase; }

.site-footer .footer-rss {display:inline-flex;align-items:center;gap:6px;text-decoration:none;}

.footer-rss svg {flex:none;}

.go-top:hover {transform:translateY(-2px);
  background:var(--category-pill-hover-bg);
}

.go-top:focus-visible {outline:2px solid var(--foreground);outline-offset:3px;}
