* {
  margin: 0;
  padding: 0;
}

:root {
  --padding: 1.5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;
  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --color-code-light-grey: #cacbd1;
  --color-code-comment: #a9aaad;
  --color-code-white: #c5c9c6;
  --color-code-red: #d16464;
  --color-code-orange: #de935f;
  --color-code-yellow: #f0c674;
  --color-code-green: #a7bd68;
  --color-code-aqua: #8abeb7;
  --color-code-blue: #7e9abf;
  --color-code-purple: #b294bb;
  --font-family-sans: "DM Mono", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  --font-family-mono: "Zed Mono", "DM Mono", "SFMono-Regular", Consolas,
    "Liberation Mono", Menlo, Courier, monospace;
}

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
}

img {
  width: 100%;
}

body {
  padding: var(--padding);
  max-width: 70rem;
  margin: 0 auto;
}

li {
  list-style: none;
}

a {
  color: currentColor;
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

strong,
b {
  font-weight: 500;
}

small {
  font-size: inherit;
  color: var(--color-text-grey);
}

h1 {
  font-size: 3rem;
  margin-bottom: 5rem;
  font-weight: 500;
}

/* layout */
.container {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

header {
  margin-top: 3rem;
  margin-bottom: 5rem;
}

.end {
  margin-bottom: 6rem;
}

.end p {
  margin-top: 3rem;
}

time {
  display: block;
  margin-bottom: 3rem;
  color: var(--color-text-grey);
}

/* content */
.text {
  line-height: 1.5em;
  hanging-punctuation: first;
}

.text a {
  text-decoration: underline;
}

.text :first-child {
  margin-top: 0;
}

.text :last-child {
  margin-bottom: 0;
}

.text p,
.text ul,
.text ol,
.text .block {
  margin-bottom: 1.5rem;
}

.text ul {
  margin-left: 1rem;
}

.text ol {
  margin-left: 2.125rem;
}

.text ul p,
.text ol p {
  margin-bottom: 0;
}

.text ul > li {
  list-style: disc;
}

.text ol > li {
  list-style: decimal;
}

.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}

.text h1,
.h1,
.intro {
  font-size: 2rem;
  margin-bottom: 3rem;
  line-height: 1.25em;
}

.text h2,
.h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.text h3,
.h3 {
  font-weight: 500;
}

.text .codeblock {
  display: grid;
}

.text code {
  font-family: var(--font-family-mono);
  font-size: 1rem;
  background: var(--color-light);
  padding: 0 0.25rem;
  display: inline-block;
  color: var(--color-black);
}

.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
  font-family: var(--font-family-mono);
}

.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.text hr {
  margin: 6rem 0;
}

.text dt {
  font-weight: 500;
}

.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}

.text blockquote footer {
  font-size: 0.875rem;
  font-style: italic;
}

.text figure {
  margin: 3rem 0;
}

.text figcaption {
  padding-top: 0.75rem;
  color: var(--color-text-grey);
}

.text table {
  width: 100%;
  margin-bottom: 1.5rem;
}

.text table th {
  text-align: left;
}

.block.block-type-gallery {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.block-type-gallery ul {
  margin-left: 0;
  margin-bottom: 0;
}

.block-type-gallery ul > li {
  list-style-type: none;
}

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-black);
}
.img img,
.video iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.img[data-contain] img {
  object-fit: contain;
}
.img-caption,
.video-caption {
  padding-top: 0.75rem;
  line-height: 1.5em;
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: var(--color-white);
    --color-text-grey: var(--color-grey);
    --color-background: #191c20;

    .text blockquote {
      border-left: 2px solid var(--color-grey);
    }
  }
}
