/* really, it ought to be `color-scheme: clair obscur;` */
:root {
  color-scheme: light dark;
  scroll-padding: 1.5rem;
}
html {
  border-top: thick solid light-dark(#16161d, lightyellow);
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
body {
  color: light-dark(black, ivory);
  background: light-dark(white, #16161d);
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
/* LET'S DO SOMETHING ABOUT IMAGE/VIDEO DISPLAY */
picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
img, video, canvas, svg {
  border: thick solid light-dark(#16161d, lightyellow);
  box-shadow: 7px 7px 2px light-dark(dimgray, orange);
  margin: 1rem 0;
}
/* COME ON, MOZILLA.
   GET YOUR SHIT TOGETHER AND SUPPORT CSS VIEW TRANSITIONS IN FIREFOX.
   PREFERABLY SOMETIME BEFORE RAGNARÖK!
 */
@view-transition {
  navigation: auto;
}
::view-transition-group(*) {
  animation-duration: .5s;
}
::view-transition-old(root) {
  animation: .5s ease-in both leave;
}
::view-transition-new(root) {
  animation: .5s ease-in both enter;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*) {
    animation-duration: 0s;
  }
}
/* ELEMENTS OF STYLE */
hr {
  border: thin solid light-dark(#16161d, lightyellow);
}
pre {
  white-space: pre-wrap;
  word-wrap: break-all;
  overflow-wrap: break-all;
}
figure, figure > div, figure > blockquote, figure > picture, figcaption {
  margin: 1rem 0;
}
figure > pre, .source {
  background: light-dark(whitesmoke, midnightblue);
  padding: .5rem;
  border: medium solid light-dark(#16161d, lightyellow);
}
blockquote {
  padding: .1rem 1rem;
  background: light-dark(whitesmoke, midnightblue);
  border: medium solid light-dark(#16161d, lightyellow);
  box-shadow: 7px 7px 2px light-dark(dimgray, orange);
}
td, th {
  border: medium solid light-dark(#16161d, lightyellow);
}
th {
  background-color: light-dark(white, #16161d);
}
kbd {
  background-color: light-dark(white, #16161d);
  border: thin solid light-dark(#16161d, lightyellow);
  box-shadow: 2px 2px 1px light-dark(dimgray, orange);
  color: light-dark(black, ivory);
  white-space: nowrap;
}
a {
  color: light-dark(mediumblue, orange);
  text-underline-offset: .35rem;
}
small > a {
  text-underline-offset: .3rem;
}
a:active {
  color: light-dark(skyblue, darkorange);
}
a:visited {
  color: light-dark(darkslategray, firebrick);
}
a:focus, a:hover {
  color: light-dark(darkblue, tomato);
}
a:focus:not(:has(img, svg, picture)), a:hover:not(:has(img, svg, picture)), a:visited:hover:not(:has(img, svg, picture)) {
  outline: thick dashed light-dark(darkblue, tomato);
  outline-offset: .1rem;
  text-decoration: none;
}
a[href^="http"]:not([href*="starbreaker.org"]):not(:has(img, svg, picture)):not(.webring), .external-link {
  padding-right: 1.25rem;
}
/* LET'S MARK EXTERNAL LINKS TO DISTINGUISH THEM FROM LINKS TO OTHER PAGES. */
a[href^="http"]:not([href*="starbreaker.org"]):not(:has(img, svg, picture, span)):not(.webring)::after, .external-link::after {
  position: absolute;
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.3rem;
  background-color: light-dark(black, ivory);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3C!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--%3E%3Cpath d='M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: 75%;
  transform: translateY(0.25rem);
}
/* CUSTOM CLASSES */
.thin {
  border: thin solid light-dark(#16161d, lightyellow);
}
.medium {
  border: medium solid light-dark(#16161d, lightyellow);
}
.thick {
  border: thick solid light-dark(#16161d, lightyellow);
}
[aria-current='page'] {
  font-style: normal;
  font-weight: bold;
  font-size: inherit;
}
.tangent, .draft-notes {
  background: light-dark(whitesmoke, midnightblue);
  margin: 2rem 0 1rem 0;
  padding: 1rem;
  border: thick dashed light-dark(#16161d, lightyellow);
}
.draft-notes {
  border: medium dotted light-dark(#16161d, lightyellow);
}
.underline {
  text-decoration: underline dotted light-dark(black, ivory) 1px;
  text-underline-offset: .35rem;
}

/* GRACELESS DEGRADATION FOR HANDHELDS */
@media only screen and (max-width: 768px) {
  /* Force table elements to stack like blocks */
  .site-nav,
  .site-nav caption,
  .site-nav thead,
  .site-nav tbody,
  .site-nav th,
  .site-nav td,
  .site-nav tr {
    display: block;
  }

  /* Hide the traditional desktop header */
  .site-nav thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* Style each row like a standalone card */
  .site-nav tr {
    background: SED_CSS_BACKGROUND;
  }
  .site-nav tr:not(:last-child) {
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: medium dotted light-dark(#16161d, lightyellow);
  }

  /* Create space on the left side of the cell for labels */
  .site-nav td {
    margin-left: 2rem;
    text-align: left;
  }

  /* Inject the data label into the empty left space */
  .site-nav td::before {
    content: attr(data-label); /* Pulls text from the HTML attribute */
    margin-left: -2rem;
    display: block;
    font-weight: bold;
    text-align: left;
  }
}

/* PROGRESSIVE ENHANCEMENT FOR REAL COMPUTERS */
@media only screen and (min-width: 768px) {
  body {
    margin: 2rem 2rem 1rem;
  }
  figcaption {
    font-size: .8rem;
  }
  blockquote {
    width: fit-content;
  }
  .flex-menu, .flex-breadcrumbs {
    padding-left: 0;
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
  .flex-menu li:nth-child(1), .flex-breadcrumbs li:nth-child(1) {
    list-style-type: none;
  }
  .flex-menu li:not(:nth-child(1)) {
    list-style-type: " | ";
  }
  .flex-breadcrumbs li:not(:nth-child(1)) {
    list-style-type: " / ";
  }
  .site-nav {
    margin-left: 4rem;
  }
}
