/* Main styles
 */

* {
  border: 0;
  font: inherit;
  vertical-align: baseline;
  margin: 0;
  padding: 0;
}

svg {
  color: inherit;
  max-width: 100%;
}

html {
  background-color: var(--body-bg-color);
  scrollbar-gutter: stable;
}


body {
  --body-side-padding: 0;

  font-family: var(--body-primary-font-family);
  font-size: var(--body-primary-font-size);
  font-weight: var(--body-primary-font-weight);

  color: var(--body-fg-color);
  background-color: var(--body-bg-color);

  /* line-height is inherited, but relative values (1.6em, 160%, *px, *rem, etc etc) only calculated once.
   * This means that if a child element has a different font size, the line-height will not scale with it.
   * In contrast, unitless values (like 1.6) are calculated for each element, so they scale with font size.
   */
  line-height: 1.6;

  /* Check how the main page looks before adjusting this */
  max-width: 800px;

  margin: auto;

  /* iOS Safari will scroll down the size of SOME text WHENEVER IT FUCKING WANTS TO.
   * Sometimes that will happen differetly in two columns of a table,
   * or on two adjacent lines in highlighted code.
   * ... let's turn that shit off please and thank u
   */
  -webkit-text-size-adjust: none;
  /* I guess this isn't just iOS Safari
   */
  -moz-text-size-adjust: none;
  text-size-adjust: none;
}

body.proofread-mode {
  font-family: var(--body-proofread-font-family);
  font-size: var(--body-proofread-font-size);
}

@media (max-width: 750px) {
  body {
    --body-side-padding: 1.25rem;
    padding: 0 var(--body-side-padding);
  }
}


p {
  margin: 1.25em 0;
}


img {
  margin: 10px auto 10px auto;
  max-width: 100%;
  display: block;
}

/* Chroma surrounds code blocks with a <div class="highlight"> element.
 */
div.highlight {
  border: 1px dotted var(--body-fg-color);
}

/* Inline <pre> and <code> should have a reduced font size,
 * because monospace fonts are taller than non-mono fonts at the same size.
 */
pre, code {
  font-family: var(--body-monospace-font-family);
  font-weight: 500;
  /* Magic 0.8125 number from
   * http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/
   */
  font-size: 0.8125em;

  /* Does not affect background of Pygments-highlighted code fences,
   * only inline code blocks, or code fences that do not specify a language.
   */
  background-color: var(--code-bg-color);
  color: var(--code-fg-color);
}

pre {
  margin-top: 0;
  word-wrap: normal;
  padding: 1em;
  overflow: auto;
  line-height: 145%;
}

/* Inline code elements, like inline `backticks` in Markdown, but not fenced code blocks.
 */
code:not(pre > code){
  padding: 0 0.25em;
  font-weight: 600;
}

/* Code fences
 */
pre code {
  font-size: 100%;
  word-break: normal;
  white-space: pre;
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}

pre code::before,
pre code::after {
  content: normal;
}

aside#toc {
  border: 1px dotted var(--body-fg-color);
  font-size: 0.8em;
  float: right;
  max-width: 33%;
  padding: 0.5em;
  margin: 1em;
  line-height: 160%;
}

em,q,dfn,cite {
  font-style:italic;
  color: var(--body-em-fg-color);
}

strong {
  font-weight:600;
}

q:before {
  content:"\201C";
}

q:after {
  content:"\201D";
}

del,s {
  text-decoration:line-through;
}

blockquote {
  border-left: 10px solid var(--blockquote-left-border-color);
  margin: 1.5em 0.5em;
  padding: 0.5em 0.5em;

  p {
    margin: 0;
  }
}

hr {
  width:40%;
  height: 1px;
  background: var(--hr-color);
  margin: 25px auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--body-heading-font-weight);
  margin: 1em 0;
  color: var(--header-fg-color);
}

h1 {
  font-size: 180%;
}

h2 {
  font-size: 150%;
}

h3 {
  font-size: 120%;
}

h4 {
  font-size: 100%;
}


@counter-style mrl-chevron {
  system: cyclic;
  symbols: "\00BB"; /* right-pointing double angle quotation mark */
  suffix: "\00A0\00A0\00A0"; /* 3x non-breaking spaces */
}

ul, ol {
  padding-inline-start: 2em;
}

ul {
  list-style-type: mrl-chevron;
}

ul.nobullet, ol.nobullet {
  list-style-type: none;
}

ol > li::marker {
  color: var(--body-fg-color-deemphasize-text);
  font-size: 85%;
  font-variant-numeric: tabular-nums;
  content: counter(list-item) ".\00A0\00A0\00A0\00A0"; /* 4x NBSPs */
}

button, input[type="submit"] {
  background-color: var(--button-bg-color);
  color: var(--button-fg-color);
  padding: 0.25em 0.5em;
  border-radius: 5px;
}

footer {
  margin: 8rem 0 0 0;
  p {
    margin: 1em 0;
    font-size: 0.5em;
  }
}
footer.newsletter-email-footer {
  p {
    font-size: 1em;
  }
}

dl {
  margin: 1em 0;
  padding: 1em;
  display: grid;
  grid-template-columns: 20% 80%;
  gap: 0.5em;
  width: 100%;
  border-collapse: collapse;
  box-sizing: border-box;
  border: 1px solid var(--body-fg-color-deemphasize-nontext);
  dt {
    font-weight: bold;
  }
  dd {
    margin-left: 1em;
  }
  hr {
    grid-column: 1 / -1; /* Span all columns */
    border: none;
    height: 1px;
    background-color: var(--body-fg-color-deemphasize-nontext);
  }
}

.dark-mode-invert-image-color {
  filter: var(--dark-mode-image-inverter-filter);
}

span.post-stamp {
  font-size: .6em;
  font-variant-caps: small-caps;
  font-weight: bold;
  padding: 0 0.25em;
  color: var(--stamp-fg-color);
  border: 1px solid var(--stamp-fg-color);
  border-radius: 4px;
  margin-left: 0.5em;
  vertical-align: middle;
}

mark {
  color: var(--body-fg-color);
  background-color: var(--highlight-bg-color);
}

details {
  padding: 0 .5em;
  margin: 1em 0;
  border: 1px dotted var(--body-fg-color);
  summary {
    cursor: pointer;
    color: var(--body-fg-color-deemphasize-text);
  }
}

/* Remove margin if it's in a list item, so that list item details don't have extra spacing between them. */
li > details {
  margin: 0;
}

/* Set consistent styling for details > summary across browsers.
 * iOS Safari sometimes shows one of these glyphs as a fucking emoji (▶️). Unpredictable.
 */
