/*
  Shared by every page of decibelmeter.dev: colour tokens for both themes, the header with the theme
  switch, the footer. The theme follows the system unless the visitor picked one: theme.js puts it
  on <html data-theme>. The dark tokens are written twice, for each of the two ways to get there.
*/
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --line: #E4E7EC;
  --text: #12151B;
  --muted: #5A6372;
  --accent: #2456E0;
  --accent-hover: #1D4ACB;
  --accent-soft: #E9EFFD;
  --accent-text: #1D4ACB;
  --toolbar: #DFE3EA;
  --omnibox: #FFFFFF;
  --icon: #474F5D;
  --panel: #FFFFFF;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 8px 24px rgb(16 24 40 / 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E1117;
    --card: #171B23;
    --line: #2A303B;
    --text: #EEF1F5;
    --muted: #A3ACBA;
    --accent: #5B83F0;
    --accent-hover: #7396F3;
    --accent-soft: #1D2A4A;
    --accent-text: #9DB6FF;
    --toolbar: #2A2F38;
    --omnibox: #1C2028;
    --icon: #C7CDD6;
    --panel: #232831;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1117;
  --card: #171B23;
  --line: #2A303B;
  --text: #EEF1F5;
  --muted: #A3ACBA;
  --accent: #5B83F0;
  --accent-hover: #7396F3;
  --accent-soft: #1D2A4A;
  --accent-text: #9DB6FF;
  --toolbar: #2A2F38;
  --omnibox: #1C2028;
  --icon: #C7CDD6;
  --panel: #232831;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
}

/* Pictures and icons drawn for one theme: .only-light and .only-dark. Only ever hidden, so each
   keeps its own display. */
:root[data-theme="light"] .only-dark,
:root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .only-dark { display: none !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .only-light { display: none !important; } }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); }

.site-header { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand {
  display: flex; align-items: center; gap: 12px; margin-right: auto;
  color: inherit; text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -0.01em;
}
.brand img { width: 40px; height: 40px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card); color: var(--icon);
  cursor: pointer; padding: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }

.site-footer { color: var(--muted); font-size: 14px; text-align: center; margin-top: 28px; }
.site-footer a { color: inherit; }
