.hw-theme-control {
  display: none;
  position: relative;
  z-index: 120;
}

.hw-js .hw-theme-control {
  display: block;
}

.hw-theme-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--hw-rule);
  background: var(--hw-surface);
  color: var(--hw-ink-soft);
  cursor: pointer;
}

.hw-theme-symbol {
  color: var(--hw-red);
  font-size: 1rem;
}

.hw-theme-label {
  font-size: 0.72rem;
  white-space: nowrap;
}

.hw-theme-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: 154px;
  padding: 0.4rem;
  border: 1px solid var(--hw-rule);
  background: var(--hw-surface);
  box-shadow: var(--hw-shadow);
}

.hw-theme-menu[hidden] {
  display: none;
}

.hw-theme-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border: 0;
  background: transparent;
  color: var(--hw-ink-soft);
  text-align: left;
  cursor: pointer;
}

.hw-theme-menu button[aria-checked="true"] {
  background: var(--hw-blue-tint);
  color: var(--hw-blue);
  font-weight: 750;
}

.hw-primary-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 170px);
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  align-items: center;
}

.hw-header-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--hw-rule-strong);
}

.hw-header-search input,
.hw-header-search button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--hw-ink);
}

.hw-header-search input {
  min-width: 0;
  padding-inline: 0.35rem;
}

.hw-header-search button {
  padding-inline: 0.4rem;
  color: var(--hw-blue);
  font-size: 0.72rem;
  cursor: pointer;
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(#page.site, .site-content, #primary, #secondary) {
  background-color: var(--hw-canvas);
  color: var(--hw-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.site-main, .content-search, .sidebar .widget, .sidebar-2 #left-nav) {
  background-color: var(--hw-surface);
  color: var(--hw-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .entry-summary, .page-content, .widget) :is(p, li, dt, dd) {
  color: var(--hw-ink-soft);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .entry-summary, .page-content) a {
  color: var(--hw-blue);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) .single-excerpt {
  background-color: var(--hw-surface-muted);
  color: var(--hw-ink-soft);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) .single-excerpt .excerpt-text {
  color: var(--hw-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) .sidebar .widget .widget-title {
  border-color: var(--hw-rule);
  color: var(--hw-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.sidebar .widget li a, .sidebar-2 #left-nav li a) {
  color: var(--hw-ink-soft);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category).single #primary .sticky-breadcrumbs {
  border-color: var(--hw-rule);
  background: var(--hw-surface);
  color: var(--hw-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.single .entry-header, .breadcrumbs, .content-list .hentry, .content-list .content-ad, .content-search .hentry, .sidebar .widget .widget-title, .sidebar .widget li) {
  border-color: var(--hw-rule);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.content-list, .content-search, .single #primary article.hentry) .entry-meta .entry-comment::before {
  background-color: var(--hw-rule);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) .wp-caption {
  background-color: var(--hw-surface-muted);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) .wp-caption-text {
  color: var(--hw-text-muted);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) table {
  color: var(--hw-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) table :is(th, td) {
  border-color: var(--hw-rule);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) table th {
  background-color: var(--hw-surface-muted);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) table td {
  background-color: var(--hw-surface);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) :is(.entry-content, .page-content) table tr:hover td {
  background-color: var(--hw-blue-tint);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) .pagination .page-numbers {
  border: 1px solid var(--hw-rule);
  background-color: var(--hw-surface);
  color: var(--hw-ink-soft);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) .pagination .page-numbers.current {
  border-color: var(--hw-ink);
  background-color: var(--hw-ink);
  color: var(--hw-on-ink);
}

body.hostingwiki-next:not(.hostingwiki-next-home):not(.category) .scroller-status :is(.infinite-scroll-request, .infinite-scroll-last, .infinite-scroll-error) {
  background-color: var(--hw-surface);
  color: var(--hw-text-muted);
}

body.hostingwiki-next :is(input, select, textarea) {
  border-color: var(--hw-rule);
  background: var(--hw-surface);
  color: var(--hw-ink);
}

body.hostingwiki-next :is(input, textarea)::placeholder {
  color: var(--hw-text-muted);
  opacity: 1;
}

body.hostingwiki-next :is(pre, .enlighter-code, .enlighter-code .enlighter) {
  border-color: var(--hw-rule);
  background-color: var(--hw-surface);
  color: var(--hw-ink-soft);
}

@media (max-width: 1120px) {
  .hw-primary-nav {
    grid-template-columns: 1fr;
  }

  .hw-header-search {
    max-width: 360px;
    margin: 0.65rem 0 0;
  }
}

@media (max-width: 680px) {
  .hw-theme-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .hw-theme-trigger {
    width: 44px;
    justify-content: center;
    padding-inline: 0;
  }
}
