@media screen and (max-width: 1000px) {
  .post main {
    padding-inline: 2.5rem;
  }
}

[id="sidebar"] > section + section {
  margin-block: 3rem;
}

@media screen and (max-width: var(--max-content-width-breakpoint)) {
  article :is(div:not(.footnote), h1, figcaption, [id="sidebar"]),
  article > footer {
    margin: auto 2rem 2rem;
  }
  
  article [id="sidebar"] {
    display: block;
    margin-block-start: 6rem;
    padding-block-start: 4rem;
    border-top: 1px solid #555;
  }
}

@media screen and (min-width: 1000px) {
  article {
    align-items: start;
    display: grid;
    column-gap: 4rem;
    grid-template-areas: "heading heading"
                         "content aside"
                         "footer aside";
    grid-template-columns: 66rem 30rem;
    width: var(--max-content-width);
    margin: auto;
  }

  article > header {
    grid-area: heading;
  }
 
  article > div {
    grid-area: content;
  }

  article > aside {
    grid-area: aside;
  }
  
  article > footer {
    grid-area: footer;  
  }
}

article h1 {
  font-size: clamp(4.8rem, 12vw, 6rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

[class^=date] {
  font-family: var(--accent-type);
  white-space: nowrap;
}

[id=sidebar] :is(h2) {
  margin-block-end: 1rem
}

.meta-list {
  font-size: 2rem;
  margin-block-start: 0;
}

hr {
  border: 1px solid #ccc;
  margin-block: 6rem 2rem;
}

.footnote {
  font-size: 1.6rem;
}

[id="related-posts"] {
  margin-block-start: 6rem;

  img {
    max-height: 26rem;
    object-fit: cover;
  }
}

@media screen and (min-width: 1000px) {
  [id="related-posts"] {
    margin-inline: 0rem;
  }
}

audio,
video {
  display: block;
  width: 100%;
}

audio {
  margin-block: 4rem 1rem;
}

video {
  aspect-ratio: auto;
  margin-block: 4rem;
}

article div.highlight {
  margin: 2rem 0;
}

.content p {
  margin-block: 3rem;
}

.footnote {
  font-style: italic;
}

.note, .update {
  background: hsl(40, 100%, 80%);
  border-radius: .5rem;
  font-style: italic;
  padding: 1rem 2rem;
  margin-block: 3rem;

  > * {
    margin-block: 1rem;
  }
}

@media screen and (prefers-color-scheme: dark) {
  .note, .update {
    background: hsl(40, 100%, 20%);
  }
}

:is(.note,.update) :is(i,em) {
  font-style: normal;
}

blockquote :is(i,em) {
  font-style: normal;
  font-family: 'LoraMediumBold';
  background: hsl(310, 40%, 90%);
  padding-inline: 2px;
}

@media screen and (prefers-color-scheme: dark) {
  blockquote :is(i,em) {
    background: hsl(310, 40%, 40%);
  }
}

:is(.note, .update)::before {
  content: 'Note: ';
  font-weight: 800;
  text-transform: uppercase;
}

.update::before {
  content: 'Update ';
}



sup {
  line-height: 1;
}

sup[id^=fnref] a,
.footnote-backref {
  display: inline-block;
  padding: .5rem;
}

sup[id^=fnref] a:hover,
.footnote-backref:hover {
  background: #c0c4;
}

hr:not(.divider) {
  border-color: #7B4DB3
}

.divider {
  border: 0;
  margin: 0;
  padding: 0;
}

.divider::before {
  background: url('./divider.svg') center no-repeat;
  background-size: 8rem auto;
  display: flex;
  content: '\00a0';
  max-height: 8rem;
  justify-content: center;
}

[id="blogroll"] ul {
  padding-inline-start: 2rem;
}

[id="blogroll"] li::marker {
  color: var(--accent-a);
}

pre.math {
  font-family: var(--mono-type);
  font-size: 3rem;
  text-align: center;
  resize: none;
}

.monospace {
  font-family: var(--mono-type);
}

@media screen and (prefers-color-scheme: dark) {
  pre.math {
    filter: invert(1);
  }
}

.vid-embed, .aud-embed, .audio-embed {
  width:100%;
  min-height:auto;
  display: block;
  margin-block: 1rem 0;
}

.audio-npr, .audio-apm {
  border: 0;
  max-height: 235px;
}

[id=sidebar] .revenue:not(:has([data-ad-status="unfilled"])) {
  padding-block: 2rem;
}

.google-auto-placed {
  border-block: var(--border);
  margin-block: 3rem;
  padding-block: 2rem;
}

.google-auto-placed::before,
.google-auto-placed::after {
  display: block;
  color: #555;
  content: 'advertisement';
  text-transform: uppercase;
  font-size: 1.2rem;
  font-family: var(--accent-type);
  letter-spacing: 0.1rem;
}

[id=TipJar] {
  margin-block: 2rem 4rem;

  p {
    margin: 0;
    font-size: 1.6rem;
    font-style: italic;
  }
}

[id='related-posts'] ul {
  flex-flow: row nowrap;
  overflow-x: scroll;
  overflow-y: hidden;
  align-items: stretch;
  padding-block-end: 2rem;
  scroll-padding: 4rem;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
}

@media screen and not (prefers-reduced-motion) {
  [id='related-posts'] ul {
    scroll-behavior: smooth;
  }
}


[id='related-posts'] {
  li {
    scroll-snap-align: center;
  }

  a {
    align-items: first baseline !important;
    display: grid;
    grid-template-rows: min-content minmax(max-content, 3.5lh);
  }

  img {
    filter: saturate(0.5);
    transition: filter 250ms linear;

    a:is(:hover,:focus) & {
      filter: saturate(1);
    }
  }


  h4 {
    font-size: 1.1em;
    line-height: inherit;
    margin-block-end: 0;
  }

  a:not(:has(img, iframe)){
    align-content: end;
    grid-template-rows: unset;

    h4 {
     font-size: 3.5rem;
    }
  }
}

.thumbnail--svg {
  border-color: transparent;
  height: 26rem;
  min-height: unset;
}

