body {
  margin: 2rem;
  background: white;
  color: black;
  font-family: system-ui, sans-serif;
}

h1 {
  margin: 0;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 1rem;
}

.topics a,
.topics button {
  padding: 0.4rem 0.75rem;
  border: 1px solid #767676;
  border-radius: 3px;
  background: #efefef;
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.topics a:hover {
  background: #e3e3e3;
}

.topics button:disabled {
  color: #595959;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.thoughts {
  width: min(100%, 26rem);
  margin-block: 1.75rem;
}

.thoughts h2 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

#thought-fields {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#thought-text,
#publish-key {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 0.45rem;
  border: 1px solid #999;
  border-radius: 3px;
  font: inherit;
}

#thought-text {
  resize: vertical;
}

.thought-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.thought-actions :is(select, button),
#more-thoughts {
  padding: 0.2rem 0.45rem;
  font: inherit;
  font-size: 0.85rem;
}

.thought-status,
.thought-meta {
  color: #555;
  font-size: 0.8rem;
}

.thought-status:empty {
  display: none;
}

.thought {
  margin-top: 0.9rem;
  padding-top: 0.65rem;
  border-top: 1px solid #ddd;
}

.thought p {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#publish-dialog {
  width: min(16rem, 75vw);
  border: 1px solid #777;
  border-radius: 4px;
}

#publish-key {
  margin-top: 0.4rem;
}
