:root {
  --font-family: "Source Sans 3", sans-serif;
  --font-family-heading: "DM Sans", sans-serif;
  --font-family-mono: "Roboto Mono", Monaco, courier, monospace;

  --color-primary: #e60094;
  --color-primary-active: #aa0066;
  --gray-950: #15151f;
  --gray-900: #23232a;
  --gray-800: #3d3d47;
  --gray-700: #76767a;
  --gray-600: #94949d;
  --gray-400: #d8d8dd;
  --gray-300: #e4e4e5;
  --gray-200: #f0f0f1;
  --gray-100: #f7f7f8;

  --color-surface-purple: #f4e5fb;
  --color-surface-blush: #ffecf0;
  --color-surface-pink: #fce5f4;
  --color-accent: #6b228c;

  --color-warning-lighter: #ffebe0;
  --color-warning-dark: #592d1c;
  --color-success: #00874e;

  --light-border: rgba(15, 15, 23, 0.06);
  --bg: #fff;
  --bg-transparent90: rgba(255, 255, 255, 0.9);
  --bg-transparent60: rgba(255, 255, 255, 0.6);

  --app-nav-text: var(--gray-800);
  --app-nav-active-background: rgba(21, 21, 31, 0.05);
  --color-text-secondary: var(--gray-800);

  --warn-block-bg: var(--color-surface-purple);
  --warn-block-text: #381f41;
  --tip-block-bg: var(--color-warning-lighter);
  --tip-block-text: var(--color-warning-dark);

  --theme-color: var(--color-primary);
}

[data-theme="dark"] {
  --color-primary: #fe79cf;
  --color-primary-active: #fe76c8;
  --gray-950: #fff;
  --gray-900: #f7f7f8;
  --gray-800: #f2f2f8;
  --gray-700: #c7c7d4;
  --gray-600: #a7a7b3;
  --gray-400: #45454e;
  --gray-300: #36363e;
  --gray-200: #3f3a4e;
  --gray-100: #2b2639;
  --gray-100: #212130;

  --color-surface-purple: #412848;
  --color-surface-blush: #6b334a;
  --color-surface-pink: #80436b;
  --color-accent: #dac6e3;

  --color-warning-lighter: #613b1b;
  --color-warning-dark: #f9ece0;
  --color-success: #99f7bf;

  --light-border: rgba(247, 247, 248, 0.06);

  --bg: #15151f;
  --bg-transparent90: rgba(21, 21, 31, 0.9);
  --bg-transparent60: rgba(21, 21, 31, 0.6);

  --app-nav-text: var(--gray-700);
  --app-nav-active-background: rgba(255, 255, 255, 0.05);
  --color-text-secondary: var(--gray-700);

  --warn-block-bg: var(--color-surface-purple);
  --warn-block-text: #f1e6f6;
  --tip-block-bg: var(--color-warning-lighter);
  --tip-block-text: var(--color-warning-dark);

  --theme-color: var(--color-primary);
}

html {
  scrollbar-gutter: stable;
  background: var(--bg);
}

html[data-theme="dark"] {
  scrollbar-color: #585266 transparent;
}
[data-theme="dark"] {
  color-scheme: dark;
}

div#app {
  font-weight: 400;
}

div#app:empty:before {
  font-weight: 500;
  font-size: 1rem;
  color: var(--gray-700);
  opacity: 0.5;
  content: "Ladataan…";
}

body {
  background: var(--bg);
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--gray-800);
}
body {
  --sidebar-width: 300px;
  --content-max-width: 1000px;
  --content-width: calc(100% - var(--sidebar-width));
  --main-width: min(
    calc(var(--content-width) * 0.84),
    var(--content-max-width)
  );
}
body.close {
  --sidebar-width: 0px;
}

@media (width > 768px) {
  [data-theme="dark"] body {
    background-size:
      100% 20rem,
      100% 20rem;
    background-image:
      radial-gradient(
        ellipse at 65% 0,
        rgba(167, 11, 120, 0.15) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse at 87% 0%,
        rgba(51, 17, 101, 0.2) 0%,
        transparent 50%
      );
    background-position:
      50% -5rem,
      50% -5rem;
    background-repeat: no-repeat;

    &:has(div#app:empty) {
      background-image: none;
    }
  }
}