details {
  summary {
    position: relative;
    list-style: none;   /* Remove default triangle thing (the thing that iOS fucks up) */
    padding-left: 1em;  /* Make space for the glyph */
  }
  summary::before {
    content: "►";
    position: absolute;
    font-size: .7em;
    left: 0;

    /* Robustly center the glyph vertically regardless of font size or line height */
    top: 50%;
    transform: translateY(-50%);

  }
  &[open] summary::before {
    content: "▼";
  }
}

details[open] {
  padding-bottom: 1em;
}

table {
  margin: 2em 0;
}

/* An element with the class rss-only should not be displayed in HTML at all.
 * RSS doesn't read CSS, so this is a way to hide elements from the main site
 * and only show them in the RSS feed.
 * RSS readers sometime support limited inline styles,
 * so an element that should render only in RSS might also have a style="..." attribute.
 */
.rss-only {
  display: none;
}

.description {
  color: var(--body-fg-color-deemphasize-text);
  font-size: 0.9em;
}

/* Make the element visible to screen readers but not visually displayed on the screen.
 * (Screenreaders will hide display:none or visibility:hidden.)
 */
.screenreader-only {
  position: absolute;
  height: 1px;
  width: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
}
/* Blog post styling
 */

h1.p-name {
  display: table;
  span.post-cistercian-date {
    display: table-cell;
    width: 2em;
  }
  span.title {
    display: table-cell;
  }
}

.blog-post-body-desc,
.blog-post-body-date {
  font-size: 0.8em;
  color: var(--body-metadata-fg-color);
  time {
    color: var(--body-metadata-fg-color);
  }
}
/* Blog Posts Listing */

ul.blog-posts-listing,
ul.til-posts-listing {
  margin-left: 2em;
  border-collapse: collapse;

  li {
    display: grid;
    grid-template-columns: 4em 1fr;
    grid-template-rows: auto auto;

    h3.blog-posts-year-heading {
      color: var(--body-fg-color-deemphasize-text);
      grid-column: span 2;
    }

    span.post-cistercian-date {
      grid-column: 1;
      text-align: right;
      width: 2em;
    }
    span.post-title {
      grid-column: 2;
      font-weight: bold;
    }
    span.post-classification {
      grid-column: 2;
      grid-row: 2;
      font-size: 65%;
      color: var(--body-metadata-fg-color);
      display: block;
      a {
        margin: 0 0.25em;
        padding: 0.25em;
        border: 1px solid var(--link-bg-color);
      }
    }
    span.post-description {
      grid-column: 2;
      grid-row: 2;
      font-size: 85%;
      color: var(--body-metadata-fg-color);
      display: block;
      margin: 0 0 0.75em 0;
    }

  }

}

.project-taxonomy-related-posts-title {
  font-size: 75%;
  font-weight: normal;
}
.books-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;

  li {
    aspect-ratio: 2/3;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  a {
    position: relative;
    display: block;
    height: 100%;
    width: 100%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }
  a:hover {
    z-index: 10;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  a:hover,
  a:hover * {
    color: white;
    background-color: transparent;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
  }
  img.book-cover-unfinished {
    filter: grayscale(100%) brightness(50%);
  }
}

.book-cover-overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  color: white;
  font-size: 2rem;
  font-weight: bold;
  white-space: nowrap;
}
/* Container to wrap the dl and img */
section.book-metadata {
  display: flex;
  gap: 2rem;
  align-items: flex-start;

  dl {
    margin: 0;

    li {
      padding-left: 1em;
    }
  }

  a:has(> img) {
    border: none;
  }
  a:has(> img):hover {
    background-color: transparent;
  }

  img {
    max-width: 200px;
    height: auto;
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  section.book-metadata {
    flex-direction: column;
    dl {
      order: 2;
    }
    a {
      order: 1;
      margin: 1em auto;
    }
  }
}
aside.callout {
  padding: 1em;
  margin: 1em 0;
  border: 1px dotted var(--body-fg-color);
  h3.callout-header {
    font-weight: bold;
    margin-top: 0;
  }
}

aside.callout-tip {
  background-color: var(--callout-tip-bg-color);
}

aside.callout-warning {
  background-color: var(--callout-warning-bg-color);
}
/* Cistercian CSS
 */

.cistercian {
  font-family: var(--body-cistercian-font-family);
  font-weight: normal; /* Bold doesn't work well with Claivo in Safari :/ */
  /* font-size: .9em; */
}
.devmodenav {
  position: absolute;
  top: 0;
  left: 2em;
  width: 10em;
  justify-content: center;
  margin: 3em 0 0 0;

  &.devmodenav-hidden {
    display: none;
  }

  ul.devmodenav-links {
    padding: 0 0.5em 2em 0.5em;
    margin: 0;
    border: 1px solid var(--devmode-emphasize-border-color);
    li {
      list-style-type: none;
      font-size: 0.75em;
      line-height: 1.75em;
      &.devmode-title {
        color: var(--devmode-emphasize-fg-color);
        position: relative;
      }
      &#ogimage-item > img {
        object-fit: cover;
      }
      a {
        color: var(--body-fg-color-deemphasize-text);
      }
    }
  }

  .devmodenav-dismiss {
    position: absolute;
    top: 0.2em;
    right: 0.5em;
    background: none;
    border: none;
    color: var(--devmode-emphasize-fg-color);
    cursor: pointer;
    padding: 0.25em;
    font-size: 1em;
    line-height: 1;
    opacity: 0.7;

    &:hover {
      opacity: 1;
    }
  }
}

@media (max-width: 1200px) {
  .devmodenav {
    display: flex;
    width: auto;
    position: static;
  }
}
figure figcaption {
  font-size: 0.8em;
  color: var(--body-fg-color-deemphasize-text);
}

/* Make the figure stand out from the background a bit */
figure.standout {
  text-align: center;
}

figure.sidebyside {
  > figcaption {
    margin-top: 2rem;
  }

  .image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;

    figure {
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    img, svg {
      width: 100%;
      max-width: 100px;
      height: auto;
      object-fit: contain;
      margin: 1em auto;
      padding: 0;
      display: block;
      flex: 1; /* Allow image to grow */
    }

    figcaption {
      margin-top: auto;
      padding-top: 10px;
    }
  }
}/* Footnote styles
 */

div.footnotes {
  font-size: 75%;
}

a.footnote-ref::before {
  content: "[";
}
a.footnote-ref::after {
  content: "]";
}

/* When we jump to an end-note, keep it highlighted (unless we click on another on-page anchor).
 * Has no effect if JavaScript is enabled, since the popover will be shown instead of jumping to the end-note.
 */
li[role=doc-endnote]:target {
  background: var(--target-bg-color);
  transition: all .8s;
}

