/******************************************************************************
START Glitch hello-app default styles

The styles in this section do some minimal CSS resets, set default fonts and 
colors, and handle the layout for our footer and "Remix on Glitch" button. If
you're new to CSS they may seem a little complicated, but you can scroll down
to this section's matching END comment to see page-specific styles.
******************************************************************************/
/* Our default values set as CSS variables */

:root {
  --color-bg: #FFD8BB;
  --color-bg2: #F8D8D0;
  --color-text-main: #2A1500;
  --color-primary: #F76319;
  --color-secondary: #FEB468;
  --wrapper-height: 85vh;
  --image-max-width: 320px;
  --font-family: "Computer Modern Sans", sans-serif;
  --font-family-header: var(--font-family);
}

/* Basic page style resets */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

body {
  padding: 0;
  margin: 0;
}

main, footer, nav {
  margin: 0.6rem;
}
main {
  margin-left: calc(2.6rem + 5px);
}

button#privacy-notice-x {
  cursor: pointer;
  font-size: 1.2em;
  vertical-align: middle;
  background-color: transparent;
  border: none;
  color: var(--color-primary);
  font-weight: bold;
  border: 1px solid transparent;
  transition: 0.2s;
}

button#privacy-notice-x:hover {
  border: 1px solid black;
  transition: 0.2s;
}

/* navigation */

nav {
    padding: 5px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

hr {
  border: solid #C0C0C0 1px;
  margin: 1.5rem auto;
}

#hamburger-checkbox {
    display: none;
}

#hamburger-menu {
    width: calc(2rem + 10px);
    height: calc(2rem + 10px);
    padding: 5px;
    display: inline-block;
    border: none;
    background-color: #C0C0C0;
    z-index: 1;
    border-radius: 5px;
    transition: 0.2s;
    cursor: pointer;
}

#hamburger-content {
    margin-left: 0rem;
    position: relative;
    bottom: 0px;
    height: calc(2rem + 10px);
    padding: 5px 0;
    right: 0;
    background-color: #C0C0C0;
    display: block;
    line-height: calc(2rem);
    border-radius: 0 5px 5px 0;
    width: 0;
    /*display: flex;
    align-items: center;*/
    visibility: hidden;
    text-wrap: nowrap;
    overflow-x: visible;
    overflow-y: visible;
    opacity: 0;
   /* display: none;*/
    transition: 0.2s;
    user-select: none;
}

#hamburger-content > span {
    right: 100%;
    user-select: none;
}

#hamburger-menu > #hamburger-menu-div-1, #hamburger-menu > #hamburger-menu-div-2, #hamburger-menu > #hamburger-menu-div-3 {
    display: block;
    margin: 0;
    padding: 0;
    position: relative;
    width: 2rem;
    height: 0.4rem;
    background: var(--color-text-main);
}

#hamburger-menu > #hamburger-menu-div-1 {
    right: 0rem;
    bottom: 0rem;
    transition: 0.2s;
}
#hamburger-menu > #hamburger-menu-div-2 {
    right: 0rem;
    top: 0.4rem;
    visibility: visible;
    transition: 0.2s;
}

#hamburger-menu > #hamburger-menu-div-3 {
    right: 0rem;
    top: 0.8rem;
    transition: 0.2s;
}

#hamburger-checkbox:checked + nav > #hamburger-menu {
    border-radius: 5px 0 0 5px;
}
#hamburger-checkbox:checked + nav > #hamburger-menu > #hamburger-menu-div-1 {
    transform: rotate(45deg) translateY(180%) translateX(15%);
    /*top: 0;*/
    width: 2.5rem;
    transition: 0.2s;
}
#hamburger-checkbox:checked + nav > #hamburger-menu > #hamburger-menu-div-2 {
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}

#hamburger-checkbox:checked + nav > #hamburger-menu > #hamburger-menu-div-3 {
    transform: rotate(-45deg) translateY(-180%) translateX(15%);
    width: 2.5rem;
    transition: 0.2s;
}

#hamburger-checkbox + nav div.nav-sub-urls > a {
  pointer-events: none;
  z-index: -2;
  display: none;
}

