:root{color-scheme:light dark;--bg:#ffffff;--bg2:#f6f6f6;--bg3:#d4d4d4;--line:#b1b1b1;--fg:#101010;--fg2:#838383;--accent:#207fdf;--keyword:#7855aa;--name:#207fdf;--value:#00b371;}
@media (prefers-color-scheme:dark){:root{--bg:#101010;--bg2:#1d1d1d;--bg3:#3f3f3f;--line:#565656;--fg:#ffffff;--fg2:#8e8e8e;--accent:#66b2ff;--keyword:#b092db;--name:#66b2ff;--value:#67e4b6;}}
:root {
  --muted: color-mix(in srgb, var(--fg) 62%, var(--bg));
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  display: grid;
  grid-template-columns: 13rem minmax(0, 42rem);
  gap: 3.5rem;
  justify-content: center;
  margin: 0;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

aside {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 3rem 0 2rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  padding-left: 1.45rem;
}

header a {
  color: var(--fg);
  font-weight: 650;
  text-decoration: none;
}

header label {
  display: none;
  color: var(--muted);
  cursor: pointer;
}

nav ul,
.recent ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul ul {
  margin-left: 0.5rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--bg3);
}

nav a,
.recent a,
nav summary {
  display: block;
  padding: 0.28rem 0.5rem 0.28rem 1.45rem;
  border-radius: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

nav summary {
  position: relative;
  list-style: none;
  user-select: none;
}

nav summary::-webkit-details-marker {
  display: none;
}

nav summary::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.62rem;
  width: 0.34rem;
  height: 0.34rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.12s;
}

nav details[open] > summary::before {
  transform: rotate(45deg);
}

nav a:hover,
.recent a:hover,
nav summary:hover {
  background: var(--bg2);
  color: var(--fg);
}

nav a[aria-current] {
  color: var(--fg);
  font-weight: 650;
}

.recent {
  margin-top: 1.75rem;
}

.recent h2 {
  margin: 0 0 0.4rem;
  padding-left: 1.45rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recent time {
  display: block;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

main {
  padding: 3rem 0 5rem;
}

.path {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

article {
  overflow-wrap: break-word;
}

article > :first-child {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  position: relative;
  margin: 2.2em 0 0.6em;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

h4,
h5,
h6 {
  font-size: 1rem;
}

.anchor {
  position: absolute;
  right: 100%;
  padding-right: 0.3em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
}

.anchor::before {
  content: "#";
}

:is(h1, h2, h3, h4, h5, h6):hover .anchor,
.anchor:focus {
  opacity: 1;
}

p,
ul,
ol,
pre,
table,
blockquote {
  margin: 0 0 1.1em;
}

li > ul,
li > ol {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.4em;
}

li:has(> input[type="checkbox"]) {
  list-style: none;
  margin-left: -1.4em;
}

li > input[type="checkbox"] {
  width: 1em;
  margin: 0 0.4em 0 0;
  accent-color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 0.4rem;
  vertical-align: middle;
}

code {
  padding: 0.12em 0.32em;
  border-radius: 0.25rem;
  background: var(--bg2);
  font: 0.875em var(--mono);
}

pre {
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  background: var(--bg2);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.c {
  color: var(--fg2);
}

.k {
  color: var(--keyword);
}

.f {
  color: var(--name);
}

.s {
  color: var(--value);
}

blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--bg3);
  color: var(--muted);
}

blockquote > :last-child,
.markdown-alert > :last-child {
  margin-bottom: 0;
}

.markdown-alert {
  margin: 0 0 1.1em;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 0.4rem 0.4rem 0;
  background: var(--bg2);
}

.markdown-alert-title {
  margin-bottom: 0.3em;
  font-weight: 650;
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--bg3);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg2);
  font-weight: 650;
}

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--bg3);
}

mark {
  padding: 0.05em 0.15em;
  border-radius: 0.2rem;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: inherit;
}

.spoiler {
  border-radius: 0.2rem;
  background: var(--fg);
  color: transparent;
}

.spoiler:hover {
  background: var(--bg2);
  color: inherit;
}

footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg3);
  font-size: 0.875rem;
  line-height: 1.5;
}

.graph {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.75rem;
  overflow: visible;
}

.graph line {
  stroke: var(--line);
  stroke-width: 1;
}

.graph line.on {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.graph circle {
  fill: var(--line);
  stroke: transparent;
  stroke-width: 12;
  transition: fill 0.12s;
}

.graph .near circle {
  fill: var(--fg);
}

.graph .here circle,
.graph a:hover circle {
  fill: var(--accent);
}

.graph text {
  fill: var(--muted);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3;
  transition: opacity 0.12s;
}

.graph .near text,
.graph .here text,
.graph a:hover text {
  opacity: 1;
}

.graph .here text,
.graph a:hover text {
  fill: var(--fg);
  font-weight: 650;
}

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.links h2 {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links li {
  margin-bottom: 0.8rem;
}

.links p {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.links mark {
  padding: 0;
  background: none;
  color: var(--fg);
}

@media (max-width: 52rem) {
  body {
    display: block;
    padding: 0 1.15rem;
  }

  aside {
    position: static;
    max-height: none;
    padding: 1.1rem 0 0;
    font-size: 1rem;
  }

  header {
    margin: 0;
    padding: 0;
  }

  header label {
    display: block;
  }

  nav {
    display: none;
    padding: 0.9rem 0 0.5rem;
  }

  .recent {
    display: none;
    margin-top: 0.75rem;
  }

  #menu:checked ~ aside nav,
  #menu:checked ~ aside .recent {
    display: block;
  }

  main {
    padding-top: 1.75rem;
  }

  .graph text {
    font-size: 17px;
  }

  .links {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