.mrl-footnote-popover {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90vw;
  max-width: 400px;
  background-color: var(--body-bg-color);
  color: var(--body-fg-color);
  border: 1px dotted var(--body-fg-color);
  padding: 0.6em 0.8em;
  font-size: 0.85em;
  line-height: 1.5;
  p {
    margin: 0;
  }
}
/* For /foci
 */

main.focus-content {
  margin: 8em 0 0 0;

  font-size: 1rem;
  line-height: 1.5;

  h1, h2 {
    text-align: center;
  }
}

.focus-preview {
  margin: 4em 0;

  .focus-preview-label {
    font-size: 85%;
    color: var(--body-fg-color-deemphasize-text);
    display: block;
    text-align: center;
    margin: 0.75em 0 2em 0;
    padding: 0;
  }

  .focus-frame-grandparent {

    /* Set an aspect ratio for the iframe here.
     *
     * The iframe will be displayed in proportion to the target screen size,
     * scaled down to fit on the page,
     * to give a preview of what the site might look like on that screen.
     *
     * The scaled-height is used to size the grandparent to match the displayed iframe.
     */
    --scaled-height: calc(var(--screen-height) * var(--screen-scale));

    /* Match the height of the iframe as rendered in the parent */
    height: var(--scaled-height);

    /* Horizontally center the container */
    display: flex;
    justify-content: center;
  }

  .focus-frame-grandparent--phone {
    --screen-width: 390px;
    --screen-height: 390px;
    --screen-scale: 1;

    iframe {
      overflow: hidden;
    }
  }

  .focus-frame-grandparent--desktop {
    --screen-width: 1920px;
    --screen-height: 1200px;
    --screen-scale: 0.5;
  }

  .focus-frame-grandparent {
    .focus-frame-container {
      position: relative;
      margin: 0 auto;

      transform: scale(var(--screen-scale));
      transform-origin: top center;

      a {
        /* Use display:flex to make the link occupy the full size of the iframe,
         * without any extra space at the bottom for descenders.
         * (display:block accomplishes the first goal, but not the second.)
         */
        display: flex;
        /* Compensate border width for the scale transform so it renders at 2px on screen. */
        border: calc(2px / var(--screen-scale)) solid var(--link-bg-color);
        padding: 0;
        margin: 0;
      }
      a:hover, a:hover:visited {
        /* Don't try to change the background color on hover like we do for normal links.
         * Doing so doesn't actually work,
         * but it does cause a flash of the link background color
         * when clicking on this link and then using the back button.
         */
        background-color: inherit;
      }

      iframe {
        width: var(--screen-width);
        height: var(--screen-height);
        /* Compensate border width for the scale transform so it renders at 2px on screen. */
        border: calc(2px / var(--screen-scale)) solid var(--body-fg-color-deemphasize-nontext);
        margin: 0;
        padding: 0;

        /* Don't allow interaction */
        pointer-events: none;
      }
    }
  }
}

/* Add media queries to adjust the scale of the desktop iframe for smaller screens.
 *
 * When doing this, we must recalculate --scaled-height or it will use the original value.
 * Border widths don't need overrides here because they use calc(2px / var(--screen-scale)).
 */
@media (max-width: 1024px) {
  .focus-preview {
    .focus-frame-grandparent--desktop {
      --screen-scale: 0.25;
      --scaled-height: calc(var(--screen-height) * var(--screen-scale));
    }
  }
}
@media (max-width: 512px) {
  .focus-preview {
    .focus-frame-grandparent--desktop {
      --screen-scale: 0.125;
      --scaled-height: calc(var(--screen-height) * var(--screen-scale));
    }
  }
}

/* Show a link back to what this is for someone who stumbles across the page with no context */
.focus-explanation {
  position: relative;
  p {
    background-color: var(--body-bg-color);
    padding: 0.5em;
    position: fixed;
    bottom: 1em;
    left: 1em;
  }
}

