html {
  --color-bg: rgb(13, 17, 23);
  --color-font: rgb(201, 209, 217);
  --color-border: #30363d;
  --color-border-muted: #21262d;
  --color-primary-bg: #fbc101;
  --color-primary-font: #000;

  height: 100%;
  font-family: 'Lato', sans-serif;
}

* {
  box-sizing: border-box;
}

.page {
  background: var(--color-bg);
  color: var(--color-font);

  display: grid;
  grid-template-columns: 400px auto;

  height: 100vh;
}

/* Menu */

.menu {
  border-right: 1px solid var(--color-border);
  padding: 1rem;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.menu_title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1em;
  text-align: center;
}

.menu_title a {
  color: inherit;
  text-decoration: none;
}

.menu_search {
  margin-top: auto;
}

.menu_list {
  width: 100%;

  display: grid;
  grid-auto-flow: row;
  row-gap: 0.5em;
  padding-left: 1em;

  line-height: 1.5;

  list-style: square;
}

.menu_entry.is-hidden {
  display: none;
}

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

.menu_entry a:focus,
.menu_entry a:hover {
  text-decoration: underline;
}

.login-form {
  margin: 1em 0;
  padding-top: 1em;
  border-top: 1px solid var(--color-border);
}

/* Content */

.content-scroller {
  height: 100%;
  overflow-y: auto;

  padding: 1rem;
}

.content {
  font-size: 1rem;

  padding-bottom: 10vh;

  width: 800px;
  margin: 0 auto;
}

.content a {
  color: var(--color-primary-bg);
  text-decoration: underline;
}

.content p {
  line-height: 1.5;
  margin-bottom: 2em;
}

.content h1 {
  font-size: 2em;
  font-weight: bold;

  padding-bottom: 0.5em;
  margin-bottom: 1em;

  border-bottom: 1px solid var(--color-border-muted);
}

.content h2 {
  font-size: 1.6em;
  font-weight: bold;

  padding-bottom: 0.5em;
  margin-bottom: 1em;

  border-bottom: 1px solid var(--color-border-muted);
}

.content h3 {
  font-size: 1.3em;
  font-weight: bold;

  margin-bottom: 1em;
}

.content h4 {
  font-size: 1.15em;
  font-weight: bold;

  margin-bottom: 1em;
}

.content h5 {
  font-size: 1em;
  font-weight: bold;

  margin-bottom: 1em;
}

.content pre {
  margin-bottom: 2em;
}

.content code {
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
  font-size: 0.9em;
}

.content img {
  max-width: 100%;
}

.content hr {
  color: var(--color-border-muted);
  margin-bottom: 2em;
}

.content ul,
.content ol {
  line-height: 1.5;
  margin-bottom: 2em;
  padding-left: 1em;
}

.content ul {
  list-style: square;
}

.content ol {
  list-style: decimal;
}

.content li {
  margin-bottom: 0.5em;
}

.content strong {
  font-weight: bold;
  text-decoration: underline;
}

.content em {
  font-style: italic;
}

.content th,
.content td {
  border: 1px solid var(--color-border);
  padding: 0.5em;
  text-align: left;
}

.content th {
  font-weight: bold;
}

.content table {
  margin-bottom: 2em;
}

.content blockquote {
  margin-left: 1em;
  padding-left: 1em;
  border-left: 2px solid var(--color-border);
}

/** Tags */

.tag-list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.7rem;

  margin-bottom: 2rem;
}

.tag-list_tag {
  background: var(--color-primary-bg);
  color: var(--color-primary-font);
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 1em;
  padding: 0.5em 1em;
  border-radius: 0.25em;
}

/* Likes */

.likes {
  display: flex;
  justify-content: flex-end;
  line-height: 2;
}

/* Comments */

.comments {
  display: grid;
  grid-auto-flow: row;
  row-gap: 2em;

  max-width: 500px;
  font-size: 1rem;
  margin-top: 3em;
}

.comment {
  display: grid;
  grid-template-areas: 'user time' 'content content';
  grid-template-rows: min-content auto;
  grid-template-columns: max-content auto;
  align-items: center;
  row-gap: 1em;
  column-gap: 1em;
}

.comment_user {
  grid-area: user;

  font-size: 1.1em;
  font-weight: bold;
}

.comment_time {
  grid-area: time;
  font-size: 0.8em;
}

.comment_content {
  grid-area: content;
  line-height: 1.5;
  font-size: 1.1em;

  padding: 0.5em 0 0.5em 1em;
  margin-left: 1em;
  border-left: var(--color-border-muted) 1px solid;
}

.comments-form {
  margin-top: 3em;
}

/* Components */

.header {
  font-size: 1.6em;
  font-weight: bold;

  padding-bottom: 0.5em;
  margin-bottom: 1em;

  border-bottom: 1px solid var(--color-border-muted);
}

.button {
  display: inline-block;

  background: var(--color-primary-bg);
  color: var(--color-primary-font);

  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: 'Lato', sans-serif;

  padding: 0.5em 1em;
  border-radius: 0.25em;

  cursor: pointer;

  border: 0;
}

.button[disabled] {
  cursor: auto;
  opacity: 0.25;
}

.form {
  display: grid;
  grid-auto-flow: row;
  row-gap: 8px;
}

.form_label {
  display: grid;
  grid-template-columns: 150px auto;
}

.form_textarea {
  width: 100%;
  height: 100px;
  min-height: 100px;
  resize: vertical;
}

.form_input {
  width: 100%;
}

.form_submit {
  margin-top: 1em;
  justify-self: flex-end;
}

.is-hidden {
  display: none;
}