#mobile-header {
  display: none;
}

.content {
  padding-top: 70px;
}

.markdown-section {
  max-width: min(84%, var(--content-max-width));
  padding-top: 45px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.markdown-section > h1:first-child {
  margin-top: 2rem !important;
}

.markdown-section :is(h1, h2, h3, h4, h5) {
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  font-weight: 700;
  color: var(--gray-900);
}

.markdown-section :is(h1, h2, h3, h4, h5) * {
  font-weight: 700;
}

.markdown-section :is(h1, h2, h3, h4, h5) a span {
  color: var(--gray-900) !important;
}

.markdown-section :is(h1, h2, h3, h4, h5) a:hover {
  color: var(--color-primary);
}

.markdown-section hr {
  border-bottom: 1px solid var(--light-border);
}

.markdown-section blockquote {
  color: var(--gray-950);
  margin: 1rem 0;
  font-weight: 400;
  background-color: transparent;

  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 3px 0.5rem 0.5rem 3px;

  position: relative;
  transition: all 0.2s ease-out;
}

.markdown-section blockquote:hover {
  background: var(--gray-100);
}

.markdown-section blockquote:before {
  content: "";
  display: block;
  width: 3px;
  left: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  background: var(--color-primary);
  border-radius: 3px;
  transition: inherit;
  z-index: 2;
}

.markdown-section blockquote a {
  color: inherit;
  text-decoration: none;
}
.markdown-section blockquote p {
  font-weight: 400;

  &::selection {
    background: var(--color-surface-pink) !important;
  }
}

.markdown-section blockquote p:last-of-type {
  margin: 0;
}

.markdown-section :is(h1, h2, h3, h4, h5)[id] a {
  display: inline;
  position: relative;
  padding-right: 1.15rem;
  text-decoration: none !important;
}

.markdown-section :is(h1, h2, h3, h4, h5)[id] a::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e60094' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' x2='20' y1='9' y2='9'/%3E%3Cline x1='4' x2='20' y1='15' y2='15'/%3E%3Cline x1='10' x2='8' y1='3' y2='21'/%3E%3Cline x1='16' x2='14' y1='3' y2='21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0;
  align-self: stretch;
  transform: translateX(-0.25rem);
  transition: all 0.1s ease-out;
  transition-delay: 0s;

  position: absolute;
  bottom: calc(1.25em / 2 - 0.45rem);
  right: 0;
}

[data-theme="dark"] .markdown-section :is(h1, h2, h3, h4, h5)[id] a::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fe79cf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' x2='20' y1='9' y2='9'/%3E%3Cline x1='4' x2='20' y1='15' y2='15'/%3E%3Cline x1='10' x2='8' y1='3' y2='21'/%3E%3Cline x1='16' x2='14' y1='3' y2='21'/%3E%3C/svg%3E");
}

.markdown-section :is(h1, h2, h3, h4, h5)[id] a:hover::after,
.markdown-section :is(h1, h2, h3, h4, h5)[id] a:focus-visible::after {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}

.markdown-section h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

.markdown-section h2 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  margin: 3rem 0 0.75rem;
}

.markdown-section h3 {
  font-size: 1.55rem;
  margin: 2.5rem 0 0.5rem;
}

.markdown-section h4 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

.markdown-section h5 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}
.markdown-section h2 + h3,
.markdown-section h3 + h4 {
  margin-top: 1rem;
}

.markdown-section strong,
.markdown-section b {
  color: var(--gray-900);
  font-weight: 600;
}
.markdown-section em {
  color: var(--gray-700);
}

.markdown-section p {
  margin: 0 0 1.2em;
}

.markdown-section a {
  font-weight: 400;
  color: var(--color-primary-active);
}

.markdown-section a:hover {
  color: var(--gray-900);
}

.markdown-section a strong {
  color: inherit;
  font-weight: inherit;
}

.anchor span {
  color: var(--gray-900);
}

/* App nav */
.app-nav,
.app-nav.no-badge {
  margin: 42px 0 0 0;
  left: auto;
  color: var(--app-nav-text);
  right: 8rem;
  right: calc((var(--content-width) - var(--main-width)) / 2 + 3.75rem);
  left: calc(var(--sidebar-width) + 1rem);
  transition: right 0.2s;
}