ul.focus-categories {
  color: var(--color-micahrl-teal);
  text-align: center;
  li {
    display: inline;
    margin: 0;
    padding: 0;
  }
  li::before {
    content: "";
  }
  li:not(:last-child):after {
    content: ", ";
  }
}
ul.gallery,
ol.gallery
{
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  padding: 0;
  margin: 2em 2em 3em 2em;

  :before {
    content: "";
  }

  &>* {
      height: 12rem;
      flex-grow: 1;
      margin: 3px;
  }

  li {
    img {
        max-height: 100%;
        min-width: 100%;
        object-fit: cover;
        vertical-align: bottom;
    }
  }

  a:has(img.gallery-video-thumbnail) {
    &::after {
      content: "\25B6\FE0E"; /* ▶︎ plus the text presentation selector to disable emoji presentation on iOS */
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 2rem;
      color: white;
      background-color: rgba(0, 0, 0, 0.7);
      width: 3rem;
      height: 3rem;
      display: flex;
      align-items: center;
      justify-content: center;
      padding-left: 0.1rem;
      pointer-events: none;
      z-index: 5;
    }
  }
  li:last-child {
      flex-grow: 10;
      border: none;
  }

  li:only-child {
    height: auto;
    a {
      height: auto;
    }
    picture {
      display: block;
    }
    img {
      min-width: unset;
      width: 100%;
      height: auto;
      object-fit: unset;
    }
  }

  a {
    position: relative;
    display: block;
    height: 100%;
    width: 100%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }
  a:hover {
    z-index: 10;
    transform: scale(1.0125);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  a:hover,
  a:hover * {
    color: white;
    background-color: transparent;
  }

  &.full-width-bleed {
    margin-left: calc(-1 * var(--body-side-padding));
    margin-right: calc(-1 * var(--body-side-padding));
  }
}





.ghostty-transcript {
  color: #e5e5e5;
  background-color: #332a57;
  padding: 0.5em;
  overflow-x: auto;
  font-size: 0.8125em;
  > * {
    /* Override the style attribute which contains font-family:monospace from Ghostty */
    font-family: var(--body-monospace-font-family) !important;
  }
}
/* Wrap any element with this class to have nice horizontal scroll behavior.
 *
 * For example: wide images, .mrl-simple-table-container, etc.
 */
 .mrl-hscroll-container {
  margin: 2em 0 0 0;
  overflow-x: auto;
  overflow-y: auto;

  /* We need the container <div> and the notification <p> to have the exact same height,
   * because the <p> is _removed from normal document flow_ and no longer takes up space.
   * We want the page not to shift all later content up by the height of the <p>,
   * so we make its parent <div> its exact same height.
   */
  --notification-height: 2em;

  /* An element with this class is added by JavaScript automatically if the table overflows horizontally
   */
  .mrl-hscroll-container-overflow-x-warning-container {
    padding: 0;
    margin: 0;
    height: var(--notification-height);
    .mrl-hscroll-container-overflow-x-warning {
      display: inline-block;
      height: var(--notification-height);
      background-color: var(--hscroll-overflow-bg-color);
      font-size: 0.825em;
      color: var(--hscroll-overflow-fg-color);
      padding: 0 2em;
      margin: 0;
      border: 1px dotted var(--hscroll-overflow-fg-color);
      &.mrl-hscroll-container-overflow-x-warning-sticky {
        position: fixed;
        top: 0;
      }
    }
  }
}
.homepage-container {
  display: flex;
  flex-direction: column;
  align-items: center;

  .homepage-avatar {
    margin: 4em 0;
    width: 10em;
  }

  h1.homepage-title {
    display: block;
    margin: 2em auto 0 auto;
  }
}

/* The home grid
 */

.homegrid {
  display: grid;
  grid-template-columns: 10em auto;
  padding: 0 2em 2em 2em;;

  svg {
    font-size: 75%;
  }

  >* {
    margin: 0;
    padding: 0;
  }

  .homegrid-header {
    grid-column: span 2;
    margin: 2em 0 1em 1em;
    color: var(--body-fg-color-deemphasize-text);
    font-size: 85%;
  }
}
/* IndieWeb-related styling
 */

.invisible-h-card {
    display: none;
}
/* kbd elements
 *
 * Adapted from https://dylanatsmith.com/wrote/styling-the-kbd-element
 */

kbd {
    font-family: var(--body-monospace-font-family);
    border: var(--body-fg-color) 1px solid;
    border-radius: 0.25rem;

    /* A sharp shadow (with no blur) really gives
     * the old school keyboard look
     */
    box-shadow: 0 2px 0 1px var(--body-fg-color-deemphasize-nontext);

    /* Remove the text cursor — totally optional
     * but I wanted it for my hover effect
     */
    cursor: default;

    line-height: 1em;

    /* Make narrow numbers and letters look less odd */
    min-width: 0.75rem;
    /* `min-width` doesn’t work on inline elements */
    display: inline-block;
    /* Keep the characters centred when narrower than the `max-width` */
    text-align: center;

    /* Seemed to look more key-like with more horizontal padding 🤷 */
    padding: 2px 5px;

    /* These two lines pull the whole element up now that they’re
     * bottom-heavy due to the `box-shadow`. This looks better
     * against the cap height of regular paragraph text.
     */
    position: relative;
    top: -1px;

    /* This is my favourite part of the whole thing. The key gets
     * “pushed” down and the shadow gets reduced so it looks like
     * it might when typing on a physical keyboard.
     */
    &:hover {
        box-shadow: 0 1px 0 0.5px var(--body-fg-color-deemphasize-nontext);
        top: 1px;
    }
}

/* Adapted from https://hugocodex.org/add-ons/lightbox/
 */

#lightbox {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999999;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

#lightbox .img {
  max-width: 95vw;
  max-height: 90vh;
  line-height: 0;
}

#lightbox .img img {
  display: block;
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}

#lightbox span {
  display: block;
  position: fixed;
  bottom: 13px;
  height: 1.5em;
  line-height: 1.4em;
  width: 100%;
  text-align: center;
  color: white;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

#lightbox span {
  display: none;
}

#lightbox .videoWrapperContainer {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 900px;
  max-height: 100%;
}

#lightbox .videoWrapperContainer .videoWrapper {
  height: 0;
  line-height: 0;
  margin: 0;
  padding: 0;
  position: relative;
  padding-bottom: 56.333%; /* custom */
  background: black;
}

#lightbox .videoWrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#lightbox #prev,
#lightbox #next {
  height: 50px;
  line-height: 36px;
  display: none;
  margin-top: -25px;
  position: fixed;
  top: 50%;
  padding: 0 15px;
  cursor: pointer;
  text-decoration: none;
  z-index: 99;
  color: white;
  font-size: 60px;
}

#lightbox.gallery #prev,
#lightbox.gallery #next {
  display: block;
}

#lightbox #prev {
  left: 0;
}

#lightbox #next {
  right: 0;
}

#lightbox #close {
  height: 50px;
  width: 50px;
  position: fixed;
  cursor: pointer;
  text-decoration: none;
  z-index: 99;
  right: 0;
  top: 0;
}

#lightbox #close:after,
#lightbox #close:before {
  position: absolute;
  margin-top: 22px;
  margin-left: 14px;
  content: "";
  height: 3px;
  background: white;
  width: 23px;
  transform-origin: 50% 50%;
  transform: rotate(-45deg);
}

#lightbox #close:after {
  transform: rotate(45deg);
}

#lightbox,
#lightbox * {
  user-select: none;
}

body.lightbox-open {
  overflow: hidden;
}
/* Experiments in annotating links
 * Some links could change the underline/hover color
 * Some could add :after content
 * TODO: try annotating before, with a hardcoded per-site favicon. See also <https://www.zachleat.com/web/external-link-favicons/>
 */
 .show-link-annotations {

  a[href^="#"], a[href^="#"] * {
    text-decoration: none;
    border-bottom: 2px solid var(--on-page-link-bg-color);
  }

  a[href^="#"]:hover, a[href^="#"]:hover * {
    text-decoration: none;
    background-color: var(--on-page-link-bg-color);
    color: var(--link-fg-color);
  }

  .experiment-annotate-external-links {

  a[href*="//"]:not([href*="me.micahrl.com"]):after,
  a[href*="//"]:not([href*="localhost"]):after
  {
    /* Append the wikipedia external site arrow */
    content: " " url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=);
  }

}

  a[href^="https://en.wikipedia.org/"]:after {
    content: "WP";
    font-size: 60%;
    vertical-align: super;
  }

  a[href$=".pdf"]:after {
    content: "PDF";
    font-size: 60%;
    vertical-align: super;
  }
}

a.mrlafl::after {
  content: "$";
  font-size: smaller;
  vertical-align: super;
  line-height: 0; /* Prevent it from affecting line height */
}
a img {
  border:none;
}

a {
  text-decoration: none;
  border-bottom: 2px solid var(--link-bg-color);
  color: inherit;
}

a:hover, a:hover:visited, a:hover *, a:hover:visited * {
  text-decoration: none;
  background-color: var(--link-bg-color);
  color: var(--link-fg-color-hover);
}

a:visited {
  color: inherit;
}

a.no-link-underline {
  border-bottom: 0;
}
a.no-link-hover:hover, a.no-link-hover:hover * {
  background-color: initial;
  color: initial;
}