#hamburger-checkbox:checked + nav div.nav-sub-urls > a {
  pointer-events: auto;
  z-index: initial;
  display: block;
}

/*#hamburger-checkbox:checked + nav > #hamburger-cross {
    opacity: 100;
    transition: 0.2s;
}*/

/*#hamburger-checkbox:checked + nav > #hamburger-menu {
    opacity: 0;
    transition: 0.2s;
}*/

#hamburger-checkbox:checked + nav {
    /*background: linear-gradient(
      to right,
      #C0C0C0, #C0C0C0 100%
    );
    transition: 0.2s;*/
}

#hamburger-checkbox:checked + nav > #hamburger-content {
    display: inline;
    right: 0rem;
    visibility: visible;
    opacity: 1;
    width: unset;
    padding: 5px 5px;
    transition: 0.2s;
    user-select: contain;
}
#hamburger-checkbox:checked + nav > #hamburger-content > span {
    right: 0;
    user-select: contain;
}

span.nav-part {
  position: relative;
}

span.nav-part > div.nav-sub-urls::before {
  background: transparent;
  position: absolute;
  top: 10px;
  left: -10px;
  width: 10px;
  height: 10px;
  border-radius: 0 5px 0 0;
  content: '';
  box-shadow: 2px -2px 0 0 #C0C0C0;
}
/*
span.nav-part > div.nav-sub-urls::after {
  background: transparent;
  position: absolute;
  top: 10px;
  right: -10px;
  width: 10px;
  height: 10px;
  border-radius: 5px 0 0 0;
  content: '';
  box-shadow: -2px -2px 0 0 #C0C0C0;
}*/
/*
#hamburger-content > span > span.nav-part:last-of-type::after {
  background: transparent;
  position: absolute;
  bottom: 0;
  right: -15px;
  width: 10px;
  height: 10px;
  border-radius: 0 0 0 5px;
  content: '';
  box-shadow: -2px 2px 0 0 #C0C0C0;
  opacity: 0;
  transition: 0.2s;
}

#hamburger-content > span > span.nav-part:last-of-type:hover::after {
  opacity: 1;
  transition: 0.2s;
}*/


span.nav-part > div.nav-sub-urls {
  visibility: visible;
  opacity: 0;
  position: absolute;
  transition: 0.2s;
  background-color: #C0C0C0;
  top: calc(1rem + 5px);
  left: -5px;
  width: fit-content;
  border-radius: 0 5px 5px 5px;
  padding: 5px;
  margin: 0;
  /*height: 0;*/
  /*overflow: clip;*/
}

span.nav-part:hover > div.nav-sub-urls {
  visibility: visible;
  opacity: 1;
  transition: 0.2s;
}

span.nav-part > div.nav-sub-urls > a {
  display: block;
}

/* Navigation grid */
/*.footer {
  display: flex;
  justify-content: space-between;
  margin: 1rem auto 0;
  padding: 1rem 0 0.75rem 0;
  width: 100%;
  flex-wrap: wrap;
  border-top: 4px solid #fff;
}

.footer a:link,
a:visited {
  font-family: HK Grotesk;
  font-style: normal;
  font-weight: normal;
  font-size: 1.1rem;
  color: #000;
  text-decoration: none;
  border-style: none;
}
.footer a:hover {
  background: var(--color-secondary);
}

.footer .links {
  padding: 0.5rem 1rem 1.5rem;
  white-space: nowrap;
}

.divider {
  padding: 0 1rem;
}*/
/******************************************************************************
END Glitch hello-app default styles
******************************************************************************/

/* Page structure */
body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
}
.wrapper {
  min-height: var(--wrapper-height);
  place-items: center;
  margin: 3rem 1rem 0;
}
.content {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
}

/* Typography */
p {
  margin: 0 0 1rem 0;
  line-height: 1.4 !important;
  font-size: 1rem;
}
h1,
h2,
h3,
h4,
h5 {
  margin: 2rem 0 .8rem;
  font-family: var(--font-family-header);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text-main);
}
h1 {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 3.5rem;
  color: #F46017;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 2rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
small,
.text_small {
  font-size: 0.8rem;
}
ul > li,
ol > li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 1rem;
}
ul {
  padding: 0 0 0 18px;
  margin: 0;
  margin-top: 0.75rem
}
ul.no-bullet {
  list-style-type: none;
}
pre {
    overflow-x: scroll;
    border-left: solid 3px #C0C0C0;
    border-radius: 3px;
    padding: 5px 10px;
}