.app-nav ul {
  padding: 0;
}
.app-nav ul li:first-of-type {
  margin-left: 0;
}

.app-nav li {
  padding: 0;
  margin-bottom: 0.5rem;
  margin-inline: 0.9rem;
}

.app-nav li a {
  font-weight: 500;
  padding: 5px 0.05rem;
  /* border-radius: 0.5rem; */
  transition: all 0.1s ease-out;
}

.app-nav a:not(.active):hover {
  color: var(--gray-900);
}

.app-nav a.active {
  color: var(--gray-900);
  border-color: var(--color-primary);
}

/* Site actions */
.site-actions {
  right: 2rem;
  right: calc((var(--content-width) - var(--main-width)) / 2);
  display: flex;
  gap: 0.6rem;
  position: absolute;
  top: 37px;
  transition: right 0.2s;
  font: var(--font-family);
}

.site-action-btn {
  appearance: none;
  width: 2rem;
  height: 2rem;
  box-shadow: 0 0 0 1px var(--light-border);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--gray-800);
  cursor: pointer;
}

@supports (corner-shape: superellipse(1.666)) {
  .site-action-btn {
    border-radius: 0.8rem;
    corner-shape: superellipse(1.666);
  }
}

.site-action-btn svg {
  color: var(--gray-800);
  height: 1rem;
  width: auto;
}

@media (width > 768px) {
  .site-action-btn:hover {
    background-color: var(--gray-100);
  }
}

.site-action-btn:active {
  background-color: var(--gray-200);
}

/* Tooltip */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);

  background: var(--bg);
  color: var(--gray-900);
  padding: 0.35rem 0.4rem;
  border-radius: 0.3rem;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1.1;
  font-family: inherit;

  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.1s ease-in-out,
    opacity 0.1s ease-in-out;
  transform-origin: top center;
  box-shadow:
    0px 4px 8px -4px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--light-border);
  visibility: hidden;
  z-index: 10;

  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.btn-with-tooltip {
  position: relative;
}

.btn-with-tooltip:hover + .tooltip,
.btn-with-tooltip:focus-visible + .tooltip {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  visibility: visible;
}

#theme-switcher:not(.animate) svg {
  animation: none !important;
}

#theme-switcher .light-mode {
  display: none;
}

@keyframes rotate-light {
  from {
    opacity: 0;
    transform: rotate(45deg) scale(0.8);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@keyframes rotate-dark {
  from {
    opacity: 0;
    transform: rotate(-45deg) scale(0.8);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

#theme-switcher .dark-mode {
  display: inline-block;
  animation: rotate-light 0.25s ease-in-out;
}

[data-theme="dark"] #theme-switcher .light-mode {
  display: inline-block;
  animation: rotate-dark 0.25s ease-in-out;
}

[data-theme="dark"] #theme-switcher .dark-mode {
  display: none;
}

/* Sidebar */
.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--light-border);
  padding: 1.5rem 0 0 !important;
}

.sidebar-toggle {
  background-color: var(--bg-transparent90);
}

.sidebar-toggle span {
  border-radius: 3px;
  background-color: var(--color-primary);
}

.app-name img {
  max-width: 3.8rem;
  height: auto;
}

.sidebar > h1 {
  margin: 0 1.5rem 1.5rem;
  text-align: left;
}

.sidebar > h1 a {
  color: var(--gray-900);
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.beta-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  background: var(--gray-600);
  color: var(--gray-100);
}

.sidebar-nav {
  margin: 0 1rem;
}

.sidebar-nav ul {
  margin: 0;
}

.sidebar ul li {
  font-weight: 500;
}

.sidebar-nav ul ul li {
  margin-bottom: 0;
}

.sidebar ul ul ul li {
  font-weight: 400;
  margin: 0;
}

.sidebar ul ul ul li:last-of-type {
  margin-bottom: 12px;
}

/* page h1 */
.sidebar-nav > ul:first-of-type > li a {
  font-weight: 600 !important;
  text-transform: uppercase;
}

.sidebar ul li a {
  font-size: 15px;
  padding-inline: 0.5rem;
  padding-block: 0.25rem;
  border-radius: 0.5rem;
  color: var(--gray-900);
  font-weight: inherit;
}