a.image-thumbnail {
  display: inline-block;
  border: 2px solid var(--link-bg-color);
  padding: 1px;
  img {
    border: 0;
    padding: 0;
    margin: 0;
  }
}

a.video-thumbnail {
  display: inline-block;
  border: 2px solid var(--link-bg-color);
  padding: 1px;
  margin: 2em;
  line-height: 0; /* Required to remove blank space after video. https://stackoverflow.com/questions/26979003/space-after-html5s-video-tag */
  video {
    border: 0;
    padding: 0;
    margin: 0;
    source, img, p {
      border: 0;
      padding: 0;
      margin: 0;
    }
  }
}

span.doublink {
  border-top: 2px solid var(--body-fg-color);
  border-left: 2px solid var(--body-fg-color);
  padding-left: 2px;
  a.doublink-clearnet:before {
    content: "⚠️\00a0";
    font-size: 0.75em;
    vertical-align: top;
  }
  a.doublink-onion:before {
    content: "🧅\00a0";
    font-size: 0.75em;
    vertical-align: top;
  }
}

.clickable-element {
  cursor: pointer;
}

sup {
  font-size: 75%;
  vertical-align: super;
  line-height: 0;
}

/* Any time we jump to an on-page anchor, briefly highlight the element
 */
h1:target, h2:target, h3:target, h4:target, h5:target, h6:target {
  animation: hlfadeinout 2.5s linear;
}
@keyframes hlfadeinout {
  0% { background: var(--body-bg-color); }
  50% { background: var(--target-bg-color); }
  0% { background: var(--body-bg-color); }
}
/* Blog Posts Listing */

ul.links-section-listing {
  border-collapse: collapse;

  li {
    display: grid;
    grid-template-columns: 4em 1fr auto;
    grid-template-rows: auto auto;
    margin: 2em 0 0 0;
    align-items: baseline;

    p {
      margin: .5em 0;
      padding: 0;
    }
    blockquote {
      margin: .5em 0;
      padding: 0 .5em;
    }

    h3.links-section-year-heading {
      color: var(--body-fg-color-deemphasize-text);
      grid-column: 1 / -1;
    }

    span.post-cistercian-date {
      grid-column: 1;
      text-align: right;
      width: 2em;
    }

    h4.post-title {
      grid-column: 2;
      margin: 0;
      font-size: 1.1em;
      font-weight: bold;
    }

    a.post-permalink {
      grid-column: 3;
      font-size: 75%;
      color: var(--body-metadata-fg-color);
      margin: 0 1em;
      border: none;
    }

    article {
      grid-column: 2 / -1;
    }
  }

}
/* Styling of my /lists/ section
 */

.lists-section-pages-astable {
  border-collapse: collapse;
  td {
    /* margin: 0 1em; */
    /* padding: 0; */
  }
  td + td {
    border-left: 1px solid var(--body-fg-color-deemphasize-text);
  }
  /* tr + tr { */
  /*   // border-top: 1px solid var(--body-fg-color-deemphasize-text); */
  /* } */
}
@keyframes spin {
  100% {
    transform: rotateY(360deg);
  }
}

form.search {
  /* This needs to be large enough on mobile
   * so that focusing on the input doesn't cause zoom.
   */
  font-size: 1.5rem;
  border: 1px solid var(--body-fg-color-deemphasize-nontext);
  min-width: 1em;
  height: 1em;
  line-height: 1;
  border-radius: 1em;
  padding: 0.5em;
}

.search[data-running] .search-icon {
  animation: spin 1.5s linear infinite;
}

form.search input {
  width: 10em;
  color: var(--body-fg-color);
  background-color: var(--body-bg-color);
}

#lunr-search-results-title {
  margin-top: 6em;
}

#lunr-search-results summary {
  color: var(--body-fg-color-deemphasize-text);
  font-size: 85%;
}

@media (min-width: 600px) {
  form.search {
    font-size: 1rem;
  }
}
div.multilink {
  display: inline;

  details {
    display: inline;
    position: relative;
  }

  details[open] > div.multilink-overlay {
    position: absolute; /* Absolute positioning within the relative parent */
    z-index: 1000; /* High z-index to overlay on top of other content */
    background: white; /* Background color for the overlay */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); /* Shadow for a "floating" effect */
    padding: 20px;
    box-sizing: border-box;
    /* Adjust the width, top, and left as needed */
    width: 300px; /* Example width */
    top: 100%; /* Position just below the <summary> */
    left: 50%; /* Centering the box */
    transform: translateX(-50%); /* Adjust the horizontal position to truly center */
  }

  /* Remove the default disclosure triangle, and replace with a link/x icon for closed/opened stage. */

  summary::marker, summary::-webkit-details-marker {
    display: none;
  }
  details[open] > summary::marker, details[open] > summary::-webkit-details-marker {
    display: block;
  }

  summary::before {
    content: "🔗";
    vertical-align: super;
    font-size: smaller;
  }
  details[open] > summary::before {
    content: "❌";
  }

  /* Optional: Style for the <summary> */
  summary {
    list-style: none;
    cursor: pointer;
  }
}

span.multilinkicons {
  position: relative;
  .multilink-icon {
    vertical-align: super;
    font-size: smaller;
    margin: 0 0.125em;
  }
  .multilink-icon[data-hover-text]:hover::after {
    content: attr(data-hover-text);
    position: absolute;
    display: block;
    background-color: black;
    color: white;
    padding: 5px;
    border-radius: 5px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }
}.newsletter-list {
  list-style: none;

  li {
    display: grid;
    grid-template-columns: 6ch 12ch 1fr;
    column-gap: 1ch;
    align-items: baseline;
    .newsletter-issue-num, .newsletter-date {
      font-variant-numeric: lining-nums tabular-nums;
      white-space: nowrap;
      text-align: left;
      font-size: 85%;
      color: var(--body-metadata-fg-color);
    }
    .newsletter-issue-num {
      text-align: right;
    }
    .newsletter-date {
      text-align: left
    }

  }
}
/* CSS classes for different people */

.nym-mauibabe {
  font-family: "Sail", cursive;
  margin: 0 0.2em;
  font-size: 1.5em;

  /* Use a line height that is definitely smaller than normal text
   * to ensure that this larger font-size doesn't increase line height.
   * This will look weird on its own, but surrounded by normal text it looks fine.
   */
  line-height: .1em;
}
a.micahrl-open-editor-link {
    font-size: 75%;
    color: var(--body-metadata-fg-color);
}/* Styling for the list of tags on a page
 */
.page-relation-metadata-container {
  display: table;
}

