body {
  font-family: "Custom Clean Serif", serif, monospace;
  max-width: min(62rem, 2000px);
}

.back-button {
  position: fixed !important;
  left: 5%;
  top: 5%;
  color: #33bbff;
}

header {
  margin-top: 10%;
}

header h1 {
  font-size: 3.2rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  font-weight: 900;
}

.post-meta {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  opacity: 0.7;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;

  justify-content: right;
}

.post-meta-sep {
  opacity: 0.6;
}

header hr {
  width: 100%;
  opacity: 0.35;
  margin: 0 0 2rem;
}

main {
  line-height: 1.8;
  font-size: 1.5rem;

  text-align: justify;
  text-justify: newspaper;
  text-align-last: left;
}


main h2 {
  font-size: 2.35rem;
  margin: 4.2rem 0 2.2rem;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text-primary), transparent 80%);
}

main h3 {
  font-size: 1.75rem;
  margin: 1.6rem 0 0.3rem;
}

main p {
  margin: 0 0 1rem;
}

main ul,
main ol {
  padding: 0 0 0 1.25rem;
  margin: 0 0 1rem;
}

main li {
  margin-bottom: 0.25rem;
}

main hr {
  width: 100%;
  opacity: 0.3;
  margin: 1.75rem 0;
}

main blockquote {
  margin: 1rem 0 1rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid color-mix(in srgb, var(--text-primary), transparent 50%);
  opacity: 0.75;
  font-style: italic;
}

main blockquote p {
  margin: 0;
}

main details.note {
  margin: 1rem 0;
  padding: 0.6rem 1rem;
  border: 1px solid color-mix(in srgb, var(--text-primary), transparent 70%);
  font-size: 1.2rem;
}

main details.note.info {
  border-color: color-mix(in srgb, #33bbff, transparent 55%);
  background-color: color-mix(in srgb, #33bbff, transparent 93%);
}

main details.note summary {
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  font-size: inherit;
  letter-spacing: 0.04em;
  list-style: none;
  opacity: 0.8;
}

main details.note summary::-webkit-details-marker {
  display: none;
}

main details.note p {
  margin: 0.5rem 0 0;
}

footer {
  margin-top: 3rem;
}

.ul_red {
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 0, 0.7);
}

.ul_yellow {
  text-decoration: underline;
  text-decoration-color: rgba(218, 165, 32, 0.85);
}

.faded {
  opacity: 0.55;
}

@media (max-width: 768px) {
  a.back-button { display: none !important; }
  header { margin-top: 25%; }
  main { margin-top: 1.2em; }
  body { margin-top: 2em; }
  header h1 {
    font-size: 1.7rem;
  }
  main {
    font-size: 1.1rem;
    line-height: 1.7;
  }
  main h2 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1.4rem;
  }
  main h3 {
    font-size: 1.25rem;
  }
}

.scroll-top {
  position: fixed;
  bottom: 5%;
  left: calc(50% + 32rem);

  border: 1px solid var(--text-primary);
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  opacity: 0.5;

  padding: 6px;
  width: 40px;
  height: 40px;

  z-index: 1000;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.scroll-top svg {
  width: 100%;
  height: 100%;
}

.scroll-top:hover {
  opacity: 1;
  color: goldenrod;
}

.scroll-top:focus {
  outline: none;
}

@media (max-width: calc(62rem + 8rem)) {
  .scroll-top {
    left: auto;
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
  }
}

@media (max-width: 75rem) {
  .back-button {
    display: none !important;
  }
  .scroll-top {
    display: none;
  }
}

@media print {
  .back-button,
  footer,
  .theme-toggle,
  .scroll-top {
    display: none !important;
  }
}
