@font-face {
  font-family: "Supreme";
  src: url("../fonts/Supreme/Supreme-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
}

@font-face {
  font-family: "Supreme";
  src: url("../fonts/Supreme/Supreme-VariableItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 500;
  font-display: swap;
}

:root {
  --font-sans: "Supreme", sans-serif;
  --font-inter: "Supreme", sans-serif;
}

article {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  font-kerning: auto;
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
}

/* Apple displays usually benefit from lighter grayscale smoothing. */
@supports (-webkit-touch-callout: none) {
  article {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 410;
  }
}

/* Firefox on Linux/Windows tends to look crisper without extra smoothing overrides. */
@supports (-moz-appearance: none) {
  article {
    text-rendering: auto;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    font-weight: 400;
  }
}

article p {
  line-height: 1.84;
  letter-spacing: -0.011em;
  word-spacing: -0.015em;
  text-wrap: pretty;
}

article li {
  line-height: 1.78;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

article strong,
article b {
  font-weight: 500;
}

article #page-header h1,
article .typography h2,
article .typography h3,
article .typography h4 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  text-wrap: pretty;
}

article #page-header h1 {
  font-size: 1.5rem;
  line-height: 1.95rem;
}

article .typography h2 {
  font-size: 1.125rem;
  line-height: 1.55rem;
}

article .typography h3 {
  font-size: 1rem;
  line-height: 1.45rem;
}

article .typography h4 {
  font-size: 0.875rem;
  line-height: 1.3rem;
}

article .arithmatex {
  max-width: 100%;
}

article mark {
  --mark-color: 255 232 62;
  --mark-bg-angle: 50deg;
  border-radius: 3px 5px;
  background:
    conic-gradient(at 0 100%, rgb(var(--mark-color) / 100%) 1%, #fff0 3%) no-repeat 0 0 / auto 120%,
    conic-gradient(from 180deg at 100% 0, #fff0, rgb(var(--mark-color) / 100%) 1%, #fff0 4%) no-repeat 100% 100% / auto 120%,
    linear-gradient(var(--mark-bg-angle), rgb(var(--mark-color) / 60%), rgb(var(--mark-color) / 20%) 75%, rgb(var(--mark-color) / 55%)) no-repeat center / auto;
  color: inherit;
  padding: 0.03em 0.18em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.dark article mark {
  --mark-color: 130 92 24;
  background: linear-gradient(
    var(--mark-bg-angle),
    rgb(var(--mark-color) / 70%),
    rgb(var(--mark-color) / 55%) 75%,
    rgb(var(--mark-color) / 68%)
  ) no-repeat center / auto;
}

article mark:nth-of-type(3n + 2) {
  --mark-color: 245 214 73;
  --mark-bg-angle: 42deg;
}

article mark:nth-of-type(3n + 3) {
  --mark-color: 234 193 63;
  --mark-bg-angle: 138deg;
}

article .typography {
  counter-reset: article-step;
}

article .typography > ol {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

article .typography > ol > li {
  counter-increment: article-step;
  position: relative;
  padding-left: 2.25rem;
  line-height: 1.95;
}

article .typography > ol > li + li {
  margin-top: 0.55rem;
}

article .typography > ol > li::before {
  content: counter(article-step) ".";
  position: absolute;
  left: 0;
  min-width: 1.65rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

article .admonition,
article details {
  --callout-color: #171717;
  --callout-border: rgb(163 163 163 / 36%);
  --callout-background: rgb(245 245 244 / 82%);
  --callout-icon: url("https://api.iconify.design/lucide/file-text.svg");
  border-color: var(--callout-border);
  background: var(--callout-background);
  overflow: hidden;
}

article .admonition > p.admonition-title,
article details > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--callout-color);
  padding: 0.72rem 0.9rem 0;
  line-height: 1.3;
  background: transparent;
  border-bottom: 0;
}

article .admonition > p.admonition-title::before,
article details > summary::before {
  content: "";
  display: block;
  width: 1.08rem;
  height: 1.08rem;
  flex: 0 0 1.08rem;
  opacity: 1;
  background-color: var(--callout-color);
  mask-image: var(--callout-icon);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: var(--callout-icon);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

article .admonition.note,
article details.note {
  --callout-icon: url("https://api.iconify.design/lucide/notebook-tabs.svg");
}

article .admonition.abstract,
article details.abstract {
  --callout-border: rgb(214 174 44 / 42%);
  --callout-background: rgb(245 214 73 / 11%);
  --callout-color: rgb(138 104 20);
  --callout-icon: url("https://api.iconify.design/lucide/list-checks.svg");
}

article .admonition.info,
article details.info {
  --callout-icon: url("https://api.iconify.design/lucide/info.svg");
}

article .admonition.tip,
article details.tip {
  --callout-border: rgb(214 174 44 / 42%);
  --callout-background: rgb(245 214 73 / 11%);
  --callout-color: rgb(138 104 20);
  --callout-icon: url("https://api.iconify.design/lucide/lightbulb.svg");
}

article .admonition.warning,
article details.warning {
  --callout-border: rgb(214 174 44 / 42%);
  --callout-background: rgb(245 214 73 / 11%);
  --callout-color: rgb(138 104 20);
  --callout-icon: url("https://api.iconify.design/lucide/triangle-alert.svg");
}

article .admonition.danger,
article details.danger {
  --callout-color: #991b1b;
  --callout-border: rgb(220 38 38 / 42%);
  --callout-background: rgb(220 38 38 / 10%);
  --callout-icon: url("https://api.iconify.design/lucide/octagon-alert.svg");
}

article .admonition.success,
article details.success {
  --callout-icon: url("https://api.iconify.design/lucide/circle-check-big.svg");
}

article .admonition.question,
article details.question {
  --callout-icon: url("https://api.iconify.design/lucide/circle-help.svg");
}

article .admonition.example,
article details.example {
  --callout-icon: url("https://api.iconify.design/lucide/book-open-check.svg");
}

article .admonition.quote,
article details.quote {
  --callout-icon: url("https://api.iconify.design/lucide/quote.svg");
}

article .admonition.todo,
article details.todo {
  --callout-icon: url("https://api.iconify.design/lucide/circle-plus.svg");
}

/* Keep callout body content block-level so nested lists don't collapse inline. */
article .admonition > p:not(.admonition-title):first-child,
article .admonition > p:not(.admonition-title):nth-child(2) {
  display: block;
  margin: 0;
}

article .admonition > p.admonition-title {
  margin: 0;
  flex-wrap: nowrap;
}

article .admonition > :not(.admonition-title) {
  margin-top: 0.75rem;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

article details > summary {
  list-style: none;
}

article details > summary::-webkit-details-marker {
  display: none;
}

article .admonition > :last-child,
article details > :last-child {
  padding-bottom: 0.85rem;
}

article .admonition li {
  display: list-item;
}

article .arithmatex .katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

article .arithmatex .katex-display > .katex {
  min-width: max-content;
}

[data-sidebar="menu-button"] {
  height: auto !important;
  min-height: 2.25rem;
  align-items: flex-start;
  line-height: 1.35;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

[data-sidebar="menu-button"] > span:last-child,
[data-sidebar="menu-button"] {
  text-wrap: pretty;
}

.mobile-nav-dialog {
  width: 100vw; max-width: none;
  height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
}

.mobile-nav-dialog::backdrop { background: rgb(0 0 0 / 0.18); }

.mobile-nav-sheet {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgb(255 255 255 / 0.92);
  color: var(--foreground);
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
  backdrop-filter: blur(18px);
}

.dark .mobile-nav-sheet { background: rgb(18 18 18 / 0.9); }

.mobile-nav-head {
  position: sticky; top: 0; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0 0.85rem;
  font-size: 1.1rem;
  font-weight: 650;
  background: inherit;
}

.mobile-nav-head button {
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  background: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}

.mobile-nav-list, .mobile-nav-children { display: grid; gap: 0.35rem; }

.mobile-nav-link,
.mobile-nav-section > summary {
  display: block;
  min-height: 2.75rem;
  border-radius: 0.8rem;
  padding: 0.7rem 0.8rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.mobile-nav-link.is-active { background: var(--accent); font-weight: 650; }

.mobile-nav-section > summary {
  position: relative;
  cursor: pointer;
  font-weight: 650;
  padding-right: 2.25rem;
}

.mobile-nav-section > summary::marker { content: ""; }

.mobile-nav-section > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.55;
  rotate: -45deg;
  translate: 0 -50%;
  transition: rotate 160ms ease;
}

.mobile-nav-section[open] > summary::after { rotate: 45deg; }

.mobile-nav-children {
  margin: 0.1rem 0 0.45rem 0.65rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--border);
}

.mobile-nav-depth-0 { font-size: 1.05rem; }
.mobile-nav-depth-1, .mobile-nav-depth-2, .mobile-nav-depth-3 { font-size: 0.95rem; }

article > pre,
article .codehilite,
article .admonition .codehilite {
  background: #fff9eb;
  border: 1px solid #e8ddba;
}


@media (max-width: 767px) {
  article {
    font-size: 16px;
  }

  article .admonition {
    font-size: 0.95rem;
  }
   .katex-display,

  .MathJax_Display {

    overflow-x: auto;

    overflow-y: hidden;

    padding-bottom: 0.25rem;

  }

  .katex-display > .katex {

    display: inline-block;

    min-width: 100%;

  }
}
