/* Catppuccin Mocha — minimal */
:root {
  --base: #1e1e2e;
  --crust: #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --overlay0: #6c7086;
  --subtext0: #a6adc8;
  --text: #cdd6f4;
  --blue: #89b4fa;
  --maroon: #eba0ac;
  --pink: #f5c2e7;
  --measure: 80ch;
}

* { box-sizing: border-box; }

body {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.5;
  background: var(--base);
  color: var(--text);
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  position: relative;
}

::selection { background: var(--pink); color: var(--crust); }

/* header: title and nav on one line, ruled off from the content */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--surface0);
}
h1 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--subtext0);
}
h1 a { color: var(--pink); font-weight: 700; text-decoration: none; }
.nav { display: flex; gap: 1rem; }
.nav a { color: var(--subtext0); text-decoration: none; }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
header + h2 { margin-top: 0; }

a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* prose */
p, ul { max-width: var(--measure); }
p { margin: 0 0 0.6rem; }
h2 {
  font-size: 1em;
  font-weight: 700;
  margin: 1.25rem 0 0.25rem;
  color: var(--pink);
}
h2:target { scroll-margin-top: 1rem; }
ul { margin: 0; padding-left: 1.25rem; }
li::marker { color: var(--overlay0); }
li + li { margin-top: 0.4rem; }
b { font-weight: 600; color: var(--subtext0); }

code {
  font-family: inherit;
  font-size: 0.95em;
  background: var(--crust);
  color: var(--maroon);
  padding: 0 0.3em;
  border-radius: 3px;
}

/* footer */
footer {
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--surface0);
}
.muted { color: var(--overlay0); margin: 0; }

/* charts */
.chart {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 0.5rem;
}

/* forms */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
  max-width: 40rem;
}
input, button {
  font: inherit;
  color: var(--text);
  padding: 0.25em 0.6em;
  border-radius: 3px;
}
input {
  flex: 1 1 14rem;
  min-width: 0;
  background: var(--crust);
  border: 1px solid var(--surface1);
}
input::placeholder { color: var(--overlay0); }
button {
  background: var(--surface0);
  border: 1px solid var(--surface1);
  cursor: pointer;
}
button:hover { background: var(--surface1); }
