/**
 * matcha.css — Custom build (Mon Sep 21 2026)
 * Copyright © 2026 Lecoq Simon (@lowlighter)
 * MIT license — https://github.com/lowlighter/matcha
 */
:root, :host {
  /* Font */
  --ft: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --ft-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  --ft-size: 18px;

  /* Layouts */
  --ly-header-size: 3.5rem;
  --ly-aside-size-small: 2.5rem;
  --ly-brand: #e6edf3;
  --ly-bg-brand: #010409;

  /* Colors */
  --light-default: #1f2328;
  --light-subtle: #1f2328;
  --light-contrast: #e6edf3;
  --light-muted: #656d76;
  --light-accent: #024CC6;
  --light-active: #024CC6;
  --light-variant: #BCEA3E;
  --light-success: #BCEA3E;
  --light-attention: #E70466;
  --light-severe: #E70466;
  --light-danger: #E70466;
  --dark-default: #e6edf3;
  --dark-subtle: #e6edf3;
  --dark-contrast: #1f2328;
  --dark-muted: #848d97;
  --dark-accent: #024CC6;
  --dark-active: #024CC6;
  --dark-variant: #BCEA3E;
  --dark-success: #BCEA3E;
  --dark-attention: #E70466;
  --dark-severe: #E70466;
  --dark-danger: #E70466;

  /* Backgrounds */
  --light-bg-default: #ffffff;
  --light-bg-subtle: #d0d7de;
  --light-bg-contrast: #24292f;
  --light-bg-muted: #f6f8fa;
  --light-bg-accent: #ddf4ff;
  --light-bg-active: #fbefff;
  --light-bg-variant: #ffeff7;
  --light-bg-success: #dafbe1;
  --light-bg-attention: #fff8c5;
  --light-bg-severe: #fff1e5;
  --light-bg-danger: #ffebe9;
  --dark-bg-default: #0d1117;
  --dark-bg-subtle: #30363d;
  --dark-bg-contrast: #6e7681;
  --dark-bg-muted: #161b22;
  --dark-bg-accent: #121d2f;
  --dark-bg-active: #231f39;
  --dark-bg-variant: #221926;
  --dark-bg-success: #12261e;
  --dark-bg-attention: #272115;
  --dark-bg-severe: #221a19;
  --dark-bg-danger: #25171c;

  /* Miscellaneous */
  --light-backdrop: #8c959f33;
  --light-bd-muted: #d0d7deb3;
  --dark-bd-muted: #30363db3;
  --dark-backdrop: #161b2266;
  --bd-radius: 6px;
  --tr-duration: 0.2s;
  --ct-width: 1024px;
}

/*
 * While everything below can be edited, it is advised to leave them to default and edit the upper rule instead for easier maintenance.
 */

:root, :host, [data-color-scheme="light"] {
  /* Colors */
  --default: var(--light-default);
  --subtle: var(--light-subtle);
  --contrast: var(--light-contrast);
  --muted: var(--light-muted);
  --accent: var(--light-accent);
  --active: var(--light-active);
  --variant: var(--light-variant);
  --success: var(--light-success);
  --attention: var(--light-attention);
  --severe: var(--light-severe);
  --danger: var(--light-danger);

  /* Backgrounds */
  --bg-default: var(--light-bg-default);
  --bg-subtle: var(--light-bg-subtle);
  --bg-contrast: var(--light-bg-contrast);
  --bg-muted: var(--light-bg-muted);
  --bg-accent: var(--light-bg-accent);
  --bg-active: var(--light-bg-active);
  --bg-variant: var(--light-bg-variant);
  --bg-success: var(--light-bg-success);
  --bg-attention: var(--light-bg-attention);
  --bg-severe: var(--light-bg-severe);
  --bg-danger: var(--light-bg-danger);

  /* Miscellaneous */
  --bd-muted: var(--light-bd-muted);
  --backdrop: var(--light-backdrop);
}