.sidebar ul ul ul li a {
  color: var(--color-text-secondary);
}

.sidebar ul li a:hover {
  background: var(--gray-100);
  text-decoration: none;
  color: var(--gray-900);
}

.sidebar ul li a:active,
.sidebar ul li.active > a {
  font-weight: inherit;
  border: none;
  background: var(--gray-100);
  color: var(--color-primary);
}

/* ?> block  */
.markdown-section p.warn {
  border-radius: 0.75rem;
  padding-inline: 1.2rem;
  background-color: var(--warn-block-bg);
  color: var(--warn-block-text);
}

[data-theme="dark"] .markdown-section p.warn {
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--warn-block-bg) 97%, var(--gray-950));
}

.markdown-section p.warn a {
  color: inherit;
}

.markdown-section p.warn a:hover {
  color: var(--gray-900);
}

/* !> block */
.markdown-section p.tip {
  border-radius: 0.5rem;
  border: none;
  padding: 1rem 1rem 1rem 48px;
  background-color: var(--tip-block-bg);
  color: var(--tip-block-text);
  margin: 1.2rem 0;
}

.markdown-section p.tip a {
  color: inherit;
}

.markdown-section p.tip:before {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c95003' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E");
  background-size: 20px 20px;
  background-repeat: no-repeat;
  left: 1rem;
  top: 18px;
  width: 20px;
  height: 20px;
  content: "";
}

[data-theme="dark"] .markdown-section p.tip:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F7B38F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E");
}

/* Markdown */
.markdown-section code,
.markdown-section output:after,
.markdown-section pre {
  font-family: var(--font-family-mono);
}

.markdown-section pre {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 0;
  line-height: 1.4rem;
  line-height: 1.725;
}

/* hide lang info because copy code button is more relevant */
.markdown-section pre:after {
  display: none;
}

.markdown-section code {
  background-color: var(--gray-100);
  color: var(--gray-900);
  border-radius: 0.3em;
  border: 1px solid var(--light-border);
  padding: 0.15em 0.4em;
  margin: 0;
}

.markdown-section code:not(pre code) {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.markdown-section pre > code {
  border: none;
  color: var(--gray-900);
  padding: 1.25rem 4rem 1.25rem 1.25rem;
  font-size: 13px !important;
}

[data-theme="dark"] .markdown-section pre > code {
  scrollbar-width: 10px;
  scrollbar-gutter: stable;
}

[data-theme="dark"] .markdown-section pre::-webkit-scrollbar-track {
  background: var(--gray-100);
}

/* Copy code button */
.copy-code-button {
  color: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: none;
  box-shadow: 0 0 0 1px var(--light-border);
  border-radius: 0.4rem;
  z-index: 1;
  position: absolute;
  top: 1rem;
  right: 1rem;
  height: 2rem;
  width: 2rem;
  cursor: pointer;
  transition: transform 0.1s;
  touch-action: manipulation;
}

.copy-code-button:hover {
  background-color: var(--gray-100);
}
.copy-code-button:active {
  transform: scale(0.96);
}

[data-theme="dark"] .copy-code-button {
  background-color: var(--gray-100);
}
[data-theme="dark"] .copy-code-button:hover {
  background-color: var(--gray-200);
}

.copy-code-button svg {
  height: 14px;
  width: 14px;
  pointer-events: none;
}

.copy-code-button span {
  display: flex;
  align-items: center;
  justify-self: center;
  pointer-events: none;
}

.copy-code-button .success {
  color: var(--color-success);
  display: none;
}

@keyframes slide-from-bottom {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
    transform: scale(0.1) rotate(15deg);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.copy-code-button.success .success {
  display: flex;
  animation: slide-from-bottom 0.2s ease-out;
}

.copy-code-button.success .label {
  display: none;
}

/* Tables */
.markdown-section table {
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
}

.markdown-section table th,
.markdown-section table td {
  padding: 7px 14px;
  border: 1px solid var(--gray-300);
}

.markdown-section thead th {
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-900);
  background-color: var(--gray-100);
  border-bottom: none;
}

.markdown-section table td {
  vertical-align: top;
  font-size: 1rem;
  line-height: 1.5;
}

.markdown-section table th:not(:first-child),
.markdown-section table td:not(:first-child) {
  border-left: none;
}

.markdown-section table tr:not(:first-child) td {
  border-top: none;
}

.markdown-section table tr:first-child th:first-child {
  border-top-left-radius: 0.5rem;
}
.markdown-section table tr:first-child th:last-child {
  border-top-right-radius: 0.5rem;
}

.markdown-section table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 0.5rem;
}
.markdown-section table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 0.5rem;
}

