.brand-mark {
  display: block;
  background: none;
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(48, 94, 206, .24);
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.theme-toggle {
  display: inline-flex;
  width: 42px;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  padding: 0;
}

.theme-toggle .theme-toggle-label::before,
:root[data-theme="dark"] .theme-toggle .theme-toggle-label::before {
  content: none;
}

.theme-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-icon-moon {
  fill: currentColor;
  stroke: none;
}

.theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.header-sign-in {
  position: relative;
  display: flex;
  width: 120px;
  min-height: 42px;
  align-items: center;
  justify-content: flex-end;
}

#google-sign-in {
  display: flex;
  min-height: 42px;
  align-items: center;
}

.header-sign-in[aria-busy="true"] #google-sign-in {
  opacity: .5;
  pointer-events: none;
}

.header-sign-in .message:not(:empty) {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 110;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  margin: 0;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  font-size: .72rem;
  line-height: 1.45;
}

.header-sign-in .message.error {
  color: var(--danger);
}

@media (max-width: 700px) {
  .site-header {
    gap: 8px;
  }

  .header-actions {
    gap: 12px;
  }

}

@media (max-width: 480px) {
  .site-header {
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .theme-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .theme-icon {
    width: 18px;
    height: 18px;
  }

  .site-header:has(.header-sign-in:not([hidden])) .header-actions {
    width: auto;
    margin-left: auto;
  }
}

@media (max-width: 370px) {
  .site-header:has(.account:not([hidden])) .brand > span {
    display: none;
  }
}
