/* Layout and theme bindings; the supplied motion curves are preserved. */
.segments.og-switch { position: relative; }
#stats-period, #analytics-period, #periods,
.og-switch:has([data-panel-theme]), .og-switch:has([data-admin-theme]) {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0,1fr);
}
.og-switch > button { position: relative; z-index: 1; }
.og-switch > button:is([aria-pressed="true"],[aria-current="page"]) { background: transparent; box-shadow: none; }
.og-ind {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  border-radius: 6px;
  background: var(--seg-on);
  box-shadow: var(--seg-shadow);
  pointer-events: none;
  transition: transform var(--sp-sel), width var(--sp-sel), height var(--sp-sel), opacity 200ms ease;
}
.side-nav.og-switch { position: relative; }
.side-nav > .og-ind { background: var(--nav-on); box-shadow: none; }
.og-vertical > .og-ind { top: 0; bottom: auto; right: 0; }
dialog[open] { animation: ogDialog var(--sp-dialog) both, ogFadeIn 400ms var(--e-soft) both; }
dialog[open]::backdrop { animation: ogScrim 400ms var(--e-soft) both; }
.logs-drawer[open] { animation: ogDrawer 400ms var(--e-soft) both, ogFadeIn 400ms var(--e-soft) both; }
.og-leaving { overflow: hidden; min-height: 0; pointer-events: none; }
.og-progress { transition: width var(--sp-progress), flex-grow var(--sp-progress); }
.chart-column > div, .latency-histogram > i { transition: height var(--sp-progress); }
progress.og-progress-native::-webkit-progress-value { transition: width var(--sp-progress); }
progress.og-progress-native::-moz-progress-bar { transition: width var(--sp-progress); }
.heatmap i { transition: background-color 300ms ease; }
.auth-preview-bars i { transform-origin: bottom; }
.auth-check { animation: ogCheck var(--sp-check) 200ms both; }
.auth-spinner { animation: ogSpin 1s linear infinite; }
.og-pause > svg { flex: none; width: 12px; height: 12px; }
.og-auditing tbody tr { animation: ogBreath 1.2s var(--e-inout) infinite; }
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html[data-motion="off"] button:active, html[data-motion="off"] a:active { transform: none; }
@media (max-width: 760px) {
  .side-nav.og-switch { position: fixed; }
  .side-nav > .og-ind { top: 6px; bottom: calc(6px + env(safe-area-inset-bottom)); border-radius: var(--r-btn); }
}
@media (prefers-reduced-motion: reduce) {
  .og-enter > *, .og-stagger > *, dialog[open], dialog[open]::backdrop {
    animation-duration: 120ms;
    animation-delay: 0s !important;
  }
  .og-auditing tbody tr, .auth-spinner { animation: none !important; }
  .heatmap i, progress::-webkit-progress-value, progress::-moz-progress-bar { transition: none !important; }
}

/* Count visible sections only; hidden notices do not introduce empty beats. */
.og-enter > :nth-child(n) { animation-delay: var(--og-enter-delay, 0ms); }
/* Give spring overshoot room without introducing transient scrollbars. */
.heatmap-scroll { overflow-y: hidden; padding: 2px; margin: -2px; }
@media (min-width: 761px) {
  .heatmap-scroll { scrollbar-width: none; }
  .heatmap-scroll::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .og-enter > :nth-child(n) { animation-delay: 0ms !important; }
}

/* Theme tokens: ordinary text inherits the root colour, without leaf transitions. */
:root.og-theming { transition: background-color 280ms ease, color 280ms ease; }
.og-theming .og-surface { transition: background-color 280ms ease, border-color 280ms ease; }
.og-theming .og-ink { transition: color 280ms ease; }
.og-theming .og-surface.og-ink { transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease; }
/* Keep interaction/graph motion independent of the colour transition. */
.og-theming :is(button,a).og-surface.og-ink { transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease, transform var(--sp-press), opacity 200ms ease; }
.og-theming .og-ind { transition: background-color 280ms ease, border-color 280ms ease, transform var(--sp-sel), width var(--sp-sel), height var(--sp-sel), opacity 200ms ease; }
.og-theming .chart-column > .og-surface, .og-theming .latency-histogram > .og-surface { transition: background-color 280ms ease, border-color 280ms ease, height var(--sp-progress); }
.og-theming .og-progress.og-surface { transition: background-color 280ms ease, border-color 280ms ease, width var(--sp-progress), flex-grow var(--sp-progress); }
.og-theming :is(input,textarea).og-ink::placeholder { transition: color 280ms ease; }
@media (prefers-reduced-motion: reduce) {
  :root.og-theming, .og-theming :is(.og-surface,.og-ink) { transition: none; }
}
.og-theming dialog.og-surface::backdrop { transition: background-color 280ms ease; }
.og-theming progress.og-surface::-webkit-progress-bar { transition: background-color 280ms ease; }
.og-theming progress.og-surface::-webkit-progress-value { transition: background-color 280ms ease, width var(--sp-progress); }
.og-theming progress.og-surface::-moz-progress-bar { transition: background-color 280ms ease; }
@media (prefers-reduced-motion: reduce) {
  .og-theming dialog.og-surface::backdrop,
  .og-theming progress.og-surface::-webkit-progress-bar,
  .og-theming progress.og-surface::-webkit-progress-value,
  .og-theming progress.og-surface::-moz-progress-bar { transition: none; }
}

/* Exact twins used to restart a wave without offsetWidth/layout flushing. */
@keyframes ogPopReplay{from{opacity:0;transform:scale(.8);filter:blur(2px)}}
@keyframes ogBarReplay{from{transform:scaleY(0)}}
@keyframes ogFadeInReplay{from{opacity:0}}
@media(prefers-reduced-motion:reduce){
 @keyframes ogPopReplay{from{opacity:0;filter:blur(2px)}}
 @keyframes ogBarReplay{from{opacity:0}}
}
