.dark .astro-code,
.dark .astro-code span {
  color: var(--shiki-dark, inherit);
  --twoslash-popup-bg: #191919;
  --twoslash-border-color: #8884;
}
.dark .astro-code {
  background-color: #0e0e0e;
}

html:not(.dark) .astro-code {
  background-color: #fafafa;
}

html:not(.dark) .astro-code,
html:not(.dark) .astro-code span {
  color: var(--shiki-light, inherit);
  --twoslash-popup-bg: #fafafa;
}

.twoslash ul {
  font-size: 1em !important;
}

.twoslash ul > li::before {
  display: none;
}

.twoslash ul > li {
  padding: 1px;
  margin: 0;
}

.twoslash-query-presisted .twoslash-popup-info {
  transform: translate(0, 1.6em);
}

/* Prose */
.prose pre:not(.astro-code) {
  padding: 0;
  margin: 0;
  background: transparent;
}

.prose .astro-code {
  font-family: 'DM Mono', 'Input Mono', 'Fira Code', monospace;
  font-size: 0.92em;
  line-height: 1.4;
  margin: 0.5em 0;
}

.prose img {
  width: 100%;
}

.prose p > img {
  width: 100%;
  --uno: shadow rounded-lg;
  transform: scale(1.05);
  margin: 2.6em 0;
}

.prose {
  --fg-light: #888;
  --fg: #555;
  --fg-deep: #222;
  --fg-deeper: #000;

  color: var(--fg);
}

.prose a {
  font-weight: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 125, 125, 0.3);
  transition: border 0.3s ease-in-out;
}

.prose a:hover {
  border-bottom: 1px solid var(--fg);
}

.prose a code {
  color: inherit;
}

.prose hr {
  width: 50px;
  margin: 2em auto;
}

html.dark .prose {
  --fg-light: #888;
  --fg: #bbb;
  --fg-deep: #ddd;
  --fg-deeper: #fff;
}

a.item {
  transition: 0.2s all ease-out;
  text-decoration: none;
  border-bottom: none !important;
  opacity: 0.6;
}

a.item:hover {
  opacity: 1;
}

a.header-anchor {
  float: left;
  margin-top: 0.125em;
  margin-left: -1.2em;
  padding-right: 0.5em;
  font-size: 0.85em;
  opacity: 0;
  text-decoration: none;
  border: 0 !important;
}

a.header-anchor:hover,
a.header-anchor:focus {
  text-decoration: none;
}

h1:hover .header-anchor,
h1:focus .header-anchor,
h2:hover .header-anchor,
h2:focus .header-anchor,
h3:hover .header-anchor,
h3:focus .header-anchor,
h4:hover .header-anchor,
h4:focus .header-anchor,
h5:hover .header-anchor,
h5:focus .header-anchor,
h6:hover .header-anchor,
h6:focus .header-anchor {
  opacity: 0.5;
}

.prose blockquote {
  font-weight: normal;
  font-style: normal;
  line-height: 1.6em;
  padding: 0.5em 1em;
  margin-left: -1.1em;
}

.prose blockquote > * {
  opacity: 0.7;
}

.prose blockquote > :first-child {
  margin-top: 0;
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose blockquote p:first-of-type::before {
  content: none;
}

.prose blockquote p:first-of-type::after {
  content: none;
}

.prose s {
  opacity: 0.5;
}

.prose em {
  --uno: font-serif;
  color: var(--fg-deep);
  font-size: 1.05em;
}

.table-of-contents {
  position: fixed;
  top: 90px;
  bottom: 0;
  font-size: 0.8em;
  left: 20px;
  z-index: 200;
  overflow: hidden;
  --uno: hidden lg-flex flex-col w-100px lg-w-200px xl-w-300px;
}

.table-of-contents-anchor {
  --uno: 'mx2 w-7 h-7 text-lg flex items-center justify-center bg-base rounded text-hex-8887 border border-base shadow md:border-transparent md:shadow-none transition duration-400';
}

.table-of-contents > ul {
  text-overflow: ellipsis;
  height: 100%;
  overflow-y: auto;
  --uno: rounded op0 mt-1 pb-5 transition duration-700;
}

*:hover > .table-of-contents > .table-of-contents-anchor,
.toc-always-on .table-of-contents > .table-of-contents-anchor {
  --uno: text-inherit;
}

.toc-always-on .table-of-contents > ul {
  opacity: 0.6;
}

*:hover > .table-of-contents > ul {
  opacity: 0.75;
}

.table-of-contents ul > li::before {
  display: none;
}

.table-of-contents ul > li {
  padding-left: 0.8rem;
  line-height: 1.5em;
  margin-top: 0.5em;
}

.table-of-contents ul > li > a {
  --uno: op75 hover-op100 transition;
}

.code-wrap .line {
  white-space: break-spaces;
}

.markdown-magic-link {
  display: inline-flex;
  align-items: center;
  background: #8882;
  transform: translateY(3px);
  line-height: 100%;
  color: var(--fg-light) !important;
  --uno: gap-1 transition rounded px1.5 py1 important-border-0 font-condensed;
}

.markdown-magic-link:hover {
  background: #8883;
  color: var(--fg) !important;
}

.markdown-magic-link-image {
  display: inline-block;
  height: 1.1em;
  width: 1.1em;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 2px;
}

.markdown-magic-link.markdown-magic-link-github-at {
  transform: translateY(6px);
  --uno: pl-0 py-0 pr2 text-sm gap-1.2 rounded-full;
}

.markdown-magic-link.markdown-magic-link-github-at .markdown-magic-link-image {
  height: 1.6em;
  width: 1.6em;
  border-radius: 50%;
}