[data-color-scheme="dark"] {
  /* Colors */
  --default: var(--dark-default);
  --subtle: var(--dark-subtle);
  --contrast: var(--dark-contrast);
  --muted: var(--dark-muted);
  --accent: var(--dark-accent);
  --active: var(--dark-active);
  --variant: var(--dark-variant);
  --success: var(--dark-success);
  --attention: var(--dark-attention);
  --severe: var(--dark-severe);
  --danger: var(--dark-danger);

  /* Backgrounds */
  --bg-default: var(--dark-bg-default);
  --bg-subtle: var(--dark-bg-subtle);
  --bg-contrast: var(--dark-bg-contrast);
  --bg-muted: var(--dark-bg-muted);
  --bg-accent: var(--dark-bg-accent);
  --bg-active: var(--dark-bg-active);
  --bg-variant: var(--dark-bg-variant);
  --bg-success: var(--dark-bg-success);
  --bg-attention: var(--dark-bg-attention);
  --bg-severe: var(--dark-bg-severe);
  --bg-danger: var(--dark-bg-danger);

  /* Miscellaneous */
  --bd-muted: var(--dark-bd-muted);
  --backdrop: var(--dark-backdrop);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-color-scheme="light"]), :host:not([data-color-scheme="light"]) {
    /* Colors */
    --default: var(--dark-default);
    --subtle: var(--dark-subtle);
    --contrast: var(--dark-contrast);
    --muted: var(--dark-muted);
    --accent: var(--dark-accent);
    --active: var(--dark-active);
    --variant: var(--dark-variant);
    --success: var(--dark-success);
    --attention: var(--dark-attention);
    --severe: var(--dark-severe);
    --danger: var(--dark-danger);

    /* Backgrounds */
    --bg-default: var(--dark-bg-default);
    --bg-subtle: var(--dark-bg-subtle);
    --bg-contrast: var(--dark-bg-contrast);
    --bg-muted: var(--dark-bg-muted);
    --bg-accent: var(--dark-bg-accent);
    --bg-active: var(--dark-bg-active);
    --bg-variant: var(--dark-bg-variant);
    --bg-success: var(--dark-bg-success);
    --bg-attention: var(--dark-bg-attention);
    --bg-severe: var(--dark-bg-severe);
    --bg-danger: var(--dark-bg-danger);

    /* Miscellaneous */
    --bd-muted: var(--dark-bd-muted);
    --backdrop: var(--dark-backdrop);
  }
}

/* Computed properties */
/* stylelint-disable no-duplicate-selectors */
:root, :host {
  /* Shadows */
  --shadow: 0px 0px 0px 1px var(--bg-subtle), 0px 6px 12px -3px var(--backdrop), 0px 6px 18px 0px var(--backdrop);
  --shadow-r: 6px 0px 18px 0px var(--backdrop);
  --shadow-l: -6px 0px 18px 0px var(--backdrop);
  /** Forced colors */
  --light: var(--dark-default);
  --dark: var(--light-default);
}
/* stylelint-enable no-duplicate-selectors */

.layout-simple {
  display: grid;
  max-width: none;
  padding: 0 1.5rem;
  column-gap: 1.5rem;
  grid-template-areas:
    "header"
    "aside1"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
}

.layout-simple > :is(header:first-of-type, footer:last-of-type) {
  display: flex;
  height: max-content;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  margin-bottom: 0;
  background: var(--ly-bg-brand);
  color: var(--ly-brand);
  grid-area: header;
}

.layout-simple > :is(header:first-of-type, footer:last-of-type) > * {
  margin-top: 0;
  margin-bottom: 0;
}

.layout-simple > header:first-of-type {
  position: sticky;
  z-index: 200;
  top: 0;
  height: var(--ly-header-size);
  white-space: nowrap;
}

.layout-simple > main:only-of-type {
  grid-area: main;
}

.layout-simple > footer:last-of-type {
  overflow: auto;
  grid-area: footer;
}

.layout-simple > :is(header:first-of-type, footer:last-of-type) > nav > menu {
  flex-direction: row;
  justify-content: center;
}

.layout-simple > aside {
  display: none;
  padding: 0;
  border-left: none;
  margin: 0;
  backdrop-filter: blur(100px);
}

.layout-simple > aside > nav:only-child {
  position: sticky;
  top: var(--ly-header-size);
  overflow: auto;
  max-height: calc(100vh - var(--ly-header-size));
  box-sizing: border-box;
  padding: 0.5rem;
  margin: 0;
}

.layout-simple > aside:nth-of-type(1):is([data-expandable], [data-expand]) {
  display: block;
  overflow: hidden;
  max-height: var(--ly-aside-size-small);
  margin-right: -1.5rem;
  margin-left: -1.5rem;
  grid-area: aside1;
}

.layout-simple > aside:nth-of-type(1)[data-expand] {
  max-height: none;
}

