:root {
  --accent: #2d9cdb;
  --grey: #444;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, sans-serif;
  line-height: 1.65;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 80ch;

  margin: 0 auto;
  padding: 0 24px;
}

@media only screen and (max-width: 468px) {
  .page-header {
    flex-direction: column;
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.page-header nav a:not(:hover):not(:focus) {
  color: currentColor;
  text-decoration: none;
}

nav a {
  margin: 0 6px;
  font-size: 1.2em;
}

main {
  flex-grow: 1;
  width: 100%;
  margin: 0 auto;
}

.page-footer {
  text-align: center;
  margin-bottom: 8px;
}

a[href] {
  color: var(--accent);
}

a[href]:hover {
  text-decoration: none;
}

a[href]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.footnotes {
  font-size: 0.8em;
}

/* Typography */

h1,
h2,
h3,
h4,
h5 {
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  font-size: 3.052em;
}

h2 {
  font-size: 2.441em;
}

h3 {
  font-size: 1.953em;
}

h4 {
  font-size: 1.563em;
}

h5,
.larger {
  font-size: 1.25em;
}

small {
  font-size: 0.8em;
}

/* backlinks */
.backlinks-title {
  margin-bottom: 0;
}

.backlinks-container {
  margin-top: 0;
}

.backlinks-default {
  margin-top: 0;
  margin-left: 16px;
  color: var(--grey);
}

.backlink__preview {
  display: none;

  position: absolute;
  bottom: 8px;
  left: 100%;
  background-color: #fff;
  border-radius: 4px;
  padding: 4px;
  box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.25);
  width: 348px;
  max-height: 148px;
  overflow: hidden;
}
.backlink__preview::after {
  content: "";
  position: absolute;
  bottom: 0;
  background: linear-gradient(transparent, white);
  width: 100%;
  height: 24px;
}

.backlink__preview h1 {
  font-size: 1.2rem;
  margin-top: 8px;
  font-weight: bold;
}

.backlink {
  width: fit-content;
  position: relative;
}

.backlink:hover {
  padding-right: 4px; /* Allow mouse to travel between link and modal */
}

.backlink:hover .backlink__preview {
  display: block;
}

/* Webmentions (reply) */

.wm-mentions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wm-mentioner {
  display: block;
  margin-right: 8px;
  font-weight: 700;
  text-decoration: none;
}

.wm-mentioner__img {
  border-radius: 2px;
  float: left;
  margin-right: 8px;
}

.wm-mention__time {
  color: var(--text--alt);
}

.wm-mention__content {
  margin: 8px 0 24px 0;
}

/* Callout */

.callout {
  --callout-color: currentColor;
  background-color: var(--callout-color);
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.85)
  );
  border-left: 4px solid var(--callout-color);
  padding: 4px 8px;
}

.callout--info {
  --callout-color: var(--info);
}

.callout--success {
  --callout-color: var(--success);
}

.callout--warning {
  --callout-color: var(--warning);
}

.callout--danger {
  --callout-color: var(--danger);
}