.markdown-section table tbody tr {
  background-color: var(--bg) !important;
}

@media (width > 1200px) {
  .markdown-section tr td:first-child code {
    white-space: nowrap;
  }
}

/* Mermaid light/dark */
.mermaid-dark {
  display: none;
}

[data-theme="dark"] .mermaid-light {
  display: none;
}

[data-theme="dark"] .mermaid-dark {
  display: block;
}

.github-corner {
  display: none;
}

/* Mobile */
@media (width <= 768px) {
  body.close {
    overflow: hidden;
  }

  /* overlay for content */
  body.close .markdown-section::after {
    content: "";
    display: block;
    background: var(--bg-transparent60);
    backdrop-filter: blur(2px);
    position: absolute;
    inset: 0;
    z-index: 2;
  }

  /* Mobile header */
  #mobile-header {
    content: "";
    display: flex;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 30;
    height: 3rem;
    background: var(--bg-transparent90);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    box-sizing: border-box;

    padding-left: 3.5rem;

    font-size: 16px;
    font-family: var(--font-family-heading);
    letter-spacing: -0.01em;
    font-weight: 600;
    color: var(--gray-900);
  }

  #mobile-header a {
    height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--gray-900) !important;
    text-decoration: none !important;
  }

  #mobile-header a img {
    width: 1.75rem;
    height: 1.75rem;
  }

  body.close #mobile-header {
    max-width: 299px;
  }

  /* App nav should not be visible in mobile, it should be within sidebar */
  .app-nav {
    display: none;
  }

  /* Mobile site actions */
  .site-actions {
    z-index: 2;
    position: fixed;
    top: 7px;
    right: 1.25rem !important;
    transition: all 0.25s ease-out;
    gap: 0.75rem;
  }

  body.close .site-actions {
    opacity: 0;
    transform: translateX(100%);
  }

  .site-action-btn {
    background: var(--bg-transparent90);
    touch-action: manipulation;
  }

  .tooltip {
    display: none !important;
  }

  .github-corner {
    display: none;
  }

  main {
    overflow: unset;
  }

  /* Mobile sidebar toggle */
  .sidebar-toggle {
    background: transparent !important;
    padding: 0;
    width: 4.75rem !important;
    width: 3.5rem !important;
    height: 3rem !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1.25rem !important;
    top: 0;
    left: 0;
    transition: none !important;
    font-size: 16px;

    touch-action: manipulation;
  }

  .sidebar-toggle span {
    background: var(--gray-700);
  }

  .sidebar-toggle span {
    background: var(--gray-700);
    transition: all 0.2s;
  }
  .sidebar-toggle span:last-child {
    margin-bottom: 0;
  }

  .sidebar-toggle .sidebar-toggle-button {
    opacity: 1 !important;
  }

  /* Mobile sidebar */
  .sidebar {
    padding-top: 4.5rem !important;
  }

  .sidebar nav {
    display: block;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .sidebar a {
    font-size: 1rem;
    display: block;
    margin: 2px 0;
    font-size: 1.2rem;
    padding: 0.35rem 1.5rem;
    text-decoration: none;
    color: var(--gray-900);
    position: relative;

    &:hover {
      color: var(--color-primary);
    }
  }

  .sidebar nav ul {
    margin: 0 0 2rem;
  }

  .sidebar nav li {
    position: relative;
    margin: 10px 0;
  }

  .sidebar nav li a.active:before {
    content: "";
    display: block;
    position: absolute;
    left: 0rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 2px;
    border-radius: 2px;
    background: var(--color-primary);
  }

  .sidebar nav li a {
    font-size: 1.2rem;
    padding: 0.35rem 1.5rem;
    border-radius: 0;
    color: var(--gray-800);
  }

  .sidebar > .app-name {
    display: none;
  }

  .sidebar-nav {
    display: none;
  }

  .content {
    padding-top: 3.5rem;
  }

  /* Mobile markdown & typography */
  .markdown-section {
    max-width: 100%;
    padding: 50px 1.25rem;
  }
  .markdown-section h1 {
    font-size: 2rem;
    margin-top: 1rem;
  }
  .markdown-section h2 {
    font-size: 1.7rem;
  }
  .markdown-section h3 {
    font-size: 1.4rem;
  }
  .markdown-section h4 {
    font-size: 1.2rem;
  }

  .markdown-section table td {
    font-size: 15px;
  }

  .markdown-section pre {
    margin-inline: -1.25rem;
    border-radius: 0;
  }

  .markdown-section pre > code {
    font-size: 14px !important;
  }

  .copy-code-button {
    right: 1.25rem;
    background: var(--bg) !important;
  }
}

