/* Shared theme control. Page-specific styles provide the colours. */
:root { color-scheme: light; }
html.dark { color-scheme: dark; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: .65rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: .82;
  transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.theme-toggle:hover {
  background: rgb(127 127 127 / .14);
  opacity: 1;
  transform: translateY(-1px);
}

.theme-toggle:active { transform: translateY(1px); }
.theme-toggle:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

@media (max-width: 640px) {
  .theme-toggle { width: 2.2rem; height: 2.2rem; }
}

@media print {
  .theme-toggle { display: none !important; }
}
