.typedoc__type-link,
.typedoc__unknown__yield,
.typedoc__intrinsic {
  border: 1px solid #222;
  display: inline-block;
  font-style: italic;
  font-family: monospace;
  margin: 0;
  font-size: 0.75rem;
  padding: 0 0.5rem;
}

.typedoc__type-link {
  padding: 0 0.5rem;
}

.typedoc__declaration-name {
  margin: 0;
  display: inline-block;
  line-height: 1.5rem;
}

.typedoc__declaration {
  display: grid;
  gap: 1rem;
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  grid-template-areas:
    "name . type"
    "comment comment comment";

  .typedoc__declaration-name {
    grid-area: name;
  }

  .typedoc__declaration-type,
  .typedoc__declararation-children {
    grid-area: type;
  }

  .typedoc-rendered-comment {
    grid-area: comment;
  }

  &:has(> .typedoc__declaration-signatures) {
    grid-auto-flow: column;
    grid-template-columns: unset;
    grid-template-areas:
      "name"
      "comment";
  }
}

.typedoc__declaration-name {
  font-weight: bold;
}

section {
  > .typedoc__declaration {
    > .typedoc__declaration-name {
      font-size: 1.5rem;
    }
  }
}

.typedoc__heading {
  display: block;
}

.typedoc__property {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
}

.typedoc__modifier-signature__arg,
.typedoc__helper-signature__arg,
.typedoc__component-signature__arg {
  padding: 0 1rem;
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  grid-template-areas:
    "info"
    "comment";
}

.typedoc__declaration-signatures {
  list-style: none;

  > li {
    border-bottom: 1px dashed color-mix(in lch, currentColor 50%, transparent 75%);
  }
}

.typedoc__named-tuple,
.typedoc__component-signature__arg-info,
.typedoc__helper-signature__arg-info,
.typedoc__modifier-signature__arg-info {
  display: flex;
  gap: 0.25rem;
  align-items: baseline;
  justify-content: space-between;
}

.typedoc__component-signature__arg-info > .typedoc__name,
.typedoc__helper-signature__arg-info > .typedoc__name,
.typedoc__modifier-signature__arg-info > .typedoc__name {
  display: inline-block;
  margin: 0;
  font-size: 1rem;
  font-weight: bold;
}

.typedoc__component-signature__arg-info,
.typedoc__modifier-signature__arg-info,
.typedoc__helper-signature__arg-info {
  border-bottom: 1px rgba(125, 125, 125, 0.5) dashed;
  grid-area: info;
  display: flex;
  justify-content: space-between;
}