.page-relation-container {
  display: table-row;
  font-size: 0.8em;
  &:before {
    content: "\00BB \0020"
  }
}
.page-relation-list-cell {
  padding-left: 0.5rem;
  padding-top: 0.5rem;
  display: table-cell;
  line-height: 170%;
  color: var(--body-metadata-fg-color);
  * {
    color: var(--body-metadata-fg-color);
  }
}
.page-relation-list-header-cell {
  font-weight: bold;
}
.page-relation-item {
  display: inline-block;
  margin-right: 0.25em;
}

.links-to-all-tags-projects-footer {
  font-size: 0.85rem;
  color: var(--body-metadata-fg-color);
}
.posts_listing {
  display: table;
  margin-left: 2em;
  border-collapse: collapse;

  li {
    display: table-row;
    margin-bottom: 2em;
    h3 {
      font-size: unset;
      font-weight: bold;
      display: inline;
    }
    #date, #date time {
      font-size: 85%;
      color: var(--body-metadata-fg-color);
    }
  }
}

.posts-listing-desc {
  font-size: 85%;
  color: var(--body-metadata-fg-color);
  display: block;
  margin: 0 0 0.75em 0;
}

.project-taxonomy-related-posts-title {
  font-size: 75%;
  font-weight: normal;
}dl.project-metadata {
  margin: 1em 0;

  li {
    padding-left: 1em;
  }
}
/* A project card
*/

.project-entry-list {
  list-style: none;
  padding: 0;
  margin: 2em;

  li {
    display: flex;
    gap: 1em;
    align-items: flex-start;
    padding: 0.75em 0;
    &:before {
      content: "";
    }

    .project-main {
      flex: 1;

      .project-meta {
        font-size: 0.85rem;
        opacity: 0.7;
        margin: 0.15rem 0 0.5rem;
      }

      .project-desc {
        margin: 0;
      }
    }

    figure {
      flex: 0 0 20em;
      position: relative;
      aspect-ratio: 1200 / 630;
      width: 100%;
      overflow: hidden;
      padding: 0;
      margin: 0;
      border: 1px solid var(--body-fg-color);
      box-sizing: border-box;

      img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        max-width: none;
        max-height: none;
        padding: 0;
        margin: 0;
      }
    }

    /* Take up space so that description text aligns even without an image */
    figure.project-thumb--empty {
      border: none;
    }
  }
}

@media (max-width: 750px) {
  .project-entry-list {
    li {
      flex-direction: column;

      figure {
        flex: 0 0 auto;
        margin: 0 auto;
        width: 100%;
      }

      /* Don't show empty placeholder in column layout */
      figure.project-thumb--empty {
        display: none;
      }
    }
  }
}
/* Styling for a blockquote with a figcaption.
 *
 * May be used with the quotefig.html shortcode,
 * or by adding a <figure.quotefig> element to your Markdown blockquote, like this:
 *
 *    <figure class="quotefig">
 *
 *    > The quotation goes here
 *
 *    <figcaption>
 *
 *    The attribution goes here
 *
 *    </figcaption>
 *
 *    </figure>
 *
 * Some notes on the Markdown approach (without the shortcode):
 *  - It uses a regular Markdown blockquote,
 *    surrounded by a <figure> element with the "quotefig" class.
 *  - The figcaption attribution is optional.
 *  - The newlines separating Markdown from HTML elements are required
 *    or else the Markdown will not be parsed to HTML.
 *    If you instead are willing to write the quotation and/or attribution as HTML,
 *    you can omit its newlines,
 *    but make sure to add <p> elements (see next item).
 *  - These newlines do create <p> elements when the Markdown is parsed,
 *    so the final structure turns into
 *    <figure><blockquote><p>...</p></blockquote><figcaption><p>...</p></figcaption></figure>.
 *
 * How are you supposed to cite quotes in HTML anyway? A few methods here.
 *    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote
 *    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite
 *    https://quentin-bellanger.com/blog/semantic-quotes/
 *    https://maedi.com/code/semantic-blockquote-html5/
 *
 * Somewhat inspired by quoteback.
 *    https://tomcritchlow.com/2020/06/09/quotebacks/
 *    https://quotebacks.net/
 */
figure.quotefig {
  margin: 1em 2em;
  border: 1px dotted var(--body-fg-color-deemphasize-nontext);

  > blockquote {
    border: 0;
    margin: 0 2em;
    position: relative;
    font-style: italic;

    /* Put large &ldquo; and &rdquo; around the quote. */
    &::before {
      content: "“";
      position: absolute;
      top: 0.5em;
      left: -0.5em;
      font-size: 4em;
      line-height: 0.1em;
      color: var(--body-fg-color-deemphasize-nontext);
      pointer-events: none;
    }
    &::after {
      content: "”";
      position: absolute;
      bottom: 0;
      right: -0.25em;
      font-size: 4em;
      line-height: 0.1em;
      color: var(--body-fg-color-deemphasize-nontext);
      pointer-events: none;
    }

    p + p {
      margin-top: 1em;
    }
  }

  /* Contains my notes, usually present only in reference annotations. */
  aside {
    margin: 1em;
    /* font-size: 0.875em; */
    color: var(--body-fg-color-deemphasize-text);
    display: block;
  }

  /* Contains the attribution for the quote, or location information for a reference annotation.
   * Might contain a page number, Kindle location, link to source, etc.
   */
  figcaption {
    margin: 1em;
    font-variant-numeric: tabular-nums;
    font-style: italic;
    font-size: 0.75em;
    text-align: right;
    color: var(--body-fg-color-deemphasize-text);
    p {
      margin: 0;
    }
  }
}

/* Apply serif font to blockquotes inside quotefig.
 * Accept this styling either by setting a class on the figure directly or wrapping it in a div.
 */
div.quotefig-serif figure.quotefig blockquote,
figure.quotefig.quotefig-serif blockquote {
  font-family: var(--body-serif-font-family);
  font-size: 16px;
}
/* redrum-noci is the reversible portal icon */

/* Element with this class in partials/footer.html */
.redrum-noci-container {
  position: relative;
  float: right;
  bottom: 0.5em;
  font-size: 1.6em;
}

/* Element with this class in partials/reversiblePortal.html */
a.redrum-noci-link {
  margin: 0;
  padding: 0;
  line-height: 1em;
  svg {
    width: 1em;
    height: 1em;
    margin: 0;
    color: var(--redrum-portal-color);
  }
  svg:hover {
    color: var(--body-fg-color);
  }
}
section.responses {
  font-size: 0.8em;
  margin: 2em 0;

  h2, h3 {
    margin: 1em 0;
    padding: 0;
  }

  p {
    margin: 0;
  }

  .comments-explanation {
    color: var(--body-fg-color-deemphasize-text);
  }

  .webmentions {
    margin: 0 0 0 1em;
    p.webmention-private {
      color: var(--body-fg-color-deemphasize-text);
    }
    ol.webmentions-list {
      list-style-type: none;
      li {
        padding: 0;
        margin: 0;
        display: grid;
        padding: none;
        grid-template-columns: 3em 1em auto auto;
        gap: 1em;
      }
    }
    .wm-cistercian-date {
      font-size: .25rem;
      color: var(--body-fg-color-deemphasize-text);
    }
    img.wm-author-photo {
      margin: 0;
      padding: 0;
      display: inline;
      max-height: 1em;
      max-width: 1em;
    }
  }
}