/* From original style.css */

.beta {
  display: inline-block;
  background-color: var(--color-primary);
  color: #ffffff;

  background-color: var(--color-surface-purple);
  color: var(--color-accent);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;

  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1.6;

  .app-name & {
    margin-left: -3px;
  }
}

@supports (corner-shape: superellipse(1.666)) {
  .beta {
    border-radius: 0.4rem;
    corner-shape: superellipse(1.666);
  }
}

/* ── Mermaid diagrams ────────────────────────────────────────────────────── */

/* Edge label backgrounds and text */
.edgeLabel rect,
.edgeLabel .label rect {
  fill: var(--gray-200) !important;
}

.edgeLabel .label {
  color: var(--gray-900) !important;
}

.edgeLabel span {
  color: var(--gray-900) !important;
  background-color: var(--gray-200) !important;
}
.mermaid-dark .edgeLabel span {
  background-color: #624969 !important;
}

/* Mermaid sequence diagram arrowheads */
.mermaid-light .arrowMarkerEnd path,
.mermaid-light .messageLine0,
.mermaid-light .messageLine1 {
  stroke: var(--gray-900) !important;
}
.mermaid-light .arrowMarkerEnd path {
  fill: var(--gray-900) !important;
}
.mermaid-dark .arrowMarkerEnd path,
.mermaid-dark .messageLine0,
.mermaid-dark .messageLine1 {
  stroke: var(--gray-100) !important;
}
.mermaid-dark .arrowMarkerEnd path {
  fill: var(--gray-100) !important;
}

span.edgeLabel:empty {
  display: none;
}

/* Subgraph (cluster) boxes */
.cluster rect {
  fill: var(--color-surface-pink) !important;
  stroke: #f5c0e0 !important;
  stroke-width: 1.5px !important;
  rx: 6px !important;
  ry: 6px !important;
}

.cluster .nodeLabel,
.cluster span {
  color: var(--color-primary-active) !important;
  font-weight: 600;
}

.edgeLabel {
  border-radius: 2px;
  padding: 1px 3px;
  font-size: 0.925em;
}

/* Footer menu */
.footer-menu {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  max-width: 600px;
  margin: 4rem 0 0;

  @media (width <= 768px) {
    width: 100%;
    gap: 1.25rem;
  }
}

.footer-menu a {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  text-decoration: none;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  flex: 1;
  gap: 0.2rem;
  transition: all 0.1s ease-out;
  color: var(--gray-900);
  max-width: 300px;
}
.footer-menu a:hover {
  background-color: var(--gray-100);
}
.footer-menu a span {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.8em;
  line-height: 1.3;
}

.footer-menu a:only-child {
  width: 100%;
  max-width: none;
}

.footer-menu a.prev span::before {
  content: "";
  border-style: solid;
  border-width: 0 0 1px 1px;
  transform: rotate(45deg) translate(-1px, -1px);
  margin-right: 3px;

  border-color: inherit;
  display: inline-block;
  width: 0.3rem;
  height: 0.3rem;
}

.footer-menu a.next {
  text-align: right;
}
.footer-menu a.next span::after {
  content: "";
  border-style: solid;
  border-width: 0 0 1px 1px;
  transform: rotate(-135deg) translate(0px, 1px);
  margin-left: 3px;

  border-color: inherit;
  display: inline-block;
  width: 0.3rem;
  height: 0.3rem;
}
