:root {
  --max-width: 800px;
  --container-width: 90%;
  --border-color: #000;
  --spacing-sm: 0.25rem;
}

* {
  margin: 10px 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 1.15rem;
  font-family: Georgia, serif;
}

a {
  color: var(--border-color);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

header,
main,
footer {
  max-width: var(--max-width);
  width: var(--container-width);
  margin: 0 auto;
}

header {
  container-type: inline-size;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: var(--spacing-sm);

  a {
    display: inline-block;
    width: 15%;
  }

  img {
    margin: 0;
    display: block;
    width: 100%;
    height: auto;
  }
}

.text {
  font-size: 10cqw;
  margin: 0;
}

.fullmono {
  font-family: 'Courier New', Courier, monospace;
  text-align: justify;
  text-align-last: justify;
  text-justify: inter-character;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

main {
  margin: 10px 0;

  ul {
    list-style-type: none;
    border-bottom: 2px dashed var(--border-color);

    li {
      margin: 0;
      padding: 10px 0;
      border-top: 2px dashed var(--border-color);
      display: flex;
      flex-direction: row;
      justify-content: space-between;

      div {
        margin: 0;
      }

      .data {
        text-align: right;
      }
    }
  }

  p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    line-height: 1.6;

    a,
    b,
    i,
    small,
    span {
      margin: 0;
      font-size: inherit;
    }

    sup,
    sub {
      margin: 0;
      line-height: 1;

      a span {
        font-size: 80%;
      }
    }
  }

  figure {
    margin: 0;
    padding: 0;
  }

  img {
    display: block;
    width: 100%;
    height: auto;
  }

  figcaption {
    text-align: justify;
    font-size: 0.9rem;
    margin: 0;
  }

  hr {
    border: none;
    border-top: 2px dotted var(--border-color);
  }

  .float-right {
    float: right;
    width: 320px;
    margin: 0 0 0 1.5rem;
  }

  .center {
    text-align: center;
  }

  .right {
    text-align: right;
  }

  .no-line-height {
    line-height: 1.2;
  }
}

.listheader p {
  text-align: center;
}

.header {
  border-bottom: 2px dashed var(--border-color);
  padding-bottom: var(--spacing-sm);

  h1 {
    font-size: 2.5rem;
  }
}

.justified-center {
  text-align: justify;
  text-align-last: center;
  text-justify: inter-word;
}

footer {
  border-top: 2px solid var(--border-color);
  padding-top: var(--spacing-sm);

  ul {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    list-style-type: none;
    padding-left: 0;
  }
}

/* JavaScript helpers */
.letter {
  margin: 0;
  display: inline-block;
  width: 0.7em;
  text-align: center;
}

/* Responsiveness */
@media screen and (max-width: 768px) {
  * {
    font-size: 1rem;
  }

  main {
    margin: 5px 0;

    p {
      text-align: left;
    }

    .center {
      text-align: center;
    }

    .right {
      text-align: right;
    }

    figcaption {
      font-size: 0.8rem;
    }

    .float-right {
      float: none;
      width: 100%;
      margin: 0 0 1rem 0;
    }
  }

  .listheader p {
    text-align: justify;
  }

  .header h1 {
    font-size: 2rem;
  }
}
