.answer {
  --stroke-opacity: 0.3;
  --stroke-color: hsl(var(--color-base-text) / var(--stroke-opacity));
  border: 1px solid var(--stroke-color);
  border-radius: 6px;
}

.answer__author {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  font-size: var(--font-size-headline-3);
  line-height: var(--font-size-headline-3);
}

.answer__author-roles {
  --role-color: hsl(0 0% 0%);
  --role-bg-color: hsl(0 0% 100%);
  --role-hover-color: hsl(0 0% 94%);
  --role-border-color: hsl(0 0% 0%);
  align-self: center;
  display: flex;
}

.answer__author-roles:not(:has(.answer__author-roles-link)) {
  display: none;
}

.answer__author-roles-link {
  font-size: calc(var(--font-size-s) * 1.25);
  line-height: var(--font-line-height-s);
  padding: 4px 18px;
  text-decoration: none;
  width: max-content;
  border-width: 1px;
  border-style: solid;
  color: var(--role-color);
  background-color: var(--role-bg-color);
  border-color: var(--role-border-color);
}

.answer__author-roles-link:hover {
  background-color: var(--role-hover-color);
}

.answer__author-name * {
  font-family: 'Spot Mono', monospace;
  font-weight: 300;
  font-size: var(--font-size-l);
  line-height: var(--font-line-height-l);
  letter-spacing: -0.05em;
  text-align: left;
}

.answer__content {
  position: relative;
  overflow: hidden;
}

.answer__content::after {
  content: ' ';
  display: block;
  position: relative;
  height: 100px;
  background: linear-gradient(180deg, hsla(var(--color-base-background) / 0) 0%, hsla(var(--color-base-background) / 0.67) 100%);
  border-radius: 8px;
  z-index: 0;
}

.answer__content > .answer__summary {
  height: 110px;
  padding: var(--offset);
}

.answer__content .answer__toggler {
  appearance: none;
  display: block;
  position: absolute;
  top: 0;
  margin-block-start: 190px;
  justify-self: start;
  font-size: var(--font-size-m, 100%);
  font-family: var(--font-family);
  padding: 4px 15px;
  box-shadow: 0 0 10px 5px rgb(0 0 0 / 0.1);
  border: 1px solid var(--stroke-color);
  border-radius: 5px;
  background-color: var(--color-background);
  z-index: 1;
  cursor: pointer;
}

.answer__content--open {
  overflow: unset;
}

.answer__content--open::after {
  display: none;
}

.answer__content--open > .answer__summary {
  height: auto;
  grid-template-rows: unset;
  overflow: unset;
}

.answer__content--open .answer__toggler {
  position: sticky;
  grid-row-start: unset;
  bottom: 1em;
  margin-block-start: unset;
}

.answer__content--short > .answer__summary {
  height: auto;
}

.answer__content--short::after {
  height: unset;
}