.typedoc__helper__return {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.typedoc__helper__return > .typedoc__heading {
  margin: 0;
}

.typedoc__declaration-children,
.typedoc__declaration-children li {
  list-style: none;
  padding: 0 0.5rem;
}

.typedoc__declaration-children li {
  border-bottom: 1px rgba(125, 125, 125, 0.5) dashed;
}

/**
 * Argument Flags
 */
.typedoc__arg-flags {
  display: flex;
  gap: 0.25rem;
  align-items: baseline;
  justify-content: flex-start;
  margin: 0.5rem 0;
}

.typedoc__arg-flags > .typedoc__flag {
  display: inline-block;
  margin: 0;
  font-size: 0.75rem;
  padding: 0 0.5rem;
  border: 1px solid #222;
  border-radius: var(--pico-border-radius);
  font-family: var(--pico-font-family-monospace);
}

/**
 *
 * Component Signatures
 *
 */
.typedoc__modifier-signature__element,
.typedoc__component-signature__element,
.typedoc__component-signature__block {
  display: block;
  padding: 0 1rem;
}

.typedoc__modifier-signature__element-type,
.typedoc__component-signature__element-type {
  display: flex;
  gap: 0.25rem;
  align-items: baseline;
  justify-content: space-between;
}

.typedoc__modifier-signature__element-type > .typedoc__name,
.typedoc__component-signature__element-type > .typedoc__name {
  display: inline-block;
  margin: 0;
  line-height: 1.5rem;
}

.typedoc__modifier-signature__element-header,
.typedoc__component-signature__element-header {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
  align-items: baseline;
}

.typedoc__helper-signature__block .typedoc-rendered-comment,
.typedoc__component-signature__block .typedoc-rendered-comment {
  border-top: 1px solid #333;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.typedoc__component-signature__block .typedoc__declaration-name + .typedoc__reference {
  margin-bottom: -0.25rem;
}

.typedoc__component-signature__block > .typedoc__property {
  border-left: 1px dashed color-mix(in lch, currentColor 50%, transparent 75%);
}

.typedoc__component-signature__block > .typedoc__property .typedoc__declaration-children {
  display: grid;
  gap: 0.5rem;
}

.typedoc__component-signature__block
  > .typedoc__property
  > .typedoc__declaration
  > ul.typedoc__declaration-children
  > li:not(:last-child)
  > .typedoc__declaration {
  border-bottom: 1px solid lightgray;
  padding: 0.5rem;
}

.typedoc__helper-signature__arg,
.typedoc__modifier-signature__arg,
.typedoc__component-signature__arg {
  margin-bottom: 0.5rem;
  display: block;
  gap: 0.25rem;
}

.typedoc__helper-signature__arg > .typedoc__name,
.typedoc__modifier-signature__arg > .typedoc__name,
.typedoc__component-signature__arg > .typedoc__name,
.typedoc__component-signature__block > .typedoc__name {
  font-size: 1.2rem;
  overflow-y: hidden;
  overflow-x: hidden;
  overflow: hidden;
  margin: 0;
  max-height: unset;
}

.typedoc__helper-signature__arg .typedoc-rendered-comment p,
.typedoc__modifier-signature__arg .typedoc-rendered-comment p,
.typedoc__component-signature__arg .typedoc-rendered-comment p {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

/**
 * References
 */
.typedoc__reference:has(.typedoc__reference__typeArguments) {
  display: grid;
  grid-auto-flow: row;
}

.typedoc__reference__name {
  display: inline;
  border: 1px solid #222;
  font-style: italic;
  font-family: monospace;
  margin: 0;
  font-size: 0.75rem;
  padding: 0 0.5rem;
}

.typedoc__reference__typeArguments {
  display: inline-grid;
  width: fit-content;
  grid-auto-flow: column;
  gap: 0.5rem;
}

.typedoc__reference__typeArgument {
  /* border: 1px solid; */
}

/**
 * Array formatting
 */
.typedoc__array > div.typedoc__declaration > ul.typedoc__declaration-children {
  border: 1px solid;
  margin: 0;
}

/**
 * Signature / Function Formatting
 */
.typedoc__function__type {
  display: flex;
  align-items: start;
  gap: 0.25rem;
}

.typedoc__function__type:has(.typedoc__function__parameter) {
  /* display: grid; */
}

.typedoc__function__parameters {
  display: grid;
  gap: 0.25rem;
}

.typedoc__function__parameter__container {
  border: 1px dashed color-mix(in lch, currentColor 50%, transparent 75%);
  padding: 0.5rem;
}

.typedoc__function__parameter {
  width: fit-content;
  display: grid;
  grid-auto-flow: column;
  gap: 0.5rem;
}

.typedoc__function__parameter__comment {
  /* font-style: italic; */
  /* font-size: 0.75rem; */
}

.typedoc__function__open,
.typedoc__function__close {
  display: ruby;
}

.typedoc__function__return_type {
  display: inline-block;
}

.typedoc__function__return_type {
}

.typedoc__function__parameter__name {
  font-style: italic;
  font-family: monospace;
  font-size: 1rem;
}

/**
 * Literal
 */
.typedoc__literal {
  font-family: monospace;
  font-size: 0.75rem;
}

/**
 * Union
 */
.typedoc__union {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.typedoc__union__type {
  display: inline-flex;
  gap: 0.25rem;
}

.typedoc__union__type::before {
  content: "|";
}

.typedoc__union .typedoc__union__type:first-child::before {
  display: none;
}

/**
 * Union Variant (discriminated union signatures)
 */
.typedoc__union-variant + .typedoc__union-variant {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid light-dark(#e4e4e7, #3f3f46);
}
