:root {
  --theme-browser: #f6f0e7;
  --theme-control-bg: #ffffff;
  --theme-control-fg: #191719;
  --theme-control-line: #d9cec2;
  --theme-focus: #4b174f;
}

html[data-theme="dark"] {
  --ink: #f2eee7;
  --paper: #0d0f10;
  --rust: #f07a58;
  --aub: #87518a;
  --soft: #202427;
  --muted: #aaa39d;
  --theme-browser: #0d0f10;
  --theme-control-bg: #171b1d;
  --theme-control-fg: #f2eee7;
  --theme-control-line: #3c4245;
  --theme-focus: #f07a58;
}

.header-tools,
.nav-tools,
.topline-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.systems-link {
  padding: 8px 10px;
  border: 1px solid var(--theme-control-line);
  color: var(--theme-control-fg);
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
}

.systems-link:hover {
  border-color: var(--theme-control-fg);
}

.theme-toggle {
  width: 40px !important;
  height: 40px;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--theme-control-line) !important;
  border-radius: 50% !important;
  background: var(--theme-control-bg) !important;
  color: var(--theme-control-fg) !important;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--theme-control-fg) !important;
  background: var(--theme-control-bg) !important;
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--theme-focus);
  outline-offset: 3px;
}

.theme-icon {
  font: 700 19px/1 Georgia, serif;
}

html[data-theme="light"] .theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun {
  display: none;
}

.brand-unit:not(.aixcel) img {
  padding: 4px;
  background: #191719;
}

html[data-theme="dark"] .studio,
html[data-theme="dark"] .architecture {
  color: var(--ink);
  background: #141719;
}

html[data-theme="dark"] .ops-grid article {
  background: #171b1d;
}

html[data-theme="dark"] select {
  color: var(--ink);
}

html[data-theme="dark"] .gate button {
  color: var(--ink);
  background: #151719;
}

@media (max-width: 800px) {
  .systems-link:first-of-type {
    display: none;
  }

  .header-tools p {
    display: none;
  }

  .theme-toggle {
    width: 36px !important;
    height: 36px;
  }
}
