:root {
  --surface: oklch(25% 0 0);
  --border: oklch(30% 0 0);
  --outline: oklch(40% 0 0);
  --muted: oklch(70% 0 0);
  --text: oklch(90% 0 0);

  --duration: 150ms;

  --radius-small: 0.25rem;
  --radius: 0.5rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --thumbnail: 10rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid var(--muted);
}

.right {
  text-align: right;
}

a {
  color: #4169e1;
}

a:not(:hover) {
  text-decoration: none;
}

a:not([href]) {
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100dvh;
}

code {
  font-family: ui-monospace, Menlo, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

dd > ol {
  display: grid;
  grid-template-columns: max-content auto;
  margin-block: 0;
  padding-left: 0;
  row-gap: var(--space-2);
  width: fit-content;

  > li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;

    > dl {
      grid-column: 1 / -1;
      grid-template-columns: subgrid;
      width: auto;
    }
  }
}

dl dl {
  margin-block: 0;
}

dl, .thumbnails a, .artwork {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.thumbnails a, .artwork {
  display: block;
  outline: 1px solid transparent;
  overflow: hidden;
  transition: outline-color var(--duration);

  &:hover, &:focus-visible {
    outline-color: var(--outline);
  }

  img {
    display: block;
  }
}

dl {
  display: grid;
  grid-template-columns: max-content auto;
  width: fit-content;

  > div {
    column-gap: var(--space-3);
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    padding: var(--space-1);

    + div {
      border-top: 1px solid var(--border);
    }
  }
}

dt {
  font-style: italic;
}

h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1, h2 {
  margin-block: var(--space-4) var(--space-2);
}

body > header {
  background-color: var(--surface);
}

body > * {
  padding: var(--space-2);
}

html {
  -webkit-text-size-adjust: 100%;
  background-color: oklch(18% 0 0);
  color-scheme: dark;
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  text-size-adjust: 100%;
}

main {
  flex: 1;
  padding-top: 0;
}

dl, ol, ul, table {
  margin-block: var(--space-2);
}

table {
  border-collapse: collapse;
}

tbody tr + tr {
  border-top: 1px solid var(--border);
}

td {
  padding-block: var(--space-1);
}

td:not(:last-child), th:not(:last-child) {
  padding-right: var(--space-3);
}

th {
  text-align: left;

  a {
    color: inherit;
  }
}

.thumbnails {
  gap: var(--space-3);
  list-style: none;
  padding-left: 0;

  a:not(:has(img)) {
    background-color: var(--surface);
  }

  img {
    height: 100%;
    width: 100%;
  }
}

body > header > nav {
  display: flex;
  font-size: 1.25em;
  justify-content: space-between;

  a {
    color: var(--text);
    text-decoration: none;
  }
}