/* Link styles */
a:link,
a:visited {
  text-decoration: underline 4px solid var(--color-primary);
  text-decoration-skip-ink: none;
  text-underline-position: under;
  color: var(--color-text-main);
  transition: background 0.2s linear;
}
nav a:link, nav a:visited {
  border-radius: 3px;
  border-bottom: 0px;
}
a:hover {
  background: var(--color-secondary);
}
a.header-anchor {
  text-decoration: none;
  background: transparent;
}
a.header-anchor:link::before {
  /*position: absolute;*/
  margin-left: -0.9em;
  width: 0.9em;
  font-size: 0.75em;
  display: inline-block;
  content: '#';
  color: #606060;
  visibility: hidden;
}
a.header-anchor:link:hover::before {
  visibility: visible;
}

/* Title style adjustments */
.title-lg {
  color: var(--color-text-main);
  font-family: HK Grotesk;
  font-style: normal;
  font-weight: bold;
  line-height: 1.5;
}
.title-md {
  font-size: 56px;
}

/* Layout: Home */
.home {
  justify-content: left;
}
.illo-container {
  display: flex;
  justify-content: flex-end;
}
.illustration {
  max-height: 2em;
}

div.poem-content {
  overflow-x: scroll;
  white-space: nowrap;
  border-left: solid 3px #C0C0C0;
  border-radius: 3px;
  padding: 5px 10px;
  background-color: var(--color-bg2);
  margin-bottom: 16px;
}
div.poem-content > p {
  margin: 0;
}

div.note {
  white-space: nowrap;
  border-left: solid 3px #C0C0C0;
  border-radius: 3px;
  padding: 5px 10px;
  background-color: #99ccffbb;
  margin-bottom: 16px;
  width: fit-content;
  box-shadow: 0 0 5px #77aaffbb;
  &:before {
    content: "ⓘ";
  }
}

/* Post */
.post {
  place-items: normal;
}
.postTitle {
  font-size: 4rem;
  color: #000;
  line-height: 1.05;
  margin-bottom: 2rem;
}
.controls {
  margin: 3rem 0 2rem;
}

mjx-assistive-mml {
    position: absolute !important;
    top: 0;
    left: 0;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 1px 0 0 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
    display: block !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

td, th {
  text-align: center;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

table {
  display: block;
  overflow-x: auto;
  background: var(--color-bg2);
  border-collapse: collapse;
}

tbody tr td {
  border: solid #F8C8D0;
  border-width: 0 3px;
}

tbody tr:nth-child(odd) td {
  background: #F8C8D0;
  border-color: var(--color-bg2);
}

td[colspan] {
  border-top: 3px solid var(--color-primary);
}

@view-transition {
  navigation: auto;
}

main {
  view-transition-name: main;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes slide-from-right {
  from { transform: rotate(60deg) scale(0.3); }
}

@keyframes slide-to-left {
  to { transform: rotate(-60deg) scale(0.2); }
}

::view-transition-old(main) {
  animation: 540ms cubic-bezier(0.4, 0, 1, 1) both fade-out,
    720ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}

::view-transition-new(main) {
  animation: 540ms cubic-bezier(0, 0, 0.2, 1) 540ms both fade-in,
    720ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

div#latex-rendering-notice {
  position: sticky;
  top: 1em;
  margin: 0 auto;
  font-size: 1.5em;
  width: fit-content;
  background-color: #C0C0C0C8;
}

div#latex-rendering-notice span:after {
  content: '...';
  animation: ellipses 1s infinite;
}

@keyframes ellipses {
  0% {
    content: '   ';
  }
  25% {
    content: '.  ';
  }
  50% {
    content: '.. ';
  }
  75% {
    content: '...';
  }
  100% {
    content: '   ';
  }
}

iframe {
  width: 96vw;
  min-height: 96vh;
}

svg {
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
}