.statistics-panel[hidden] { display: none !important; }
.statistics-panel {
  position: fixed; inset: auto 16px 16px; z-index: 1000;
  width: min(660px, calc(100% - 32px)); margin: 0 auto;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: auto; padding: 24px; background: #f7f5ee; color: #263c30;
  border: 1px solid #354b3c; border-radius: 8px;
  box-shadow: 0 8px 32px #0003; font: 15px/1.5 Arial, sans-serif;
}
.statistics-panel h2 { margin: 0 32px 12px 0; font-size: 21px; line-height: 1.25; }
.statistics-panel p { margin: 10px 0; }
.statistics-panel a { color: #263c30; text-decoration: underline; }
.statistics-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.statistics-actions button {
  flex: 1 1 200px; padding: 12px 16px; min-height: 46px;
  border: 1px solid #354b3c; border-radius: 4px;
  background: #354b3c; color: #fff; font: 600 15px/1.3 Arial, sans-serif;
  cursor: pointer;
}
.statistics-close {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px;
  border: 0; background: transparent; color: #263c30;
  font-size: 26px; cursor: pointer;
}
.statistics-panel button:focus-visible, .statistics-panel a:focus-visible {
  outline: 3px solid #9b5b31; outline-offset: 3px;
}
.statistics-status { font-size: 13px; }
.shinystat-slot { text-align: center; margin: 10px auto; font-size: 12px; }
.shinystat-slot img { width: auto; height: auto; max-width: 100%; }
.legal-copy .statistics-preferences {
  padding: 10px 14px; border: 1px solid currentColor; border-radius: 4px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
@media (max-width: 420px) {
  .statistics-panel { padding: 20px 16px; }
  .statistics-actions { gap: 8px; }
}
