@import url("/lwarp.css");

/* fonts */
@font-face {
  font-family: "Latin Modern Roman";
  src: url("/fonts/lmroman10-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Latin Modern Roman";
  src: url("/fonts/lmroman10-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Latin Modern Roman";
  src: url("/fonts/lmroman10-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* base */
:root {
  font-family: "Latin Modern Roman", serif;
  color-scheme: light;
  --page-max-width: 700px;
  --page-background: #f8f5ed;
}

html {
  min-height: 100%;
  background: var(--page-background);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  height: auto;
  overflow-y: auto;

  font-family: "Latin Modern Roman", serif;
  font-size: 18px;
  line-height: 1.55;

  color: #000;
  background: transparent;
}

/* layout */
div.pagegrid,
div.homepagegrid {
  display: block;

  width: auto;
  max-width: var(--page-max-width);

  margin: 4rem auto;
  padding: 0 1.5rem;

  box-sizing: content-box;

  max-height: none;
  overflow: visible;
}

main.bodycontainer {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

section.textbody {
  margin: 0;
  padding: 0;
}

div.titlepage div.author,
div.titlepage div.titledate {
  display: none;
}

/* header */
div.titlepage {
  margin: 0 0 2rem 0;
  padding: 0 0 0.35rem 0;

  border: 0;
  border-bottom: 0.4pt solid currentColor;

  text-align: left;
}

div.titlepage div.title,
div.titlepage h1 {
  margin: 0;
  padding: 0;

  font-family: "Latin Modern Roman", serif;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.2;

  text-align: left;
}

/* body */
section.textbody h2 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;

  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.3;
}

section.textbody h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;

  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.3;
}

section.textbody h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;

  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

section.textbody h5,
section.textbody h6 {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;

  text-indent: 0;
}

/* urls */
a,
a:link,
a:visited,
a:hover,
a:active {
  color: inherit;
}

a,
a:link,
a:visited {
  text-decoration: underline;
  text-decoration-thickness: auto;
  text-underline-offset: 0.12em;
}

a:hover {
  text-decoration-thickness: 0.08em;
}

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}


/* code */
code,
kbd,
samp,
pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco,
    Consolas, "Liberation Mono", monospace;
  font-size: 0.85em;
}

pre {
  max-width: 100%;

  margin: 1rem 0;
  padding: 1rem;

  overflow-x: auto;

  border: 0.4pt solid currentColor;

  line-height: 1.4;

  white-space: pre;
}

/* footer */
footer {
  margin: 3rem 0 0 0;
  padding: 0;

  border: 0;

  font-size: 0.9rem;
  line-height: 1.4;

  text-align: center;
}

/* footer badges row */
.footer-badges {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-badges > p {
  display: flex;
  align-items: center;
  margin: 0.2em 0 0;
  line-height: 0;
}

.footer-badges img.hyperimage {
  width: 88px;
  height: 31px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

/* edit the carbon badge */
footer #wcb.carbonbadge {
  --b1: #000;
  --b2: #000;
  position: relative;
  display: inline-block;
  color: #000;
  font-family: "Latin Modern Roman", serif;
}

footer #wcb.carbonbadge #wcb_2,
footer #wcb.carbonbadge #wcb_a,
footer #wcb.carbonbadge #wcb_g {
  color: #000;
  font-family: inherit;
}

footer #wcb.carbonbadge #wcb_a,
footer #wcb.carbonbadge #wcb_g {
  border-color: #000;
  background: var(--page-background);
}

footer #wcb.carbonbadge #wcb_g {
  border-right: 0.13em solid #000;
  border-radius: 0.3em;
}

footer #wcb.carbonbadge #wcb_a {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  border: 0;
  border-radius: 0.3em;
  color: transparent;
  background: transparent;
  font-size: 0;
}

footer #wcb.carbonbadge #wcb_a:focus-visible {
  outline: 1px solid #000;
  outline-offset: 2px;
}


/* blog stuff */
.blog-card {
  border: 1px solid currentColor;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.blog-card > *:first-child {
    margin-top: 0;
}

.blog-ard > *:last-child {
  margin-bottom: 0;
}

/* 88x31 button row */
.buttons-88x31 {
  display: block;
  line-height: 0;
}

.buttons-88x31 img.hyperimage {
  width: 88px;
  height: 31px;
  max-width: none;
}

.buttons-88x31 img.hyperimage,
.tamanotchi img.hyperimage {
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  background: none;
}

/* tamanotchi specific */
.tamanotchi {
  position: fixed;
  right: 2.5rem;
  bottom: 3.5rem;
  z-index: 10;
  line-height: 0;
}

.tamanotchi img.hyperimage {
  animation: wobble 4s step-end infinite;
  transform-origin: 50% 100%;
}

@keyframes wobble {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(11deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(-9deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* inline imgs */
.inline-character img.hyperimage {
  width: auto;
  height: 1em;
  vertical-align: -0.15em;
  margin: 0 0.08em;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
}


/* adjustments */
@media (prefers-reduced-motion: reduce) {
  .tamanotchi img.hyperimage {
    animation: none;
  }
}

@media (min-width: 601px) {
  .tamanotchi {
    right: max(2.5rem, calc((100vw - var(--page-max-width)) / 2));
  }
}

@media (max-width: 600px) {
  div.pagegrid,
  div.homepagegrid {
    margin-top: 3rem;
  }
}