/* For the webmentionsjs stuff only */
div#webmentions {
  h2 {
    /* webmention.js adds h2 elements with "Responses" and "Reactions" sections.
     * It looks better without it imo, and h2 is the wrong heading level anyway.
     */
    display: none;
  }
}
/* I use a class 'mrl-simple-table-container' to provide a generic table style.
 * I can easily surround a Markdown table with <div class="mrl-simple-table-container">..</div>.
 * Any third party HTML I'm pulling in that uses tables isn't affected
 * (as it would be by a bare 'table {}' selector).
 * I just want something very simple that does the right thing say 75% of the time.
 *
 * NOTE: See also the .mrl-hscroll-container class, which pairs well with this one for tables that may be wider than the viewport.
 */
.mrl-simple-table-container {
  th {
    font-weight: bold;
    background: var(--table-header-bg-color);
  }
  th, td {
    margin: 0;
    padding: 0 2em 0 2em;
  }

  /* For e.g. adding a description to a cell
   */
  p.description {
    font-size: 85%;
    color: var(--body-metadata-fg-color);
    margin: 0 0 0.75em 0;
    font-weight: normal;
  }

  /* If the container div is also tagged with this class, make more whitespace
   */
  &.mrl-simple-table-container-separate > table {
    border-collapse: separate;
    border-spacing: 0 1em;
  }

  /* If the container div is also tagged with this class,
   * make horizontal lines between rows
   */
  &.mrl-simple-table-container-horizontal-separators > table {
    border-collapse: collapse;
    border-spacing: 0;
    border-top: 1px solid var(--body-fg-color);
    border-bottom: 1px solid var(--body-fg-color);
    tr {
      border-top: 1px solid var(--body-fg-color);
      border-bottom: 1px solid var(--body-fg-color);
    }
  }

  /* If the individual th/td cells are tagged with these classes, center their contents
   */
  th.mrl-simple-table-cell-center, td.mrl-simple-table-cell-center {
    vertical-align: middle;
    text-align: center;
  }

  /* If the whole container div is tagged with this class, center elements in all cells
   */
  &.mrl-simple-table-cell-center {
    td, th {
      vertical-align: middle;
      text-align: center;
    }
  }
}
/* Navigation stuff */

.sitenav {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin: 3em 0 0 0;

  .sitenav-sidecontent {
    flex: 1;
    min-width: 1em;
    padding: 0;
    margin: 0;
  }
  .sitenav-sidecontent-left {
    text-align: right;
  }
  .sitenav-sidecontent-right {
    text-align: left;
  }

  .sitenav-links-container {
    margin: .5em 0 0 0;
    list-style-type: none;

    li {
      padding: 0;
      margin: 0;
      font-size: 0.75em;
      line-height: 1.75em;

      &:before {
        content: "";
      }

      a {
        color: var(--nav-fg-color);
      }
    }
  }

  .sitenav-img-link {
    flex: 0 0 auto;
    display: block;
    padding: 0;
    margin: 0 1em; /* Add horizontal margin to create space on both sides */
    position: relative;
    border-bottom: 0;
    width: 6em;
    height: 6em;

    svg {
      position: absolute;
      top: 0;
      left: 0;
      padding: 0;
      margin: 0;
      width: 100%;
      height: 100%;
      color: var(--monogram-color);

      &:hover {
        color: var(--body-fg-color);
      }
    }
  }
}

@media (max-width: 750px) {
  .sitenav li {
    font-size:12px;
    /* padding: 0 13px; */
  }
}

@media (max-width: 400px) {
  .sitenav li {
    font-size:10px;
    padding: 0 0.5em;
  }
}

.parent-section-link {
  font-size: 75%;
}

form.embeddable-buttondown-form {
  input[type="email"] {
    border-bottom: 2px solid var(--link-bg-color);
    margin: 0 1em;
  }
}/* WARNING: THIS STYLING DOES NOT APPLY TO RSS READERS
 * RSS readers can take inline styles, like:
 *    <span style="display:inline-block;">...</span>
 * But they usually/always ignore external CSS,
 * so styles in this file apply only to browser display, not RSS.
 */

svg.spritecore {
  height: 1em;
  width: 1em;
  fill: currentColor;
  display: inline-block;
  vertical-align: -0.1em; /* middle is too low, and top is too high; this looks better */
  margin: 0 0.2em;
}

/* Inline sprites, embedded <svg> elements
 *
 * These can take a currentColor.
 */
.svg-sprite-inline {
  height: 1em;
  width: 1em;
  color: currentColor;
  stroke: currentColor;
  fill: currentColor;
}
h2.taxonomy-term-subhead {
  font-size: 1rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem 0;
}/* Timeline styling
 *
 * Use 1em as the unit and calculate all sizes based on that.
 * This allows the timeline to scale with the font size.
 *
 * It's safe to customize padding, margin, and border.
 * Note that the circular event markers take up 0.5em
 * to the left of the <ol>'s content box,
 * so it's recommended to add a margin of at least that much to the left.
 */

 ol.mrl-timeline {
  /* Width of the timeline line.
   * Make it divisible by 2 for centering.
   */
  --timeline-width: 2px;

  /* Margin between each timeline entry.
   * It's used for calculations so we need to define it here.
   */
  --timeline-entry-margin: 2em;

  /* Colors for the timeline.
   * It's nice to set these here because otherwise
   * customizing them would require overriding ::before and ::after on <li> elements, etc.
   */
  --timeline-color: var(--body-fg-color-deemphasize-nontext);
  --timeline-marker-color: var(--body-fg-color);

  padding: 1em 2em 0 2em;
  margin: 1em;

  /* Styling past this point is required to make the timeline look right */

  position: relative;
  list-style-type: none;
}

ol.mrl-timeline li {
  position: relative;
  padding-left: 1em;
  margin-left: calc(var(--timeline-width) / 2); /* Center the marker on the line */
  margin-bottom: var(--timeline-entry-margin);
}

/* Draw a circle to mark each event on the timeline */
ol.mrl-timeline li::before {
  content: '';
  position: absolute;
  left: 1em;
  top: .4em; /* Adjust to align with the first line of text */
  width: 1em;
  height: 1em;
  background: var(--timeline-marker-color);
  border-radius: 50%;
  z-index: 1; /* Ensure the line is drawn behind the circle */
}

