.rt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.4rem;
  background: var(--color-bg-elevated);
  overflow: hidden;
}

.rt__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-muted);
}

.rt__btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 0.3rem;
  min-height: 1.7rem;
  padding: 0 0.4rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.rt__btn:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-elevated);
}

.rt__glyph--b { font-weight: 800; }
.rt__glyph--i { font-style: italic; }
.rt__glyph--u { text-decoration: underline; }

.rt__size {
  appearance: none;
  border: 1px solid var(--color-border);
  border-radius: 0.3rem;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  font: inherit;
  font-size: 0.75rem;
  height: 1.7rem;
  padding: 0 0.4rem;
}

.rt__swatch {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  cursor: pointer;
}

.rt__swatch--black { background: #000; }
.rt__swatch--red { background: #b40e0e; }

.rt__pick {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  cursor: pointer;
  background: conic-gradient(#ff0000, #ff8000, #ffff00, #00ff00, #00ffff, #0000ff, #8000ff, #ff00ff, #ff0000);
}

.rt__pick.is-set {
  background: var(--rt-pick);
}

.rt__pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.rt__edit {
  min-height: 7rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text);
}

.rt__edit:focus {
  outline: none;
}

.rt__edit:empty:before {
  content: attr(data-placeholder);
  color: var(--color-text-faint);
}

.rt--compact .rt__edit {
  min-height: 2.8rem;
  max-height: 8rem;
}

.rt-content p {
  margin: 0 0 0.55rem;
}

.rt-content p:last-child {
  margin-bottom: 0;
}

.rt-content ul,
.rt-content ol {
  margin: 0 0 0.55rem;
  padding-left: 1.2rem;
}
