#kc-header-wrapper .audit-tools {
  margin-inline-start: auto;
  --ink: var(--audit-ink);
  --muted: var(--audit-muted);
  --line: var(--audit-line);
  --accent: var(--audit-link);
  --button: var(--audit-accent);
  --accent-tint: #34305b;
}
:root[data-theme="light"] #kc-header-wrapper .audit-tools { --accent-tint: #efedff; }
@media (max-width: 440px) {
  #kc-header-wrapper > span { display: none; }
}
.theme-toggle { cursor: pointer; }

.audit-tools { display: flex; align-items: center; gap: clamp(6px, 1vw, 14px); }
.audit-clock { display: grid; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.3; }
.audit-clock b { color: var(--ink); font-size: .78rem; font-weight: 650; }
.audit-clock small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.theme-toggle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 30px);
  place-items: center;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--accent-tint);
  color: var(--muted);
}
.theme-toggle[hidden] { display: none; }
.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 30px;
  border-radius: inherit;
  background: var(--button);
  box-shadow: 0 1px 3px #17113033;
}
.theme-toggle[aria-pressed="true"]::before { transform: translateX(30px); }
.theme-toggle svg {
  position: relative;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle[aria-pressed="false"] svg:first-child,
.theme-toggle[aria-pressed="true"] svg:last-child { color: white; }
.theme-toggle:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .theme-toggle::before { transition: transform .18s ease-out; }
  .theme-toggle svg { transition: color .18s ease-out; }
}