.layout-simple > aside:nth-of-type(1)[data-expandable]::before {
  display: flex;
  height: var(--ly-aside-size-small);
  align-items: center;
  justify-content: center;
  content: attr(data-expandable);
  cursor: pointer;
}

.layout-simple > aside:nth-of-type(1)[data-expandable]:hover,
.layout-simple > aside:nth-of-type(1)[data-expandable][data-expand] {
  max-height: none;
}

.layout-simple > aside:nth-of-type(1)[data-expandable]:hover::before {
  color: var(--accent);
}

.layout-simple > aside > nav:only-child > ul {
  height: 100%;
}

.layout-simple > aside a {
  color: var(--default);
}

@media (min-width: 960px) {
  .layout-simple > aside:nth-of-type(1)[data-expandable]::before {
    display: none;
  }

  .layout-simple > aside:nth-of-type(1):is([data-expandable], [data-expand]) {
    overflow: unset;
    max-height: none;
    margin-right: 0;
    margin-left: 0;
  }

  .layout-simple:has(> aside:nth-of-type(1)) {
    padding-left: 0;
    grid-template-areas:
      "header header"
      "aside1 main"
      "footer footer";
    grid-template-columns: minmax(0, 0.4fr) 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .layout-simple:has(> aside:nth-of-type(1)) > :is(header:first-of-type, footer:last-of-type) {
    margin-left: 0;
  }

  .layout-simple > aside:nth-of-type(1) {
    display: block;
    box-shadow: var(--shadow-r);
    grid-area: aside1;
  }
}

@media (min-width: 1280px) {
  .layout-simple:has(> aside:nth-of-type(1)) {
    grid-template-areas:
      "header header header"
      "aside1 main   ."
      "footer footer footer";
    grid-template-columns: minmax(0, 0.3fr) 1fr minmax(0, 0.3fr);
  }

  .layout-simple:has(> aside:nth-of-type(2)) {
    padding-right: 0;
    grid-template-areas:
      "header header header"
      "aside1 main   aside2"
      "footer footer footer";
  }

  .layout-simple:has(> aside:nth-of-type(2)) > :is(header:first-of-type, footer:last-of-type) {
    margin-right: 0;
  }

  .layout-simple > aside:nth-of-type(2) {
    display: block;
    box-shadow: var(--shadow-l);
    grid-area: aside2;
  }
}

.layout-simple > header:first-of-type > nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  justify-content: center;
  background: var(--ly-bg-brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-duration), top var(--tr-duration);
}

.layout-simple > header:first-of-type:hover > nav {
  top: 100%;
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .layout-simple > header:first-child {
    justify-content: space-between;
  }

  .layout-simple > header:first-child > nav {
    position: static;
    height: var(--ly-header-size);
    justify-content: flex-start;
    opacity: 1;
    pointer-events: auto;
  }
}

a {
  color: var(--accent);
  text-decoration: inherit;
}

a:hover {
  text-decoration: underline;
}

a:active:hover {
  color: var(--active);
}

/* Ruby */
rp, rt {
  color: var(--muted);
  font-size: 75%;
}

