/*

  Josh's Custom CSS Reset

  https://www.joshwcomeau.com/css/custom-css-reset/

*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;

  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

#root,
#__next {
  isolation: isolate;
}

#metadata {
  font-style: italic;
}

.page-layout {
  display: grid;

  grid-template-columns: minmax(0, 1fr);

  grid-template-rows: min-content min-content 1fr min-content;

  margin: 0;

  margin-inline: auto;

  min-height: 100svh;
}

.reference-layout .reference-layout__content {
  display: contents;
}

.reference-layout {
  display: grid;

  grid-template-areas: "sidebar . body . toc";

  grid-template-columns: 1fr min(65ch, 98%) 1fr;

  grid-template-rows: min-content auto;

  justify-content: space-between;

  padding-inline: var(--layout-side-padding);
}

.reference-layout > * {
  grid-column: 2;
}

.reference-layout__sidebar {
  grid-area: "sidebar";
}

#content {
  border: 2px solid;

  padding: 16px 16px;
}

#content img {
  margin: 8px;
}

#content.poems {
  width: min-content;
}

.full-bleed {
  max-width: unset;
  height: 30vw;
  margin-left: -33vw;
  width: 100vw;
}


#content.poems article {
  border: 2px goldenrod solid;
  word-wrap: normal;
  margin-bottom: 32px;
}
#content.poems article:last-child{
  margin-bottom: unset;
}
#content.poems section {
  margin: 16px;
}
#content section.essay em {
  margin: 8px 0px;
}
#content section.essay pre{
  white-space: preserve-breaks;
  margin-top: 8px;
}

#main-sidebar {
  font-size: x-large;
  display: flex;
  align-items: center;
  padding: 0px 20px 0px 0px;
  border: 2px solid;
  margin: 0px 16px;
  position: absolute;
  width: fit-content;
  position: sticky;
  top: 0;
  grid-column: sidebar-start;
  height: fit-content;
}

#main-sidebar ol {
  list-style-type: none;
}

#main-sidebar ol details {
  margin-left: -28px;
}