/* Draw the line segment */
ol.mrl-timeline li::after {
  content: '';
  position: absolute;

  /* Center the line on the marker */
  left: calc(var(--timeline-width) / 2 * -1);

  /* Draw a line between this item's marker and the next.
   * Start just below the marker.
   * Extend to the top of the next item.
   * The height must account for the margin as well.
   */
  top: 0.5em;
  height: calc(100% + var(--timeline-entry-margin));

  width: var(--timeline-width);

  background: var(--timeline-color);

  /*z-index: 2; /* Draw the line in front of the circle when debugging */
}

/* Remove the line segment from the last item */
ol.mrl-timeline li:last-child::after {
  display: none;
}

ol.mrl-timeline time {
  display: block;
  font-weight: bold;
  margin-bottom: .3em;
}

ol.mrl-timeline p {
  margin: 0;
}

/* Styling for the discontinuity marker */
ol.mrl-timeline li .mrl-timeline-discontinuity {
  border: none;
  margin: 0;
  padding: 0;
  height: 1em;
  width: 3em;
  position: relative;
  overflow: visible;

  background: transparent; /* Don't show the <hr> itself */
}

ol.mrl-timeline li .mrl-timeline-discontinuity::before {
  content: '';
  position: absolute;
  left: -1.5em;
  top: 50%; /* Center the marker vertically */
  width: 1em;
  height: 0.2em;
  border-top: 1px solid var(--timeline-marker-color);
  border-bottom: 1px solid var(--timeline-marker-color);
  z-index: 1; /* Ensure the line is drawn behind the discontinuity marker */
}

/* Remove default marker discontinuity items */
ol.mrl-timeline li:has(.mrl-timeline-discontinuity)::before {
  display: none;
}
/* Make gallery items taller on single vignette pages */
.vignette-single ul.gallery li {
  /* height: 40vh; */
}
/* Styling for the warchive section
 */

ul.warchive-list {
  li.warchive-page {
    margin: 1em 0;
    p {
      margin: 0;
      font-size: .8em;
    }
  }
  li.warchive-url {
    color: var(--body-fg-color-deemphasize-text);
    font-size: .8em;
  }
}
body.webgarden-body {
  width: 250px;
  height: 250px;
  margin: 0;
  padding: 0;

  font-family: "Lato Regular", sans-serif;
  font-size: 12px;
  line-height: 1.25em;
  color: var(--body-fg-color);
  background-color: var(--body-bg-color);

  /* iOS Safari will scroll down the size of SOME text WHENEVER IT FUCKING WANTS TO.
   * Sometimes that will happen differetly in two columns of a table,
   * or on two adjacent lines in highlighted code.
   * ... let's turn that shit off please and thank u
   */
  -webkit-text-size-adjust: none;

  position: relative;

  p {
    margin: 0;
  }
  section {
    margin: 0;
  }

  /* Centered */
  #webgarden-stamp {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  #webgarden-avatar {
    position: absolute;
    margin: auto 0;
    left: 0;
    right: 0;
    padding: 0;
    top: 10px;
  }

  #webgarden-birthday {
    color: var(--body-fg-color);
    font-size: 0.75rem;
    margin: 0 auto 15px auto;
    padding: 0;
    position: absolute;
    top: 125px;
    left: 0;
    right: 0;
    text-align: center;
  }

  #webgarden-reservations {
    font-size: 0.75em;
    position: absolute;
    bottom: 10px;
    left: 20px;
  }

  #webgarden-redrum-noci-container {
    text-align: right;
    position: absolute;
    bottom: 10px;
    right: 30px;
    .redrum-noci-svg {
      width: 2em;
      height: 2em;
    }
  }
}

.webgarden-pot {
  border: solid var(--body-fg-color);
}
/* webmentsion.js
 */

#webmentions {
    margin: 0;
    position: relative;
    z-index: 100;
    line-height: 1.2em;

    img {
        all: unset;
    }

    .comments {
        /* max-height: 20em; */
        /* overflow-x: hidden; */
        /* overflow-y: scroll; */
        font-size: 80%;
    }

    img.missing {
        background: var(--body-bg-color);
        border: dashed var(--body-fg-color) 1px;
    }

    ul {
        list-style-type: none;
        margin: 0;
        padding: 4px;
    }

    li {
        text-indent: -1em;
        padding-left: 1em;
        &::before {
            content: initial;
        }
    }

    a.reaction {
        position: relative;
        text-decoration: none;
        text-shadow: 0px 0px 3px var(--body-bg-color);
        margin-right: 0.5em;

        img {
            max-height: 1.3em;
            border-radius: 25%;
            display: inline-block;
        }

        sub {
            font-size: 50%;
        }
    }

    .comments {

        li {
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;

            .text {
                color: var(--body-fg-color-deemphasize-text);
                font-style: italic;
                text-decoration: none;
            }

            .name {
                color: var(--body-fg-color);
            }
        }
    }
}
/* Styling for the portfolio partial
 */

.mrl-portfolio {
  border-spacing: 0 0.5em;
  th {
    font-weight: bold;
    background-color: var(--table-header-bg-color);
  }
  td.mrl-portfolio-item-name {
    font-weight: bold;
  }
  td.mrl-portfolio-item-topics {
    font-size: 0.825em;
  }
  th, td {
    padding: 0.25em 2em;
  }
  .mrl-portfolio-section-name-row {
    margin: 3em 0;
  }
  .mrl-portfolio-item-description-row td {
    color: var(--body-metadata-fg-color)
  }
}
/* Dealing with youtube embeds

Can be used with HTML and JS like this:
    <div
        class="youtube-embed-image-container"
        onclick="document.getElementById('hmos-yt').style.display='block'; this.style.display='none'"
    >
        <img
            alt="Hit me on Signal (screenshot from the music video)"
            width="460"
            height="293"
            src="signal.png"
        />
    </div>
    <div class="youtube-embed-iframe-container" id="hmos-yt">
        <iframe
            width="450"
            height="283"
            src="https://www.youtube.com/embed/wYObKoGMXWg?wmode=transparent&autoplay=1"
            frameborder="0"
            allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
            allowfullscreen>
        </iframe>
    </div>

What it does:
When the page loads, it _just_ loads the image.
However, when the image is clicked, it is hidden and the youtube embed is shown instead.
*/
.youtube-embed-container {
  position: relative;
  width: 100%;
  max-width: 900px; /* Adjust based on your preferred max-width */
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;

  img, iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  img {
    cursor: pointer;
  }

  iframe {
    display: none;
  }
}