/* Sidescript */
sup, sub {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

/* Annotations */
mark, ins, del {
  padding: 0 0.25rem;
  background: var(--bg-active);
  color: var(--active);
}

ins {
  background: var(--bg-success);
  color: var(--success);
  text-decoration: underline;
}

del {
  background: var(--bg-danger);
  color: var(--danger);
  text-decoration: line-through;
}

/* Details */
details {
  display: block;
  padding: 1rem;
  border: 1px solid var(--bd-muted);
  border-radius: var(--bd-radius);
  margin: 0 0 1rem;
}

summary {
  display: list-item;
  border-radius: calc(var(--bd-radius) - 1px) calc(var(--bd-radius) - 1px) 0 0;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

summary:hover {
  text-decoration: underline;
}

details[open] > summary {
  padding: 1rem;
  border-bottom: 1px solid var(--bd-muted);
  margin: -1rem;
  margin-bottom: 1rem;
  background: var(--bg-muted);
}

summary > :is(h1, h2, h3, h4, h5, h6) {
  display: inline;
}

code, var, samp, kbd {
  padding: 0.2rem 0.4rem;
  border-radius: var(--bd-radius);
  margin: 0;
  background: var(--bg-muted);
  font-family: var(--ft-mono);
  font-size: 85%;
  font-style: inherit;
  white-space: break-spaces;
}

var {
  background: var(--bg-accent);
  color: var(--accent);
}

samp, kbd {
  border: 1px solid var(--bd-muted);
}

kbd {
  border-color: var(--bg-muted);
  background: var(--bg-subtle);
}

output {
  padding: 0.25rem 0.5rem;
  border: 2px dashed var(--bd-muted);
  border-radius: var(--bd-radius);
  background: var(--bg-default);
  font: inherit;
  line-height: 1.5;
  user-select: all;
}

/* Paragraphs */
p, pre {
  margin: 0 auto 1rem;
}

p img {
  vertical-align: middle;
}

:is(p, pre):last-child {
  margin-bottom: 0;
}

/* Preformatted text */
pre {
  position: relative;
  overflow: auto;
  padding: 1rem;
  border-radius: var(--bd-radius);
  background: var(--bg-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

pre > code {
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
}

/* Quotation block */
blockquote {
  padding: 0.25rem 1rem;
  border-left: 0.25rem solid var(--bd-muted);
  margin: 0 0 1rem;
  color: var(--muted);
}

blockquote > cite:last-child {
  display: block;
  padding-left: 2rem;
  margin-top: 0.25rem;
  text-decoration: none;
}

blockquote > cite:last-child::before {
  content: "— ";
}

/* Figure */
figure {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

figcaption {
  display: block;
  width: 100%;
  margin: 1rem 0;
  color: var(--muted);
  text-align: center;
}

/* Header group */
hgroup {
  padding: 0.25rem 0.5rem;
  border-left: 0.25rem solid currentColor;
  margin: 0 0 1rem;
}

hgroup > :is(h1, h2, h3, h4, h5, h6)[id] > a:hover::before {
  right: calc(100% + 1.25rem);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  border-bottom: 1px solid transparent;
  margin: 0 0 1rem;
  line-height: 1.25;
}

:not(:is(dialog, article, body) > header:first-child) > :is(h1, h2) {
  border-color: var(--bd-muted);
}

:not(hgroup, blockquote, header) > :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-top: 1.5rem;
}

:is(h1, h2, h3, h4, h5, h6):last-child {
  margin-bottom: 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

h5 {
  font-size: 0.875rem;
}

h6 {
  color: var(--muted);
  font-size: 0.85rem;
}

:is(h1, h2, h3, h4, h5, h6)[id] > a {
  position: relative;
  color: inherit;
}

:is(h1, h2, h3, h4, h5, h6)[id] > a:hover {
  text-decoration: none;
}

:is(h1, h2, h3, h4, h5, h6)[id] > a:hover::before {
  position: absolute;
  top: 0.125rem;
  right: calc(100% + 0.25rem);
  color: var(--muted);
  content: "#";
}

:is(h1, h2, h3, h4, h5, h6)[id]:has(> a:hover) {
  border-color: currentColor;
}

/* Lists */
ul, ol, dl {
  padding-left: 2rem;
  margin: 0 0 1rem;
}

li > :is(ul, ol, dl) {
  margin: 0;
}

/* Definition lists */
dl, dt {
  padding: 0;
}

dt {
  margin: 1rem 0 0;
  font-weight: 600;
}

dd {
  padding: 0 1rem;
  margin: 0 0 1rem;
}

b, strong {
  font-weight: bold;
}

i, q, cite, em, dfn, strong {
  font-style: italic;
}

q::before {
  content: "« ";
}

q::after {
  content: " »";
}

dfn, em {
  font-weight: 600;
}

u, cite {
  text-decoration: underline;
}

u > u {
  text-decoration: underline double;
}

s {
  text-decoration: line-through;
}

s > s {
  text-decoration: line-through double;
}

small {
  font-size: 85%;
}

table {
  display: block;
  max-width: 100%;
  margin: 0 auto 1rem;
  border-collapse: collapse;
  border-spacing: 0;
  inline-size: fit-content;
  overflow-x: auto;
}

.table-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  overflow-x: auto;
}

.table-responsive table {
  display: table;
}

caption {
  margin-top: 0.5rem;
  caption-side: bottom;
  color: var(--muted);
}

tbody > tr:nth-child(2n) {
  background: var(--bg-muted);
}

th, td {
  padding: 0.375rem 0.8125rem;
  border: 1px solid var(--bd-muted);
}

th {
  border-color: var(--bg-contrast);
  background: var(--bg-subtle);
  font-weight: bold;
}

table.center td, th {
  text-align: center;
}

/** Your custom extra CSS here */