/* Advertise both themes up front so browsers can prefer the site's palette. */
:root { color-scheme: light dark; }
:root[data-theme-choice="light"] { color-scheme: only light; }
:root[data-theme-choice="dark"] { color-scheme: only dark; }
:root[data-site-theme="dark"] {
  --dark-surface: #593120;
  --dark-text: #fae6d1;
  --dark-muted: #efc7a0;
  --dark-accent: #fdf3e9;
  --dark-line: rgb(239 199 160 / 38%);
}

.theme-choice { display: none; }
[data-site-theme] .theme-choice {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .5rem;
  color: inherit;
  font: 400 .8125rem/1.25 Cascadia, monospace;
}

.theme-choice select {
  min-height: 44px;
  max-width: 100%;
  padding-inline: .375rem;
  color: inherit;
  font: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.theme-choice option { color: CanvasText; background: Canvas; }
[data-site-theme="dark"][data-table-menu] body {
  color: var(--dark-text);
  background: var(--dark-surface);
}
[data-table-menu] .wordmark--dark,
[data-site-theme="dark"][data-table-menu] .wordmark:not(.wordmark--dark) { display: none; }
[data-site-theme="dark"][data-table-menu] .wordmark--dark { display: block; }

.theme-toggle { display: none; }
[data-site-theme] .theme-toggle {
  display: grid;
  place-items: center;
  align-self: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .theme-toggle__sun,
[data-site-theme="dark"] .theme-toggle__moon { display: none; }
[data-site-theme="dark"] .theme-toggle__sun { display: block; }

.qr-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qr-header-actions a {
  min-inline-size: 44px;
  justify-content: center;
}
