:root {
  color-scheme: dark;
  --bg: #000;
  --text: #bdbdbd;
  --text-strong: #d7d7d7;
  --selection: rgba(255, 255, 255, 0.18);
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", Times, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
}

.page {
  min-height: 100vh;
  padding: 66px 56px 160px;
}

.editor {
  width: min(700px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 226px);
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: 0;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  caret-color: var(--text-strong);
}

.editor:focus {
  outline: none;
}

.editor::selection,
.editor *::selection {
  background: var(--selection);
}

.editor b,
.editor strong {
  color: var(--text-strong);
  font-weight: 700;
}

.editor h1,
.editor h2,
.editor h3 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 500;
  line-height: 1.25;
}

.editor h1 {
  font-size: 1.45em;
}

.editor h2 {
  font-size: 1.25em;
}

.editor h3 {
  font-size: 1.1em;
}

.editor a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.12em;
}

.editor p,
.editor div {
  margin: 0;
}

.editor ul,
.editor ol,
.editor blockquote,
.editor pre {
  margin: 0 0 1em;
}

.editor ul,
.editor ol {
  padding-left: 1.5em;
}

.editor li > ul,
.editor li > ol {
  margin: 0.05em 0 0.05em;
}

.editor li {
  margin: 0.04em 0;
}

.editor blockquote {
  padding-left: 1em;
  border-left: 1px solid #444;
}

.editor code,
.editor pre {
  font-family: var(--font-mono);
  font-size: 0.78em;
}

.editor code {
  color: var(--text-strong);
}

.extra-cursor {
  display: inline-block;
  position: relative;
  width: 0;
  height: 1em;
  vertical-align: -0.08em;
  pointer-events: none;
}

.extra-cursor::after {
  position: absolute;
  top: 0.08em;
  bottom: 0.08em;
  left: 0;
  border-left: 1px solid var(--text-strong);
  content: "";
  animation: caret-blink 1s steps(2, start) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 38px 26px 120px;
  }

  .editor {
    min-height: calc(100vh - 158px);
    font-size: 21px;
    line-height: 1.55;
  }
}
