:root {
  color-scheme: dark;
  --bg: #050505;
  --fg: #ededed;
  --muted: #a7a7a7;
  --dim: #666;
  --line: #393939;
  --hot: #e8ff8f;
  --panel: #0c0c0c;
  --nav-bg: #030303;
  --selected-bg: #141414;
  --shadow: rgba(0, 0, 0, 0.48);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f0df;
  --fg: #302326;
  --muted: #735f62;
  --dim: #927c7e;
  --line: #cdbeb0;
  --hot: #7a1735;
  --panel: #f1e7d6;
  --nav-bg: #eee4d2;
  --selected-bg: #e7d8c3;
  --shadow: rgba(73, 42, 47, 0.18);
}

body {
  background-color: var(--bg);
  color: var(--fg);
}

a {
  color: var(--hot);
}

a:hover,
a:focus {
  color: var(--fg);
}

.side-nav,
.nav-toggle {
  background: var(--nav-bg);
}

.archive-box,
.box,
.preview {
  background: var(--panel);
  border-color: var(--line);
}

.preview-actions,
section {
  border-color: var(--line);
}

.tab-button[aria-selected="true"] {
  background: var(--selected-bg);
}

.theme-picker {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--nav-bg);
  color: var(--muted);
  box-shadow: 0 8px 24px var(--shadow);
  font: 13px/1.2 "Courier New", Courier, monospace;
}

.theme-picker select {
  min-height: 26px;
  padding: 2px 24px 2px 7px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--hot);
  font: inherit;
  cursor: pointer;
}

.theme-picker select:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .theme-picker {
    top: 14px;
    right: 12px;
  }

  .theme-picker-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
