html {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.15rem;
}

ol,
ul {
  list-style-position: inside;
}

html,
body {
  height: 100svh;
  width: 100svw;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

input {
  max-width: 100%;
}

main {
  width: 100%;
  max-width: 800px;
  padding-left: 5px;
  padding-right: 5px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

nav.main-nav {
  display: flex;
  align-self: stretch;

  ol {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    gap: 10px;

    li {
      padding: 5px;
      margin: 5px;
      background-color: hsl(0, 0%, 90%);
    }

    li.flex-spacer {
      background-color: hsla(0, 0%, 0%, 0%);
      flex: 1;
    }
  }
}

.dictionary-form,
.tag-form,
.entry-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;

  label {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;

    input:not([type="checkbox"]),
    select {
      flex: 1 0 max-content;
      align-self: center;
      padding: 10px;
      min-width: fit-content;
    }
  }

  label.definition {
    flex: 1;
    display: block;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;

    .editor-wrapper {}

    .editor {
      cursor: text;
    }
  }

  button[type="submit"] {}
}

.dictionary-form {
  flex-direction: row;
}

.entry-list {
  width: 100%;
  list-style: decimal;

  li.entry {
    margin-left: 20px;
    padding-left: 20px;
  }

  li.entry:not(:last-child) {
    padding-bottom: 10px;
  }
}

.entry-actions {
  align-self: flex-end;
  display: flex;
  gap: 10px;
}

input[type="text"],
select {
  border: solid 1px black;
  padding: 10px;
}

select {
  background-color: hsl(0, 0%, 90%);
}

label>select,
label>input {
  margin-left: 10px;
}

button {
  border: solid 1px black;
  padding: 10px;
}

button[type="submit"] {
  background-color: hsl(from lightgreen h 50% l);
}

button.danger {
  background-color: hsl(from crimson h 80% 80%);
}

h1 {
  font-weight: bold;
  font-size: 1.5rem;
}

input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border: solid 1px black;
  background-color: white;
}

input[type="checkbox"]:checked {
  width: 1rem;
  height: 1rem;
  border: solid 1px black;
  background-color: black;
}

.item-header {
  align-self: stretch;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 10px;
}

li.card {
  margin: 5px;
  padding: 5px;
  border: solid 1px lightgrey;
  border-radius: 5px;
}

.card-list {
  align-self: stretch;
}

.card .title {
  font-size: 1.5rem;
  margin-right: 10px;
}

.editor {
  border: solid 1px grey;
  padding: 10px;
  min-height: 3rem;
}

.editor[contenteditable]:focus {
  outline: solid 2px black;
  /* box-shadow: 0px 0px 1px 1px grey; */
}

details {
  summary {
    text-wrap-mode: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .blurb {
    * {
      display: inline;
    }

    ol {
      list-style: decimal;

      li {
        display: inline list-item;

        * {
          display: inline;
        }
      }

      li:not(:first-child) {
        margin-left: 5px;
      }
    }
  }

  section {

    ol {
      margin-left: 30px;
      list-style: decimal;

      li {}
    }
  }
}

.alert {
  padding: 10px;
  align-self: stretch;
  margin: 10px;
  font-weight: bold;
  background-color: hsl(from crimson h 80% 80%);
}