span.glue {white-space:nowrap;}
div {box-sizing:border-box;}
div,h1,h2,h3,li,span {scroll-margin-top:24pt;scroll-margin-bottom:24pt;}
html,body {margin:0;padding:0;}
div.content.hidden {display:none;}

/* variables */
:root {--shout-color:#673ab7;--main-color:#0048b1;--secondary-color:#FB8C00;--light-color:#00897b;/*#0097c5*/;--accent-color:#fbc02d;/*#a78100*/;--warning-color:#cc0000;--bg-color:#fff;--text-color:#222;--color-mix-amt:25%;--corner-radius:4px;--visible-gap:1.8rem;--large-gap:2.2rem;--small-gap:0.5rem;--thick-border:2.5px;--box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;}

:root.monochrome {--main-color:#000;--secondary-color:#000;--light-color:#000;--accent-color:#000;--warning-color:#000;--bg-color:#fff;--text-color:#000;--shout-color:#000;--color-mix-amt:0%;--box-shadow:none;}

@media (prefers-color-scheme:dark) {
:root{--main-color: #64B5F6;
  --secondary-color:#BBDEFB;
    --light-color: #BBDEFB;
    --accent-color: #FFEB3B;
    --warning-color: #ff6262;
    --bg-color: #435166;
    --text-color: #e8e8e8;
    --color-mix-amt: 20%;}
}

img {display:block;max-width:90%;max-height:40%;margin:var(--small-gap) auto;}
figcaption {font-style:italic;}
/* margins and spacing */
div.root {margin:0;padding:0.5em;background-color:var(--bg-color);color:var(--text-color);}
/* div.root div {margin-top:var(--small-gap);} */
div.root div + div {margin-top:1em;}
div.document.title {margin-bottom:var(--visible-gap);}
h1, h2, h3 {margin:var(--visible-gap) 0;}
ul,ol {padding-left:1.5rem;}
li {margin:0.75rem 0;}
figure {margin:1rem;}
div.shout.container {margin:1rem 0;}
div.shout.content {padding:var(--small-gap);margin-top:0;margin-left:0.5rem;}
div.shout.container + div.shout.container {margin-top:var(--large-gap);}
div.shout.container:has(+div.shout.container.proof) {margin-bottom:0;}
div.shout.container + div.shout.container.proof {margin-top:0;}
div.shout.title {margin-top:0;}
div.content > .first-child {margin-top:0;}
div.content > .last-child {margin-bottom:0;}
ul > :first-child, ol > :first-child {margin-top:0;}
ul > :last-child, ol > :last-child {margin-bottom:0;}
/* fonts */
div.root {font-family:"Fira Sans", sans-serif;}
h1 {font-size:1.4rem;} h2 {font-size:1.2rem;} h3 {font-size:1rem;}
h4 {font-size:0.9rem;} h5 {font-size:0.8rem;} h6 {font-size:0.7rem;}
div.document.title {font-size:1.6rem;font-weight:bold;}
sup a {text-decoration:none;}
/* colors and decorations */
body {background-color:var(--bg-color);}
img,div.shout.content {box-shadow:var(--box-shadow);}
h1,h2 {color:var(--main-color);} h2 {--main-color:var(--light-color);}
h2 {border-bottom:var(--thick-border) solid var(--main-color); border-left:var(--thick-border) solid var(--main-color);padding-left:var(--thick-border);}
h1 {border-left: 8px solid var(--main-color);padding-left:8px;}
/* div.document.title {color:var(--main-color);} */
div.shout.title {color:var(--shout-color); font-weight:bold;}
div.shout.content {border:var(--thick-border) solid var(--shout-color); border-top-right-radius:1rem; border-bottom-left-radius:1rem; background-color:color-mix(in srgb, var(--shout-color) var(--color-mix-amt), var(--bg-color));}
div.shout.theorem.title, div.shout.lemma.title, div.shout.proposition.title, div.shout.corollary.title {color:var(--main-color);}
div.shout.theorem.content, div.shout.lemma.content, div.shout.proposition.content, div.shout.corollary.content {border-color:var(--main-color);background-color:color-mix(in srgb, var(--main-color) var(--color-mix-amt), var(--bg-color));}
div.shout.proof.title {color:var(--light-color);}
div.shout.proof.content {border-color:var(--light-color);background-color:color-mix(in srgb, var(--light-color) var(--color-mix-amt), var(--bg-color));}
div.shout.note.title {color:var(--accent-color);}
div.shout.note.content {border-color:var(--accent-color);background-color:color-mix(in srgb, var(--accent-color) var(--color-mix-amt), var(--bg-color));}
div.shout.warning.title, div.shout.important.title {color:var(--warning-color);}
div.shout.warning.content, div.shout.important.content {border-color:var(--warning-color);background-color:color-mix(in srgb, var(--warning-color) var(--color-mix-amt), var(--bg-color));}
span.impact, span.highlight {padding :1px 2px; box-sizing:border-box;}
span.impact {color:var(--warning-color);}
span.highlight {background-color:yellow;}
span.impact, span.highlight {border:1px solid var(--warning-color);border-top:0;border-bottom-left-radius:0.25em;border-bottom-right-radius:0.25em;}
span.highlight {border-color:var(--accent-color);}
/* print */
@media print {
  @page {size:letter; margin:0.5in;}
  :root{--bg-color:#fff;}
  div.content.hidden {display:block;}
  img {max-height:3.2in;}
  div.root {margin:0;}
  img,div.shout.content {box-shadow:none;}
  div.shout.content > :last-child {break-before:avoid;}
  div.shout.content > :first-child:not(:first-child) {break-after:avoid;}
  h1,h2,h3,div.document.title, div.shout.title {break-after:avoid;}
}
sup.footnote-marker a {color:var(--main-color);}
sup.footnote-marker + sup.footnote-marker::before {content:',';}
