/*
  CSS stylesheet for the LaTeX Lwarp package
  Copyright 2016-2026 Brian Dunn
*/

/* Page layout */

@supports (display: grid) {
    body {
        overflow-y: hidden ;
        height: 100vh ;
    }
}

@supports (display: grid) {
    div.homepagegrid {
        display: grid ;
        grid-template-areas:
            "header"
            "body"
            "footer" ;
        grid-template-columns: 1fr ;
        grid-template-rows:
            max-content
            max-content
            max-content  ;
        max-height: 100vh ;
        overflow-y: auto ;
    }
}

@supports (display: grid) {
    div.pagegrid {
        display: grid ;
        grid-template-areas:
            "topnav topnav"
            "header header"
            "sidetoc body"
            "footer footer"
            "botnav botnav" ;
        grid-template-columns: minmax(15em,1fr) 4fr ;
        grid-template-rows:
            max-content
            max-content
            1fr
            max-content
            max-content  ;
        max-height: 100vh ;
        overflow-y: none ;
    }
}

div.sidetoccontainer {
    font-family: "DejaVu Serif", "Bitstream Vera Serif",
        "Lucida Bright", Georgia, serif;
    margin: 0pt 0em 1ex 0pt ;
    border-right: 1px solid silver;
    border-bottom: 1px solid silver;
    background: #FAF7F4 ;
    font-size:.9em ;
    border-radius: 0px 0px 20px 0px ;
    /* room for border-right next to 80% main */
    float: left ;
    width: 19%;
    max-height: 100vh ;
    overflow-y: auto ;
}

@supports (display: grid) {
    div.sidetoccontainer {
        grid-area: sidetoc ;
        float: none ;
        width: 100% ;
        overflow-y: auto ;
    }
}

nav.sidetoc {
}

div.sidetoccontents {
    width: 100% ;
}

nav.sidetoc p {
    line-height:1.2 ;
    margin: 1ex .5em 1ex .5em ;
    text-indent: 0 ;
}

nav.sidetoc p a {color:black ; font-size: .7em ;}

div.sidetoctitle {font-size: 1.2em; font-weight:bold; text-align:center;
    border-bottom: 1px solid silver ;    }

nav.sidetoc a:hover {text-decoration: underline ; }

main.bodycontainer {
    float: left ;
    width: 80% ;
}

div.homepagegrid main.bodycontainer {
    float: none ;
    width: 100% ;
}

@supports (display: grid) {
    main.bodycontainer {
        grid-area: body ;
        float: none ;
        width: 100% ;
        overflow-y: auto ;
    }
}

nav.topnavigation{
    grid-area: topnav ;
    text-align: left ;
    padding: 0.5ex 1em 0.5ex 1em ;
/*     margin: 2ex 0em 3ex 0em ; */
    margin: 0 ;
    border-bottom: 1px solid silver ;
    border-top: 1px solid silver ;
    clear:both ;
}

nav.botnavigation{
    grid-area: botnav ;
    text-align: left ;
    padding: 0.5ex 1em 0.5ex 1em ;
/*     margin: 3ex 0em 2ex 0em ; */
    margin: 0 ;
    border-top: 1px solid silver ;
    border-bottom: 1px solid silver ;
    clear:both ;
}

header {
    grid-area: header ;
    line-height: 1.2 ;
    font-size: 1em ;
    border-bottom: 1px solid silver ;
    margin: 0px ;
    padding: 1ex 1em 1ex 1em ;
    text-align:left ;
}

footer {
    grid-area: footer ;
    font-size: .85em ;
    line-height: 1.2 ;
    margin-top: 1ex ;
    border-top: 1px solid silver ;
    padding: 1ex 1em 1ex 1em ;
    clear:both ;
    text-align:left ;
}

/* a fix for older browsers: */
header, section, footer, aside, nav, main,
    article, figure { display: block; }

A:link {color:#000080 ; text-decoration: none ; }
A:visited {color:#800000 ; }
A:hover {color:#000080 ; text-decoration: underline ;}
A:active {color:#800000 ; }

a.tocbook {display: inline-block ; margin-left: 0em ;
    font-weight: bold ; margin-top: 1ex ; margin-bottom: 1ex ; }
a.tocpart {display: inline-block ; margin-left: 0em ;
    font-weight: bold ;}
a.tocchapter {display: inline-block ; margin-left: 0em ;
    font-weight: bold ;}
a.tocsection {display: inline-block ; margin-left: 1em ;
    text-indent: -.5em ; font-weight: bold ; }
a.tocsubsection {display: inline-block ; margin-left: 2em ;
    text-indent: -.5em ; }
a.tocsubsubsection {display: inline-block ; margin-left: 3em ;
    text-indent: -.5em ; }
a.tocparagraph {display: inline-block ; margin-left: 4em ;
    text-indent: -.5em ; }
a.tocsubparagraph {display: inline-block ; margin-left: 5em ;
    text-indent: -.5em ; }
a.tocfigure {margin-left: 0em}
a.tocsubfigure {margin-left: 2em}
a.toctable {margin-left: 0em}
a.tocsubtable {margin-left: 2em}
a.toctheorem {margin-left: 0em}
a.toclstlisting {margin-left: 0em}

body {
    font-family: "DejaVu Serif", "Bitstream Vera Serif",
        "Lucida Bright", Georgia, serif;
    background: #FAF7F4 ;
    color: black ;
    margin:0em ;
    padding:0em ;
    font-size: 100% ;
    line-height: 1.2 ;
}

p {margin: 1.5ex 0em 1.5ex 0em ; text-indent: 0em; }
table p {margin: .5ex 0em .5ex 0em ; text-indent: 0em ;}

/* Holds a section number */
span.sectionnumber { margin-right: 0em }

/* Inserted in front of index lines */
span.indexitem {margin-left: 0em}
span.indexsubitem {margin-left: 2em}
span.indexsubsubitem {margin-left: 4em}
div.indexheading {margin-top: 2ex ; font-weight: bold}

div.hidden, span.hidden { display: none ; }

kbd, span.texttt, p span.texttt {
    font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
        "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
        "Courier New", monospace;
    font-size: 100% ;
}

pre { padding: 3pt ; }

span.strong, span.textbf, div.strong, div.textbf, table td.tdbfseries { font-weight: bold; }

span.textit, div.textit, table td.tditshape { font-style: italic; }

table td.tdbfit { font-weight: bold ; font-style:italic }

span.textnormal, div.textnormal {
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
    font-variant-numeric: normal ;
    font-family: "DejaVu Serif", "Bitstream Vera Serif",
        "Lucida Bright", Georgia, serif;
}

span.textmd, div.textmd { font-weight: normal; }

span.textup, div.textup {
    font-style: normal;
    font-variant: normal;
    font-variant-numeric: normal ;
}

/* For complex number i,j symbols */
span.ijit {font-style: italic; font-variant: normal}
span.ijup {font-style: normal; font-variant: normal}

span.textsc, div.textsc {
    font-variant: small-caps;
    font-variant-numeric: oldstyle-nums ;
}

span.textulc, div.textulc {
    font-variant: normal ;
    font-variant-numeric: normal ;
}

span.textsl, div.textsl { font-style: oblique; }

span.textrm, div.textrm {
    font-family: "DejaVu Serif", "Bitstream Vera Serif",
    "Lucida Bright", Georgia, serif;
}

span.textsf, div.textsf {
     font-family: "DejaVu Sans", "Bitstream Vera Sans",
        Geneva, Verdana, sans-serif ;
}

/* nfssext-cfr lining figures */
span.textln, div.textln {
    font-variant-numeric: lining-nums ;
}

/* nfssext-cfr proportional figures */
span.textp, div.textp {
    font-variant-numeric: proportional-nums ;
}

/* nfssext-cfr tabular figures */
span.textt, div.textt {
    font-variant-numeric: tabular-nums ;
}

/* nfssext-cfr font weights */
span.textdb, div.textdb {
    font-weight: 500 ;
}

span.textsb, div.textsb {
    font-weight: 600 ;
}

span.texteb, div.texteb {
    font-weight: 800 ;
}

span.textub, div.textub {
    font-weight: 900 ;
}

span.textlg, div.textlg {
    font-weight: 300 ;
}

span.textel, div.textel {
    font-weight: 200 ;
}

span.textul, div.textul {
    font-weight: 100 ;
}

span.textcircled { border: 1px solid black ; border-radius: 1ex ; }

span.underline {
    text-decoration: underline ;
    text-decoration-skip: auto ;
}

span.overline {
    text-decoration: overline ;
    text-decoration-skip: auto ;
}

div.hrule { border-top: 1px solid silver }

/* for vertical text: */
div.verticalrl { writing-mode: vertical-rl }
div.horizontaltb { writing-mode: horizontal-tb }

/* for diagbox */
div.diagboxtitleN { border-bottom: 1px solid gray }
div.diagboxtitleS { border-top: 1px solid gray }

div.diagboxE {
    padding-left: 2em ;
    text-align: right ;
}

div.diagboxW {
    padding-right: 2em ;
    text-align: left ;
}

/* For realscripts */
.supsubscript {
    display: inline-block;
    text-align:left ;
}

.supsubscript sup,
.supsubscript sub {
    position: relative;
    display: block;
    font-size: .7em;
    line-height: 1;
}

.supsubscript sup {
    top: .3em;
}

.supsubscript sub {
    top: .3em;
}

div.attribution p {
    text-align: right ;
    font-size: 80%
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

span.poemtitle {
  font-size: 120% ; font-weight: bold;
}

pre.tabbing {
    font-family: "Linux Libertine Mono O", "Lucida Console",
        "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
        "Liberation Mono", "FreeMono", "Andale Mono",
        "Nimbus Mono L", "Courier New", monospace;
}

blockquote {
    display: block ;
    margin-left: 2em ;
    margin-right: 2em ;
}

/* quotchap is for the quotchap package */
div.quotchap {
    display: block ;
    font-style: oblique ;
    overflow-x: auto ;
    margin-left: 2em ;
    margin-right: 2em ;
}

blockquote p, div.quotchap p {
    line-height: 1.5;
    text-align: left ;
    font-size: .85em ;
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

/* qauthor is for the quotchap package */
div.qauthor {
  display: block ;
  text-align: right ;
  margin-left: auto ;
  margin-right: 2em ;
  font-size: 80% ;
  font-variant: small-caps;
}

div.qauthor p {
  text-align: right ;
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

div.epigraph, div.dictum {
  line-height: 1.2;
    text-align: left ;
    padding: 3ex 1em 0ex 1em ;
/*     margin: 3ex auto 3ex auto ; */ /* Epigraph centered */
    margin: 3ex 1em 3ex auto ; /* Epigraph to the right */
/*    margin: 3ex 1em 3ex 1em ; */ /* Epigraph to the left */
    font-size: .85em ;
    max-width: 27em ;
}

div.epigraphsource, div.dictumauthor {
    text-align:right ;
    margin-left:auto ;
/*     max-width: 50% ; */
    border-top: 1px solid #A0A0A0 ;
    padding-bottom: 3ex ;
    line-height: 1.2;
}

div.epigraph p, div.dictum p {
    padding: .5ex ;
    margin: 0ex ;
    text-indent: 0em ;
}

div.epigraphsource p, div.dictumauthor p {
    padding: .5ex 0ex 0ex 0ex ;
    margin: 0ex ;
    text-indent: 0em ;
}

div.dictumauthor { font-style:italic }

/* copyrightbox package: */
div.copyrightbox { margin: .5ex .5em }

div.copyrightbox p {
    margin: 0px .5em ;
    padding: 0px ;
    text-indent: 0em ;
}

div.copyrightboxnote {text-align: left ; font-size: 60%}

/* lettrine package: */
span.lettrine { font-size: 4ex ; float: left ; }
span.lettrinetext { font-variant: small-caps ; }

/* ulem, soul, umoline packages: */
span.uline {
    text-decoration: underline ;
    text-decoration-skip: auto ;
}

span.uuline {
    text-decoration: underline ;
    text-decoration-skip: auto ;
    text-decoration-style: double ;
}

span.uwave {
    text-decoration: underline ;
    text-decoration-skip: auto ;
    text-decoration-style: wavy ;
}

span.sout {
    text-decoration: line-through ;
}

span.oline {
    text-decoration: overline ;
    text-decoration-skip: auto ;
}

span.xout {
    text-decoration: line-through ;
}

span.dashuline {
    text-decoration: underline ;
    text-decoration-skip: auto ;
    text-decoration-style: dashed ;
}

span.dotuline {
    text-decoration: underline ;
    text-decoration-skip: auto ;
    text-decoration-style: dotted ;
}

span.letterspacing { letter-spacing: .2ex ; }

span.capsspacing {
    font-variant: small-caps ;
    letter-spacing: .1ex ;
}

span.highlight { background: #F8E800 ; }

/* keystroke package: */
span.keystroke {
    border-style: outset ;
    padding: 0pt .5em 0pt .5em ;
}

html body {
  margin: 0 ;
  line-height: 1.2;
}

body div {
  margin: 0ex;
}

div.book, h1, h2, h3, h4, h5, h6, span.paragraph, span.subparagraph
{
    font-family: "Linux Libertine O", "Hoefler Text", "Garamond",
        "Bembo", "Janson", "TeX Gyre Pagella", "Palatino",
        "Liberation Serif", "Nimbus Roman No 9 L",  "FreeSerif", Times,
        "Times New Roman", serif;
    font-style: normal ;
    font-weight: bold ;
    text-align: left ;
}

h1 {    /* title of the entire website, used on each page */
    text-align: center ;
    font-size: 2.5em ;
    padding: .4ex 0em 0ex 0em ;
}

div.book {
    text-align: center ;
    font-size: 2.325em ;
    padding: .4ex 0em 0ex 0em ;
}

h2 { font-size: 2.25em }
h3 { font-size: 2em }
h4 { font-size: 1.75em }
h5 { font-size: 1.5em }
h6 { font-size: 1.25em }
span.paragraph {font-size: 1em ; font-variant: normal ;
    margin-right: 1em ; }
span.subparagraph {font-size: 1em ; font-variant: normal ;
    margin-right: 1em ;  }

div.minisec {
    font-family: "DejaVu Sans", "Bitstream Vera Sans",
        Geneva, Verdana, sans-serif ;
    font-style: normal ;
    font-weight: bold ;
    text-align: left ;
}

h1 {
  margin: 0ex 0em 0ex 0em ;
  line-height: 1.3;
  text-align: center ;
}

h2 {
  margin: 1ex 0em 1ex 0em ;
  line-height: 1.3;
  text-align: center ;
}

h3 {
  margin: 3ex 0em 1ex 0em ;
  line-height: 1.3;
}

h4 {
  margin: 3ex 0em 1ex 0em ;
  line-height: 1.3;
}

h5 {
  margin: 3ex 0em 1ex 0em ;
  line-height: 1.3;
}

h6 {
  margin: 3ex 0em 1ex 0em ;
  line-height: 1.3;
}

div.titlepage {
  text-align: center ;
}

.footnotes {
    text-align: left ;
    font-size: .85em ;
    margin: 3ex 2em 0ex 2em ;
    border-top: 1px solid silver ;
}

.marginpar, .marginparblock {
    max-width: 50%;
    float: right ;
    clear: both ;
    text-align: left ;
    margin: 1ex 0.5em 1ex 1em ;
    padding: 1ex 0.5em 1ex 0.5em ;
    font-size: 85% ;
    border-top: 1px solid silver ;
    border-bottom: 1px solid silver ;
    overflow-x: auto ;
}

.marginpar br { margin-bottom: 2ex ; }

div.marginblock, div.marginparblock {
    max-width:50%;
    min-width: 10em; /* room for caption */
    float:right;
    text-align:left;
    margin: 1ex 0.5em 1ex 1em ;
    padding: 1ex 0.5em 1ex 0.5em ;
    overflow-x: auto;
}

div.marginblock div.minipage,
div.marginparblock div.minipage {
    display: inline-block ;
    margin: 0pt auto 0pt auto ;
}

div.marginblock div.minipage p ,
div.marginparblock div.minipage p
    { font-size: 85%}

div.marginblock br ,
div.marginparblock br
    { margin-bottom: 2ex ; }

section.textbody div.footnotes{
    margin: 1ex 2em 2ex 2em ;
    border-bottom: 2px solid silver ;
}

.footnoteheader {
    border-top: 2px solid silver ;
    margin-top: 3ex ;
    padding-top: 1ex ;
    font-weight: bold ;
}

.mpfootnotes {
    text-align: left ;
    font-size: .85em ;
    margin-left: 1em ;
    border-top: 1px solid silver ;
}

/* Remove footnote top border in the title page. */
div.titlepage div.mpfootnotes {
    border-top: none ;
}

ul, ol {
  margin: 1ex 1em 1ex 0em;
  line-height: 1.2;
}

body dir, body menu {
  margin: 3ex 1em 3ex 0em;
  line-height: 1.2;
}

li { margin: 0ex 0em 1ex 0em; }

li.p {
    display: inline ;
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em;
}

html {
  margin: 0;
  padding: 0;
}

.programlisting {
  font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
        "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
        "Courier New", monospace;
  margin: 1ex 0ex 1ex 0ex ;
  padding: .5ex 0pt .5ex 0pt ;
  overflow-x: auto;
}

section.textbody>pre.programlisting {
border-top: 1px solid silver ;
border-bottom: 1px solid silver ;
}

div.displaymath {
    text-align: center ;
}

div.displaymathnumbered {
    text-align: right ;
    margin-left: 5% ;
    margin-right: 5% ;
    min-width: 2.5in ;
}

@media all and (min-width: 400px) {
    div.displaymathnumbered {
        margin-left: 10% ;
        margin-right: 10% ;
    }
}

@media all and (min-width: 800px) {
    div.displaymathnumbered {
        margin-right: 20% ;
    }
}

@media all and (min-width: 1200px) {
    div.displaymathnumbered {
        margin-right: 30% ;
    }
}

.inlineprogramlisting {
  font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
        "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
        "Courier New", monospace;
  overflow-x: auto;
}

span.listinglabel {
    display: inline-block ;
    font-size: 70% ;
    width: 4em ;
    text-align: right ;
    margin-right: 2em ;
}

div.abstract {
  margin: 2em 5% 2em 5% ;
  padding: 1ex 1em 1ex 1em ;
/*  font-weight: bold ; */
  font-size: 90% ;
    text-align: left ;
}

div.abstract dl {line-height:1.5;}
div.abstract dt {color:#304070;}

div.abstracttitle{
    font-family: "URW Classico", Optima, "Linux Biolinum O",
        "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
        "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
    font-weight:bold;
    font-size:1.25em;
    text-align: center ;
}

span.abstractrunintitle{
    font-family: "URW Classico", Optima, "Linux Biolinum O",
        "Linux Libertine O", "Liberation Serif", "Nimbus Roman No 9 L",
        "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
    font-weight:bold;
}

.verbatim {
    overflow-x: auto ;
}

.alltt {
    overflow-x: auto ;
}

.bverbatim {
    margin: 1ex 0pt 1ex 0pt ;
    padding: .5ex 0pt .5ex 0pt ;
    overflow-x: auto ;
}

.lverbatim {
    margin: 1ex 0pt 1ex 0pt ;
    padding: .5ex 0pt .5ex 0pt ;
    overflow-x: auto ;
}

.fancyvrb {
    margin: 3ex 0pt 3ex 0pt ;
    font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
        "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
        "Courier New", monospace;
}

.fancyvrblabel {
    font-size: .85em ;
    text-align: center ;
    font-weight: bold ;
    margin-top: 1ex ;
    margin-bottom: 1ex ;
}

.verse {
    font-family: "Linux Libertine Mono O", "Lucida Console",
        "Droid Sans Mono", "DejaVu Mono", "Bitstream Vera Mono",
        "Liberation Mono", "FreeMono", "Andale Mono",
        "Nimbus Mono L", "Courier New", monospace;
    margin-left: 1em ;
}

div.singlespace { line-height: 1.2 ; }
div.onehalfspace { line-height: 1.5 ; }
div.doublespace { line-height: 2 ; }

/* Word processor format output: */
div.wpfigure { border: 1px solid red ; margin: .5ex ; padding: .5ex ; }
div.wptable { border: 1px solid blue ; margin: .5ex ; padding: .5ex ; }
div.wpminipage { border: 1px solid green ; margin: .5ex ; padding: .5ex ;}

/* Minipage environments, vertically aligned to top, center, bottom: */
.minipage, .fminipage, .fcolorminipage {
    /* display: inline-block ; */
        /* Mini pages which follow each other will be tiled. */
    text-align:left;
    margin: .25em .25em .25em .25em;
    padding: .25em .25em .25em .25em;
    display: inline-flex;
    flex-direction: column ;
    overflow: auto;
}

.inlineminipage {
    display: inline-block ;
    text-align: left
}

/* Paragraphs in the flexbox did not collapse their margins. */
/* Have not yet researched this. */
.minipage p {margin: .75ex 0em .75ex 0em ; text-indent: 0em ; }

.fboxBlock .minipage, .colorbox .minipage, .colorboxBlock .minipage,
.fcolorbox .minipage, .fcolorboxBlock .minipage
    {border: none ; background: none;}

.fbox, .fboxBlock { border: 1px solid black ; padding: 4pt }

.fbox, .fboxBlock, .fcolorbox, .fcolorboxBlock, .colorbox, .colorboxBlock,
.fminipage, .fcolorminipage
    {display: inline-block}

.shadowbox, .shabox {
   border: 1px solid black;
    box-shadow: 3px 3px 3px #808080 ;
     border-radius: 0px ;
    padding: .4ex .3em .4ex .3em ;
    margin: 0pt .3ex 0pt .3ex ;
  display: inline-block ;
}

.doublebox {
   border: 3px double black;
     border-radius: 0px ;
    padding: .4ex .3em .4ex .3em ;
    margin: 0pt .3ex 0pt .3ex ;
  display: inline-block ;
}

.ovalbox, .Ovalbox {
   border: 1px solid black;
     border-radius: 1ex ;
    padding: .4ex .3em .4ex .3em ;
    margin: 0pt .3ex 0pt .3ex ;
  display: inline-block ;
}

.Ovalbox { border-width: 2px ; }

.framebox {
   border: 1px solid black;
     border-radius: 0px ;
    padding: .3ex .2em 0ex .2em ;
    margin: 0pt .1ex 0pt .1ex ;
  display: inline-block ;
}

/* mdframed, tcolorbox, shadebox packages */
.mdframed, .tcolorbox, .shadebox {
    padding: 0ex ;
    margin: 2ex 0em 2ex 0em ;
    border: 1px solid black ;
}

.tcolorbox {
    border-radius: 10pt ;
    margin: 2ex 1em 2ex 1em ;
}

.mdframed p, .tcolorbox p {
    padding: 0ex .5em 0ex .5em ;
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

.mdframed dl, .tcolorbox dl { padding: 1ex .5em 0ex .5em ; }

.mdframedtitle, .tcolorboxtitle {
    padding: .5ex 0pt 0pt 0pt ;
    border-radius: 10pt 10pt 0pt 0pt ;
    display: block ;
    margin-bottom: 1ex ;
    border-bottom: 1px solid silver ;
}

.tcolorboxsubtitle .tcolorbox {
    margin: 2ex 0em 2ex 0em ;
    border-radius: 0pt ;
}

.mdframedsubtitle {
    display: block ;
}

.mdframedsubsubtitle {
    display: block ;
}

.mdtheorem {
    padding: 0ex .5em 0ex .5em ;
    margin: 3ex 5% 3ex 5% ;
}

/* framed package */
.framed, pre.boxedverbatim, fcolorbox {
    margin: 3ex 0em 3ex 0em ;
   border: 1px solid black;
     border-radius: 0px ;
    padding: .3ex 1em 0ex 1em ;
  display: block ;
}

.shaded {
    margin: 3ex 0em 3ex 0em ;
    padding: .3ex 1em .3ex 1em ;
    display: block ;
}

.snugframed {
    margin: 3ex 0em 3ex 0em ;
   border: 1px solid black;
     border-radius: 0px ;
  display: block ;
}

.framedleftbar {
    margin: 3ex 0em 3ex 0em ;
   border-left: 3pt solid black;
     border-radius: 0px ;
    padding: .3ex .2em .3ex 1em ;
  display: block ;
}

.framedtitle {
    margin: 0em ;
    padding: 0em ;
    font-size: 130%
}

.framedtitle p {
    padding: .3em ;
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

/* For the niceframe package: */

div.niceframe, div.curlyframe, div.artdecoframe, div.generalframe {
    padding: 1ex ;
    margin: 2ex auto ;
    border-radius: 2ex ;
}

div.niceframe {
    border: 6px groove black ;
}

div.curlyframe {
    border-left: 3px dotted black ;
    border-right: 3px dotted black ;
    border-radius: 6ex ;
}

div.artdecoframe {
    border-left: 10px double black ;
    border-right: 10px double black ;
    border-radius: 6ex ;
}

div.generalframe {
    border: 6px groove black ;
}

/* For beamerarticle: */
div.beamerframe {
    margin: 3ex 1em 3ex 1em ;
   border: 1px solid gray;
     border-radius: 0px ;
    padding: .3ex 1em 0ex 1em ;
  display: block ;
}

dl {
  margin: 1ex 2em 1ex 0em;
  line-height: 1.3;
}

li dl { margin-left: 2em }

dl dt {
    display: block ;
    float:left ;
    font-weight: bold;
    padding-right: 1em ;
}

dl dd { display: block ; }

dl dd:after { content: "" ; display: block ; clear: both }

dl dd p {
    margin: 0ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

dd ul, dd ol, dd dl {
    clear: both ;
/*    padding-top: 1ex ; */
}

nav {
    font-family: "URW Classico", Optima, "Linux Biolinum O",
        "DejaVu Sans", "Bitstream Vera Sans",
        Geneva, Verdana, sans-serif ;
    margin-bottom: 4ex ;
}

nav p {
    line-height: 1.2 ;
    margin-top:.5ex ;
    margin-bottom:.5ex;
    font-size: .9em ;
    text-indent: 0em ;
}

img, img.hyperimage, img.borderimage {
    max-width: 600px;
    border: 1px solid silver;
    box-shadow: 3px 3px 3px #808080 ;
    padding: .5% ;
    margin: .5% ;
    background: none ;
}

img.inlineimage{
    padding: 0px ;
    box-shadow: none ;
    border: none ;
    background: none ;
    margin: 0px ;
    display: inline-block ;
    border-radius: 0px ;
}

img.logoimage{
    max-width: 300px ;
    box-shadow: 3px 3px 3px #808080 ;
    border: 1px solid black ;
    background:none ;
    padding:0 ;
    margin:.5ex ;
    border-radius: 10px ;
}

.section {
/*
    To have each section float relative to each other:
*/
/*
    display: block ;
    float: left ;
    position: relative ;
    background: white ;
    border: 1px solid silver ;
    padding: .5em ;
*/
    margin: 0ex .5em 0ex .5em ;
    padding: 0 ;
}

figure {
    margin: 5ex auto 5ex auto ;
    padding: 1ex 1em 1ex 1em ;
    overflow-x: auto ;
}

/* To automatically center images in figures: */
/*
figure img.inlineimage {
    margin: 0ex auto 0ex auto ;
    display: block ;
}
*/

/* To automatically center minipages in figures: */
/*
figure div.minipage, figure div.minipage div.minipage {
    margin: 1ex auto 1ex auto ;
    display: block ;
}
*/

figure figure { margin: 0pt }

figure div.minipage p {
    font-size: 85% ;
    margin: 1.5ex 0em 1.5ex 0em ;
    text-indent: 0em ;
}

figure.subfigure, figure.subtable  {
    display: inline-block ; margin: 3ex 1em 3ex 1em ;
}

div.figurecaption .minipage { margin:0 ; padding: 0 }

/* for subcaptions: */
figure div.minipage div.figurecaption {
    max-width: 100% ;   /* fallback if min() does not work */
    max-width: min(30em,100%)
}

div.minipage figure { border: none ; box-shadow: none ; }
div.minipage figure.table { margin: 0ex }
div.minipage div.footnotes { margin: 1ex 2em 0ex 2em }

div.floatrow { text-align: center; }

div.floatrow figure { display: inline-block ; margin: 1ex 2% ; }

div.floatfoot { font-size: .85em ;
    border-top: 1px solid silver ; line-height: 1.2 ; }

/* Center if only one line, "start" align if more than one line: */
div.figurecaption , .lstlistingtitle {
    font-size: .85em ;
    font-weight: bold ;
    text-align: start ;
    margin: 1ex auto;
    width: max-content;
    max-width: 100%;
}

/* A marginblock is small, so always center and don't mess with the width. */
div.marginblock div.figurecaption {
    width: 100% ;
    text-align: center ;
}

figure.subfigure div.figurecaption, figure.subtable div.figurecaption  {
    border-bottom: none ; background: none ;
}

div.nonfloatcaption {
    margin: 1ex auto 1ex auto ;
    font-size: .85em ;
    text-align: center ;
    font-weight: bold ;
}

/* For a \RawCaption inside a minipage inside a figure's floatrow: */
figure div.floatrow div.minipage div.figurecaption {
    border: none ;
    background: none ;
}

/* For packages such as float, rotfloat, and algorithm2e: */

figure.boxed, figure.boxruled {
    border: 1px solid black ;
}

figure.ruled {
    border-top: 1px solid black ;
    border-bottom: 1px solid black ;
    border-left: 0px ;
    border-right: 0px ;
    border-radius: 0px ;
    background: none ;
    box-shadow: none ;
}

figure.ruled div.figurecaption, figure.boxruled div.figurecaption {
    border-top: 1px solid silver ;
    border-bottom: 1px solid silver ;
}

table {
    margin: 1ex auto 1ex auto ;
    border-collapse: separate ;
    border-spacing: 0px ;
    line-height: 1.3 ;
    }

table > tbody > tr.hline > td {border-top: 1px solid #808080 ; margin-top: 0ex ;
    margin-bottom: 0ex ; } /* for \hline */

tr.tbrule td {border-top: 1px solid black ; margin-top: 0ex ;
    margin-bottom: 0ex ; } /* for \toprule, \bottomrule */

td {padding: .5ex .5em .5ex .5em ;}

table td.tdl { text-align: left ; vertical-align: middle ; }
table td.tdc { text-align: center ; vertical-align: middle ; }
table td.tdat { text-align: center ; vertical-align: middle ; padding: 0px ; margin: 0px ; }
table td.tdbang { text-align: center ; vertical-align: middle ; }
table td.tdr { text-align: right ; vertical-align: middle ; }
table td.tdp { text-align: left ; vertical-align: bottom ; }
table td.tdm { text-align: left ; vertical-align: middle ; }
table td.tdb { text-align: left ; vertical-align: top ; }

table td.tvertbarl { border-left: 1px solid black }
table td.tvertbarldouble { border-left: 4px double black }
table td.tvertbarr { border-right: 1px solid black }
table td.tvertbarrdouble { border-right: 4px double black }

table td.tvertbarldash { border-left: 1px dashed black }
table td.tvertbarldoubledash { border-left: 2px dashed black }
table td.tvertbarrdash { border-right: 1px dashed black }
table td.tvertbarrdoubledash { border-right: 2px dashed black }

table td.tdcenter { text-align: center}
table td.tdleft { text-align: left}
table td.tdright { text-align: right}

/* for cmidrules: */
table td.tdrule {
    border-top: 1px solid #A0A0A0 ;
}

table td.tdrulel {
    border-top-left-radius:.5em ;
    border-top: 1px solid #A0A0A0 ;
}

table td.tdruler {
    border-top-right-radius:.5em ;
    border-top: 1px solid #A0A0A0 ;
}

table td.tdrulelr {
    border-top-left-radius:.5em ;
    border-top-right-radius:.5em ;
    border-top: 1px solid #A0A0A0 ;
}

/* Margins of paragraphs inside table cells: */
td.tdp p , td.tdprule p , td.tdP p , td.tdPrule p {
    padding-top: 1ex ;
    padding-bottom: 1ex ;
    margin: 0ex ;
    text-indent: 0em ;
}
td.tdm p , td.tmbrule p , td.tdM p , td.tdMrule p {
    padding-top: 1ex ;
    padding-bottom: 1ex ;
    margin: 0ex ;
    text-indent: 0em ;
}
td.tdb p , td.tdbrule p , td.tdB p , td.tdBrule p {
    padding-top: 1ex ;
    padding-bottom: 1ex ;
    margin: 0ex ;
    text-indent: 0em ;
}

td.tdp , td.tdprule , td.tdP , td.tdPrule
    { padding: 0ex .5em 0ex .5em ; }
td.tdm , td.tdmrule , td.tdM , td.tdMrule
    { padding: 0ex .5em 0ex .5em ; }
td.tdb , td.tdbrule , td.tdB , td.tdBrule
    { padding: 0ex .5em 0ex .5em ; }

/* table notes: */
.tnotes {
    margin: 0ex 5% 1ex 5% ;
    padding: 0.5ex 1em 0.5ex 1em;
    font-size:.80em;
    text-align: left ;
}

.minipage .tnotes {
    margin: 0pt ;
    padding: 0pt ;
}

.tnotes dl dt p {
    margin-bottom:0px;
    text-indent: 0em ;
}

.tnoteitemheader {margin-right: 1em;}

/* for colortbl and cell color */
div.cellcolor {
    width: 100% ;
    padding: .5ex .5em .5ex .5em ;
    margin: -.5ex -.5em -.5ex -.5em ;
}

/* for lyluatex */
span.lyluatex {
    display: inline-block ;
}

div.lyluatex p span.lateximagesource img {
    display: block ;
    margin-top: 3ex ;
    margin-bottom: 3ex ;
}

/* for bigdelim */
.ldelim, .rdelim { font-size: 200% }

/* center, flushleft, flushright environments */
div.center{text-align:center;}
div.center table {margin-left:auto;margin-right:auto;}
div.flushleft{text-align:left;}
div.flushleft table {margin-left:0em ; margin-right:auto;}
div.flushright{text-align:right;}
div.flushright table {margin-left:auto ; margin-right: 0em ;}

/* Fancybox */
div.Btrivlist table tr td {
    padding: .2ex 0em ;
}

/* program listing callouts: */
span.callout {
     font-family: "DejaVu Sans", "Bitstream Vera Sans",
        Geneva, Verdana, sans-serif ;
    border-radius: .5em;
    background-color:black;
    color:white;
    padding:0px .25em 0px .25em;
    margin: 0 ;
    font-weight: bold;
    font-size:.72em ;
}

div.programlisting pre.verbatim span.callout{
    font-size: .85em ;
}

span.verbatim, span.verb {
    font-family: "DejaVu Mono", "Bitstream Vera Mono", "Lucida Console",
        "Nimbus Mono L", "Liberation Mono", "FreeMono", "Andale Mono",
        "Courier New", monospace;
}

div.titlehead
{
    text-align: left ;
    font-style: normal ;
    font-weight: normal ;
    font-style: normal ;
    font-size: .8em ;
    margin: 1ex 0em 1ex 0em ;
}

div.subject
{
    text-align: center ;
    font-style: normal ;
    font-weight: bold ;
    font-style: normal ;
    font-size: .8em ;
    margin: 1ex 0em 1ex 0em ;
}

div.published
{
    text-align: center ;
    font-variant: normal ;
    font-style: italic ;
    font-size: 1em ;
    margin: 1ex 0em 1ex 0em ;
}

div.subtitle
{
    text-align: center ;
    font-variant: normal ;
    font-style: italic ;
    font-size: 1.25em ;
    margin: 1ex 0em 1ex 0em ;
}

div.subtitle p {
    margin: 1ex ;
    text-indent: 0em;
}

div.author
{
    text-align: center ;
    font-variant: normal ;
    font-style: normal ;
    font-size: 1em ;
    margin: 1ex 0em 1ex 0em ;
}

div.oneauthor {
    display: inline-block ;
    margin: 0ex 1em 0ex 1em ;
}

/*
div.author table {
    margin: 1ex auto 0ex auto ;
    background: none ;
}

div.author table tbody tr td { padding: .25ex ; }
*/

span.affiliation {font-size: .85em ; font-variant: small-caps; }

div.titledate {
    text-align: center ;
    font-size: .85em ;
    font-style: italic;
    margin: 1ex 0em 1ex 0em ;
}

/* for \LinkHome, \LinkPrevious, and \LinkNext: */
a.linkhome { font-weight:bold ; font-size: 1em ;}

div.lateximagesource { padding: 0px ; margin: 0px ; display: none; }

img.lateximage{
    padding: 0pt ;
    margin: 0pt ;
    box-shadow: none ;
    border: none ;
    background: none ;
    max-width: 100% ;
    border-radius: 0ex ;
    border: none ;
}

section.textbody { margin: 0ex 1em 0ex 1em ;}

div.multicolsheading { -webkit-column-span: all;
    -moz-column-span: all; column-span: all; }
div.multicols {
    -webkit-columns: 3 auto ;
    -moz-columns: 3 auto ;
    columns: 3 auto ;
}
div.multicols p {
    margin-top: 0ex ;
    text-indent: 0em ;
}

/* Used for xfrac and nicefrac: */
span.numerator {
    font-size: 60% ;
    vertical-align: .4em ;
}

span.denominator {
    font-size: 60%
}

/* Used for algorithm2e: */
div.alg2evline{
    margin-left: 1em ;
    padding-left: 1em ;
    border-left: 1px solid black ;
    border-radius: 0px 0px 0px 1ex ;
}

div.alg2evsline{
    margin-left: 1em ;
    padding-left: 1em ;
    border-left: 1px solid black ;
}

div.alg2enoline{
    margin-left: 1em ;
    padding-left: 1em ;
}

span.alg2elinenumber{
    margin-right: .5em ;
    font-size: 60% ;
    color: red ;
}

/* Used for algorithmicx: */
span.floatright { float: right ; }

/* keyfloat and tocdata: */
.floatnotes {
    margin: 0ex 5% 0ex 5% ;
    padding: 0ex 1em 0ex 1em ;
    font-size:.80em ;
    text-align: left ;
}

.authorartist{
    display:block ;
    font-size:.70em ;
    font-style: italic;
}

nav .authorartist{ display:inline; }

/* Native LaTeX theorems: */

.theoremcontents {
    font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ;
}

.theoremlabel {
    font-style: normal; font-weight: bold ; margin-right: .5em ;
}

/* theorem, amsthm, and ntheorem packages */

span.theoremheader,
span.theoremheaderplain,
span.theoremheaderdefinition,
span.theoremheaderbreak,
span.theoremheadermarginbreak,
span.theoremheaderchangebreak,
span.theoremheaderchange,
span.theoremheadermargin
{
    font-style:normal ; font-weight: bold ; margin-right: 1em ;
}

span.amsthmnameplain,
span.amsthmnamedefinition,
span.amsthmnumberplain,
span.amsthmnumberdefinition
{
    font-style:normal ; font-weight: bold ;
}

span.amsthmnameremark,
span.amsthmnumberremark
{font-style:italic ; font-weight: normal ; }

span.amsthmnoteplain,
span.amsthmnotedefinition
{font-style:normal ;}

span.theoremheaderremark,
span.theoremheaderproof,
span.amsthmproofname
{font-style:italic ; font-weight: normal ; margin-right: 1em ; }

span.theoremheadersc
{
    font-style:normal ;
    font-variant: small-caps ;
    font-weight: normal ;
    margin-right: 1em ;
}

.theoremendmark {float:right}

div.amsthmbodyplain, div.theorembodyplain, div.theorembodynonumberplain,
div.theorembodybreak, div.theorembodynonumberbreak,
div.theorembodymarginbreak,
div.theorembodychangebreak,
div.theorembodychange,
div.theorembodymargin
{
    font-style:italic;
    margin-top: 3ex ; margin-bottom: 3ex ;
}

div.theorembodydefinition, div.theorembodyremark, div.theorembodyproof,
div.theorembodyplainupright, nonumberplainuprightsc,
div.amsthmbodydefinition, div.amsthmbodyremark,
div.amsthmproof
{
    font-style: normal ;
    margin-top: 3ex ; margin-bottom: 3ex ;
}

span.amsthmnoteremark {}

/* thmbox */

.thmbox {
    font-style: italic; margin-top: 3ex ; margin-bottom: 3ex ;
    border: 1px solid gray ;
    padding: 1ex ;
}

.thmboxtitle {
    font-style: normal; font-weight: bold ; margin-right: .5em ;
    border-bottom: 1px solid gray ;
}

span.thmboxproofname, span.thmboxexamplename {
    font-weight: bold ;
}

div.thmboxproof, div.thmboxexample {
    font-size: 0.85em ;
    margin: 2ex ;
}

div.thmboxleftbar {
    border-left: 2px solid black ;
    padding-left: 1em ;
}

/* For the backnaur package: */
div.backnaur {
    display: block ;
    margin: 2ex 2em 2ex 2em ;
}

div.backnaur p {
    margin: .25ex 0ex .25ex 0ex ;
    text-indent: 0em ;
}

div.backnaurprod {
    display: inline-block ;
    min-width: 8em ;
    text-align:right ;
}

div.backnaurdesc {
    display: inline-block ;
}

/* For the notes package: */
div.notesimportantnote, div.noteswarningnote, div.notesinformationnote {
    clear: both ;
    margin: 2ex 2em 2ex 2em ;
    border: 1px solid silver ;
}

div.notesicon {
    float:left ;
    display: inline-block ;
    background: gold ;
    padding: 0ex 1em 0ex 1em ;
    margin-right: 1em ;
    font-weight: bold ;
}

div.notescontents { font-style: italic }

/* nolbreaks package: */
span.nolbreaks { white-space: nowrap ; }

/*
For CSS LaTeX and related logos:
Based on spacing demonstrated by the metafont package.

The subscripts are shrunk instead of lowered below the baseline,
to avoid browser rendering errors with the line height in lists, etc.
*/

.latexlogofont {
    font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
        "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
    font-variant: normal ;
}

.latexlogo {
    font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
        "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
}

.latexlogosup {
  text-transform: uppercase;
  letter-spacing: .03em ;
  font-size: 0.7em;
  vertical-align: 0.25em;
  margin-left: -0.4em;
  margin-right: -0.15em;
}

.latexlogosub {
  text-transform: uppercase;
/*  vertical-align: -0.27ex; */
  margin-left: -0.08em;
  margin-right: -0.07em;
/*  font-size: 1em; */
    font-size: .7em ;
}

.latexlogotwoe {
  text-transform: none ;
  font-variant-numeric: oldstyle-nums ;
}

.latexlogotwoesub {
  font-style:italic ;
/*  vertical-align: -0.27ex; */
  margin-left: -0.11em;
  margin-right: -0.1em;
/*  font-size: 1em; */
    font-size: .7em ;
}

.xelatexlogo {
    font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
        "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
    letter-spacing: .03em ;
}

.xelatexlogosub {
/*  vertical-align: -0.27ex; */
  margin-left: -0.0667em;
  margin-right: -.05em;
/*  font-size: 1em; */
    font-size: .7em ;
  letter-spacing: .03em ;
}

.amslogo {
    font-family: "TeXGyreChorus","URW Chancery L",
        "Apple Chancery","ITC Zapf Chancery","Monotype Corsiva",
        "Linux Libertine O", "Nimbus Roman No 9 L",  "FreeSerif",
        "Hoefler Text", Times, "Times New Roman", serif ;
    font-style: italic ;
}

.lyxlogo {
    font-family: "URW Classico", Optima, "Linux Biolinum O",
        "DejaVu Sans", "Bitstream Vera Sans", Geneva,
        Verdana, sans-serif ;
}

/* Only display top and bottom navigation if a small screen: */
/* Hide the sidetoc if a small screen: */
nav.topnavigation { display:none; }
nav.botnavigation { display:none; }

/* Only display the sidetoc's webpage title if a small screen */
span.sidetocthetitle { display: none }

@media screen and (max-width: 100em) {
    div.multicols {
        -webkit-columns: 2 auto ;
        -moz-columns: 2 auto ;
        columns: 2 auto ;
    }
}

@media screen and (max-width: 50em) {
    div.pagegrid {
        display: grid ;
        grid-template-columns: 1fr ;
        grid-template-areas:
            "topnav"
            "header"
            "sidetoc"
            "body"
            "footer"
            "botnav" ;
        overflow-y: auto ;
    }
    div.sidetoccontainer {
        float: none ;
        width: 100% ;
        padding: 0 ;
        border-radius: 0 ;
        border-bottom: 1px solid black ;
        border-top: 1px solid black ;
        box-shadow: none ;
    }
    span.sidetocthetitle { display: inline }
    nav.topnavigation { display:block }
    nav.botnavigation { display:block }
    main.bodycontainer { width: 100% }
    .marginpar {
        max-width: 100%;
        float: none;
        display:block ;
        margin: 1ex 1em 1ex 1em ;
    }
    div.multicols {
        -webkit-columns: 1 auto ;
        -moz-columns: 1 auto ;
        columns: 1 auto ;
    }
}

@media print {
    div.pagegrid {
        display: block ;
        max-height: 100% ;
        overflow-y: show ;
    }
    body {
        font-family: "Linux Libertine O",
        "DejaVu Serif", "Bitstream Vera Serif",
        "Liberation Serif", "Nimbus Roman No 9 L",
        "FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
    }
    div.sidetoccontainer { display:none; }
    nav.topnavigation { display: none; }
    nav.botnavigation { display: none; }
    main.bodycontainer { width: 100% }
}

@media handheld {
    div.pagegrid {
        display: block ;
        max-height: auto ;
        overflow-y: auto ;
    }
    div.sidetoccontainer { display:none; }
    nav.topnavigation { display:block }
    nav.botnavigation { display:block }
    main.bodycontainer { width: 100% }
}

/* Reader design */
/* Responsive study reader. Appended after lwarp.css by the web build. */

:root {
  color-scheme: light;
  --reader-bg: #ffffff;
  --reader-surface: #ffffff;
  --reader-soft: #f5f5f5;
  --reader-ink: #111111;
  --reader-muted: #626262;
  --reader-faint: #8a8a8a;
  --reader-rule: #d8d8d8;
  --reader-rule-strong: #a8a8a8;
  --reader-inverse: #111111;
  --reader-inverse-ink: #ffffff;
  --reader-focus: #111111;
  --reader-ui: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei UI",
    "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --reader-body: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC",
    STSong, SimSun, Georgia, serif;
  --reader-mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  --reader-content-width: 720px;
  --reader-font-size: 18px;
  --reader-header-height: 68px;
  --reader-gutter: clamp(18px, 2.2vw, 34px);
  --reader-radius: 6px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --reader-bg: #111111;
  --reader-surface: #171717;
  --reader-soft: #222222;
  --reader-ink: #f4f4f4;
  --reader-muted: #b9b9b9;
  --reader-faint: #959595;
  --reader-rule: #393939;
  --reader-rule-strong: #696969;
  --reader-inverse: #f4f4f4;
  --reader-inverse-ink: #111111;
  --reader-focus: #f4f4f4;
}

html[data-font-scale="small"],
html[data-font-scale="1"] {
  --reader-font-size: 16px;
}

html[data-font-scale="large"],
html[data-font-scale="1.25"] {
  --reader-font-size: 20px;
}

html[data-font-scale="1.125"] {
  --reader-font-size: 18px;
}

html[data-font-scale="medium"],
html[data-font-scale="standard"] {
  --reader-font-size: 18px;
}

html[data-content-width="narrow"] {
  --reader-content-width: 620px;
}

html[data-content-width="wide"] {
  --reader-content-width: 840px;
}

html {
  background: var(--reader-bg);
  color: var(--reader-ink);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--reader-header-height) + 22px);
  text-size-adjust: 100%;
}

body {
  background: var(--reader-bg);
  color: var(--reader-ink);
  font-family: var(--reader-body);
  font-size: var(--reader-font-size);
  height: auto;
  line-height: 1.82;
  margin: 0;
  max-width: none;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
[role="button"],
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration-color: var(--reader-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
}

a:link,
a:visited {
  color: inherit;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--reader-focus);
  outline-offset: 3px;
}

.reader-skip-link {
  background: var(--reader-inverse);
  color: var(--reader-inverse-ink);
  font-family: var(--reader-ui);
  font-size: 14px;
  left: 12px;
  padding: 10px 14px;
  position: fixed;
  top: 8px;
  transform: translateY(-160%);
  z-index: 1000;
}

.reader-skip-link:focus {
  transform: translateY(0);
}

.reader-topbar {
  align-items: center;
  background: color-mix(in srgb, var(--reader-bg) 96%, transparent);
  border-bottom: 1px solid var(--reader-rule);
  display: grid;
  font-family: var(--reader-ui);
  gap: 24px;
  grid-template-columns: minmax(252px, 1fr) minmax(260px, 300px) minmax(360px, 1fr);
  height: var(--reader-header-height);
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 70;
}

.reader-topbar #reader-progress {
  bottom: -1px;
  height: 3px;
  left: 0;
  position: absolute;
  width: 100%;
}

.reader-brand {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.reader-search-trigger {
  align-items: center;
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule);
  border-radius: var(--reader-radius);
  color: var(--reader-muted);
  cursor: pointer;
  display: flex;
  font-family: var(--reader-ui);
  font-size: 14px;
  gap: 10px;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 11px;
  text-align: left;
  width: 100%;
}

.reader-topbar > .reader-search-trigger {
  border-color: var(--reader-rule-strong);
}

.reader-search-trigger kbd {
  border: 1px solid var(--reader-rule);
  border-radius: 4px;
  color: var(--reader-muted);
  font-family: var(--reader-ui);
  font-size: 12px;
  margin-left: auto;
  padding: 2px 6px;
}

.reader-toolbar {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.reader-toolbar > a,
.reader-toolbar > button {
  align-items: center;
  border: 0;
  border-radius: 4px;
  display: inline-flex;
  font-family: var(--reader-ui);
  font-size: 14px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  text-decoration: none;
}

.reader-font-icon {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1;
}

.reader-action,
[data-reader-action] {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--reader-ink);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--reader-ui);
  font-size: 14px;
  gap: 7px;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  text-decoration: none;
}

.reader-action:hover,
[data-reader-action]:hover {
  background: var(--reader-soft);
}

button.reader-search-trigger {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule);
}

.reader-topbar > button.reader-search-trigger {
  border-color: var(--reader-rule-strong);
}

.reader-icon,
[data-reader-icon] {
  display: inline-block;
  flex: 0 0 auto;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.reader-mobile-actions {
  display: none;
}

.reader-shell,
.pagegrid {
  display: grid;
  grid-template-columns: minmax(220px, 252px) minmax(0, 1fr) minmax(150px, 180px);
  justify-content: stretch;
  margin: 0 auto;
  max-width: none;
  min-height: calc(100vh - var(--reader-header-height));
  width: 100%;
}

#reader-toc {
  align-self: start;
  border-right: 1px solid var(--reader-rule);
  font-family: var(--reader-ui);
  font-size: 14px;
  min-height: calc(100vh - var(--reader-header-height));
  padding: 18px 12px 36px max(20px, env(safe-area-inset-left));
  position: sticky;
  top: var(--reader-header-height);
}

.reader-toc__header,
.reader-drawer__header {
  align-items: center;
  display: flex;
  font-weight: 650;
  justify-content: space-between;
  min-height: 44px;
}

#reader-toc .reader-toc__search {
  display: none;
}

.reader-toc__subject {
  border-top: 1px solid var(--reader-rule);
  margin-top: 8px;
  padding-top: 8px;
}

.reader-toc__subject > summary {
  font-size: 14px;
  font-weight: 700;
}

.reader-toc__subject > h2 {
  font-size: 14px;
  margin: 0;
  min-height: 44px;
  padding: 10px;
}

.reader-toc__subject:first-of-type {
  border-top: 0;
}

.reader-toc__subject > summary,
.reader-toc__lecture > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 650;
  list-style: none;
  min-height: 44px;
  padding: 6px 10px;
}

.reader-toc__subject > summary::after,
.reader-toc__lecture > summary::after {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  content: "";
  height: 6px;
  margin-left: auto;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease-out;
  width: 6px;
}

.reader-toc__subject:not([open]) > summary::after,
.reader-toc__lecture:not([open]) > summary::after {
  transform: rotate(-45deg);
}

.reader-toc__subject > summary::-webkit-details-marker,
.reader-toc__lecture > summary::-webkit-details-marker {
  display: none;
}

.reader-toc__lecture > summary {
  font-size: 13px;
  font-weight: 600;
}

.reader-toc__lecture ol .reader-toc__link {
  display: grid;
  gap: 8px;
  grid-template-columns: 2.8em minmax(0, 1fr);
  padding-left: 12px;
}

.reader-toc__index {
  color: var(--reader-muted);
  font-variant-numeric: tabular-nums;
}

.reader-toc__link[aria-current="page"] .reader-toc__index {
  color: inherit;
}

.reader-toc__list,
#reader-toc ol,
#reader-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reader-toc__link,
#reader-toc a {
  border-radius: 3px;
  display: block;
  line-height: 1.45;
  margin: 1px 0;
  min-height: 38px;
  padding: 8px 10px 8px 18px;
  text-decoration: none;
}

.reader-toc__link:hover,
#reader-toc a:hover {
  background: var(--reader-soft);
}

.reader-toc__link[aria-current="page"],
#reader-toc a[aria-current="page"] {
  background: var(--reader-inverse);
  color: var(--reader-inverse-ink);
  font-weight: 650;
}

.reader-offline-panel {
  align-items: flex-start;
  border-top: 1px solid var(--reader-rule);
  display: flex;
  font-size: 12px;
  gap: 10px;
  margin-top: 22px;
  padding: 18px 10px 0;
}

.reader-offline-panel strong {
  display: block;
  font-size: 13px;
}

.reader-offline-panel > svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.reader-offline-panel p {
  color: var(--reader-muted);
  line-height: 1.5;
  margin: 2px 0 10px;
}

.reader-offline-panel button {
  border: 1px solid var(--reader-rule-strong);
  border-radius: 4px;
  min-height: 36px;
  padding: 5px 10px;
}

.reader-content {
  min-width: 0;
}

#reader-main,
.bodycontainer {
  max-width: none;
  min-width: 0;
  padding: 26px var(--reader-gutter) 60px;
  width: 100%;
}

#reader-main {
  margin-inline: auto;
  max-width: calc(var(--reader-content-width) + 2 * var(--reader-gutter));
}

.textbody {
  max-width: none;
}

.reader-breadcrumbs {
  color: var(--reader-muted);
  font-family: var(--reader-ui);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.reader-breadcrumbs a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.reader-page-header {
  text-align: left;
}

.reader-page-header h1 {
  font-size: clamp(1.75rem, 2.2vw, 2rem);
  text-align: left;
  text-wrap: balance;
}

.reader-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.reader-breadcrumbs li + li::before {
  color: var(--reader-faint);
  content: "/";
  margin-right: 6px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--reader-ink);
  font-family: var(--reader-ui);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  scroll-margin-top: calc(var(--reader-header-height) + 22px);
}

h1 {
  border: 0;
  font-size: clamp(1.85rem, 3.2vw, 2.3rem);
  margin: 0 0 20px;
  padding: 0;
}

h2 {
  border: 0;
  font-size: 1.45rem;
  margin: 2.5em 0 0.75em;
  padding: 0;
}

h3 {
  font-size: 1.17rem;
  margin: 2em 0 0.7em;
}

h4,
h5,
h6 {
  font-size: 1rem;
  margin: 1.8em 0 0.65em;
}

p {
  margin: 0.68em 0;
}

ul,
ol {
  padding-left: 1.55em;
}

li + li {
  margin-top: 0.28em;
}

.reader-progress-row {
  align-items: center;
  color: var(--reader-muted);
  display: grid;
  font-family: var(--reader-ui);
  font-size: 12px;
  gap: 14px;
  grid-template-columns: max-content minmax(100px, 275px);
  justify-content: start;
  margin: 0 0 24px;
}

.reader-progress-row--mobile {
  display: none;
}

.reader-progress-row strong {
  color: var(--reader-ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

[data-reader-progress],
.reader-progress {
  appearance: none;
  background: var(--reader-rule);
  border: 0;
  border-radius: 999px;
  display: block;
  height: 5px;
  overflow: hidden;
  width: 100%;
}

progress[data-reader-progress]::-webkit-progress-bar {
  background: var(--reader-rule);
}

progress[data-reader-progress]::-webkit-progress-value,
progress[data-reader-progress]::-moz-progress-bar,
[data-reader-progress]::before {
  background: var(--reader-ink);
  border-radius: inherit;
}

[data-reader-progress]:not(progress)::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--reader-progress, 0%);
}

.problem-meta {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule);
  border-radius: var(--reader-radius);
  color: var(--reader-ink);
  font-family: var(--reader-ui);
  font-size: 14px;
  line-height: 1.65;
  margin: 0.75rem 0 1.6rem;
  padding: 16px 18px;
}

.reader-featured-meta .problem-meta {
  margin: 0 0 22px;
}

.reader-page-header > .reader-page-meta {
  background: transparent;
  border: 0;
  color: var(--reader-muted);
  font-family: var(--reader-ui);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 9px;
  padding: 0;
}

.reader-page-meta dl {
  display: grid;
  gap: 10px 22px;
  grid-template-columns: auto 1fr auto 1fr;
  margin: 0;
}

.reader-page-meta dt {
  color: var(--reader-muted);
}

.reader-page-meta dd {
  margin: 0;
}

.reader-anchor-nav {
  border-bottom: 1px solid var(--reader-rule);
  display: flex;
  font-family: var(--reader-ui);
  gap: 12px;
  margin: 0 0 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.reader-anchor-nav::-webkit-scrollbar {
  display: none;
}

.reader-anchor-nav a {
  border-bottom: 2px solid transparent;
  flex: 0 0 auto;
  font-size: 14px;
  min-height: 44px;
  padding: 12px 14px 9px;
  text-decoration: none;
}

.reader-anchor-nav a:hover,
.reader-anchor-nav a[aria-current="location"] {
  border-bottom-color: var(--reader-ink);
}

.math1-block-title {
  color: var(--reader-ink);
  font-family: var(--reader-ui);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 0.65rem;
}

.problem-box,
.solution-box,
.knowledge-box,
.mistake-box {
  border: 0;
  border-top: 1px solid var(--reader-rule);
  margin: 2rem 0;
  padding: 1.35rem 0 0;
}

.problem-box:first-child,
.reader-anchor-nav + .problem-box {
  border-top: 0;
}

#problem.problem-box {
  border-top: 0;
  margin-top: 1rem;
}

#problem.problem-box > .math1-block-title:first-child {
  display: none;
}

.problem-title,
.solution-title,
.knowledge-title,
.mistake-title {
  color: var(--reader-ink);
}

table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

th,
td {
  border-bottom: 1px solid var(--reader-rule);
  padding: 0.45rem 0.65rem;
  vertical-align: top;
}

code,
pre {
  background: var(--reader-soft);
  border-radius: 4px;
  font-family: var(--reader-mono);
}

code {
  padding: 0.08em 0.28em;
}

pre {
  overflow-x: auto;
  padding: 0.9rem;
}

.MathJax,
mjx-container {
  color: var(--reader-ink);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

mjx-container[display="true"] {
  margin: 1.15rem 0 !important;
  padding: 0.12rem 0;
}

#reader-outline {
  align-self: start;
  border-left: 1px solid var(--reader-rule);
  font-family: var(--reader-ui);
  font-size: 13px;
  min-height: calc(100vh - var(--reader-header-height));
  padding: 26px max(18px, env(safe-area-inset-right)) 30px 16px;
  position: sticky;
  top: var(--reader-header-height);
}

#reader-outline h2 {
  font-size: 13px;
  margin: 0 0 14px;
}

#reader-outline ol,
#reader-outline ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#reader-outline a {
  border-left: 0;
  color: var(--reader-muted);
  display: block;
  line-height: 1.45;
  padding: 8px 8px 8px 10px;
  text-decoration: none;
}

#reader-outline a::before {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  top: 15px;
  width: 6px;
}

#reader-outline li {
  position: relative;
}

#reader-outline a:hover,
#reader-outline a[aria-current="location"] {
  color: var(--reader-ink);
}

#reader-outline a[aria-current="location"]::before {
  background: var(--reader-ink);
}

.reader-page-nav {
  border: 1px solid var(--reader-rule);
  border-radius: var(--reader-radius);
  display: grid;
  font-family: var(--reader-ui);
  grid-template-columns: 1fr auto 1fr;
  margin: 3rem 0 0;
}

.reader-page-nav a,
.reader-page-nav__current {
  align-items: center;
  display: flex;
  font-size: 13px;
  min-height: 72px;
  padding: 12px 16px;
  text-decoration: none;
}

.reader-page-nav > a:nth-child(2) {
  border-left: 1px solid var(--reader-rule);
  border-right: 1px solid var(--reader-rule);
  justify-content: center;
  min-width: 150px;
  text-align: center;
}

.reader-page-nav a:last-child {
  justify-content: flex-end;
  text-align: right;
}

.reader-page-nav__current {
  border-left: 1px solid var(--reader-rule);
  border-right: 1px solid var(--reader-rule);
  justify-content: center;
  min-width: 190px;
  text-align: center;
}

.reader-page-nav a:hover {
  background: var(--reader-soft);
}

.reader-home {
  padding-top: 34px;
}

.reader-home__subject {
  border-top: 1px solid var(--reader-rule);
  margin-top: 36px;
  padding-top: 8px;
}

.reader-home-search,
.reader-continue,
.reader-index-links a,
.reader-download-link {
  align-items: center;
  border: 1px solid var(--reader-rule);
  border-radius: 4px;
  display: inline-flex;
  font-family: var(--reader-ui);
  font-size: 14px;
  min-height: 44px;
  padding: 8px 13px;
  text-decoration: none;
}

.reader-home-search {
  background: var(--reader-inverse);
  color: var(--reader-inverse-ink);
  cursor: pointer;
}

.reader-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.reader-home__lecture {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(130px, 0.35fr) 1fr;
  padding: 14px 0;
}

.reader-home__lecture + .reader-home__lecture {
  border-top: 1px solid var(--reader-rule);
}

.reader-home__pages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reader-home__pages a {
  display: block;
  min-height: 44px;
  padding: 8px 0;
}

.reader-continue[hidden] {
  display: none;
}

:is(.reader-dialog, #reader-search, #reader-preferences) {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule-strong);
  border-radius: 8px;
  color: var(--reader-ink);
  font-family: var(--reader-ui);
  margin: 8vh auto;
  max-height: 82vh;
  max-width: min(720px, calc(100vw - 32px));
  padding: 0;
  width: 100%;
}

:is(.reader-dialog, #reader-search, #reader-preferences)::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

:is(.reader-dialog, #reader-search, #reader-preferences):not([open]):not(.is-open) {
  display: none;
}

.reader-dialog__header {
  align-items: center;
  border-bottom: 1px solid var(--reader-rule);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 62px;
  padding: 8px 14px 8px 20px;
}

.reader-dialog__header h2 {
  font-size: 17px;
  margin: 0;
}

.reader-dialog__body {
  max-height: calc(82vh - 63px);
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.reader-search-field {
  align-items: center;
  border: 1px solid var(--reader-rule-strong);
  border-radius: 5px;
  display: flex;
  gap: 10px;
  padding: 0 12px;
}

[data-reader-search-input] {
  background: transparent;
  border: 1px solid var(--reader-rule-strong);
  border-radius: 5px;
  font-size: 16px;
  height: 48px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

#reader-search label {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

[data-reader-search-status] {
  color: var(--reader-muted);
  font-size: 12px;
  min-height: 28px;
  padding: 7px 0 3px;
}

[data-reader-search-results] {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reader-search-result {
  border-top: 1px solid var(--reader-rule);
}

.reader-search-result a {
  display: block;
  min-height: 66px;
  padding: 12px 4px;
  text-decoration: none;
}

.reader-search-result a:hover {
  background: var(--reader-soft);
}

.reader-search-result__title {
  display: block;
  font-weight: 650;
}

.reader-search-result__meta,
.reader-search-result__excerpt {
  color: var(--reader-muted);
  display: block;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 3px;
}

mark {
  background: transparent;
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.reader-preference-group {
  border: 0;
  border-top: 1px solid var(--reader-rule);
  margin: 0;
  padding: 18px 0;
}

#reader-preferences fieldset {
  border: 0;
  border-top: 1px solid var(--reader-rule);
  margin: 0;
  padding: 18px 0;
}

#reader-preferences fieldset:first-child {
  border-top: 0;
}

#reader-preferences legend {
  font-size: 14px;
  font-weight: 650;
  padding: 0 0 8px;
}

#reader-preferences fieldset button {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule);
  cursor: pointer;
  min-height: 44px;
  padding: 8px 12px;
}

#reader-preferences fieldset button[aria-pressed="true"] {
  background: var(--reader-inverse);
  color: var(--reader-inverse-ink);
}

.reader-preference-group:first-child {
  border-top: 0;
}

.reader-preference-group legend {
  font-size: 14px;
  font-weight: 650;
  padding: 0 0 8px;
}

.reader-segmented {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
}

.reader-segmented button {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule);
  cursor: pointer;
  min-height: 44px;
  padding: 8px;
}

.reader-segmented button[aria-pressed="true"] {
  background: var(--reader-inverse);
  color: var(--reader-inverse-ink);
}

.reader-backdrop {
  background: rgba(0, 0, 0, 0.36);
  display: none;
  inset: 0;
  position: fixed;
  z-index: 78;
}

.reader-backdrop.is-open {
  display: block;
}

.reader-pwa-status {
  background: var(--reader-inverse);
  border-radius: 4px;
  bottom: max(12px, env(safe-area-inset-bottom));
  color: var(--reader-inverse-ink);
  font-family: var(--reader-ui);
  font-size: 11px;
  margin: 0;
  padding: 5px 8px;
  pointer-events: none;
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  z-index: 65;
}

.reader-update {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule-strong);
  bottom: max(16px, env(safe-area-inset-bottom));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  font-family: var(--reader-ui);
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 12px 14px;
  position: fixed;
  transform: translateX(-50%);
  width: 340px;
  z-index: 95;
}

.reader-update[hidden] {
  display: none;
}

.reader-update p {
  margin: 0 0 8px;
}

.reader-update button {
  background: var(--reader-surface);
  border: 1px solid var(--reader-rule);
  min-height: 40px;
  padding: 6px 10px;
}

.topnavigation,
.botnavigation {
  display: none;
}

.sidetoccontainer:not(#reader-toc) {
  display: none;
}

body.reader-modal-open,
body.reader-drawer-open {
  overflow: hidden;
}

@media (max-width: 1199px) {
  .reader-topbar {
    grid-template-columns: 230px minmax(250px, 300px) 1fr;
  }

  .reader-shell {
    grid-template-columns: minmax(220px, 252px) minmax(0, 1fr);
  }

  .pagegrid {
    grid-template-columns: minmax(220px, 252px) minmax(0, var(--reader-content-width));
  }

  #reader-outline {
    display: none;
  }
}

@media (max-width: 799px) {
  :root {
    --reader-header-height: 58px;
    --reader-gutter: 16px;
  }

  .reader-topbar {
    gap: 8px;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    height: calc(var(--reader-header-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  }

  .reader-brand {
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reader-topbar > .reader-search-trigger span,
  .reader-topbar > .reader-search-trigger kbd,
  .reader-toolbar .reader-action__label,
  .reader-toolbar > :not([data-reader-action="open-preferences"]) {
    display: none;
  }

  .reader-topbar > .reader-search-trigger {
    border: 0;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    width: 44px;
  }

  #reader-toc .reader-toc__search {
    display: flex;
    justify-content: flex-start;
    margin: 8px 0 14px;
    min-height: 44px;
    padding: 0 12px;
    width: 100%;
  }

  .reader-toolbar {
    gap: 0;
  }

  .reader-toolbar > .reader-preference-font {
    display: none;
  }

  .reader-mobile-actions {
    display: flex;
  }

  .reader-shell,
  .pagegrid {
    display: block;
    min-height: 0;
  }

  #reader-toc {
    background: var(--reader-surface);
    border: 0;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
    display: block;
    height: 100dvh;
    left: 0;
    max-width: min(92vw, 380px);
    min-height: 0;
    overflow-y: auto;
    padding: max(10px, env(safe-area-inset-top)) 12px max(22px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease-out;
    width: 100%;
    z-index: 80;
  }

  #reader-toc.is-open {
    transform: translateX(0);
  }

  #reader-main,
  .bodycontainer {
    padding: 22px var(--reader-gutter) calc(42px + env(safe-area-inset-bottom));
  }

  .reader-breadcrumbs {
    font-size: 12px;
    margin-bottom: 18px;
  }

  h1 {
    font-size: 1.68rem;
    margin-bottom: 16px;
  }

  .reader-page-header h1 {
    font-size: 1.68rem;
  }

  h2 {
    font-size: 1.28rem;
  }

  h3 {
    font-size: 1.08rem;
  }

  .reader-progress-row--desktop {
    display: none;
  }

  .reader-progress-row--mobile {
    background: var(--reader-bg);
    border-bottom: 1px solid var(--reader-rule);
    display: block;
    margin: 0;
    padding: 10px max(16px, env(safe-area-inset-right)) 11px max(16px, env(safe-area-inset-left));
  }

  .reader-progress-row > :first-child {
    display: block;
    margin-bottom: 6px;
  }

  .reader-page-meta dl {
    grid-template-columns: auto 1fr;
  }

  .reader-anchor-nav {
    margin-left: calc(-1 * var(--reader-gutter));
    margin-right: calc(-1 * var(--reader-gutter));
    padding: 0 var(--reader-gutter);
  }

  .problem-box,
  .solution-box,
  .knowledge-box,
  .mistake-box {
    margin: 1.65rem 0;
  }

  .reader-page-nav {
    grid-template-columns: 1fr auto 1fr;
    margin-left: calc(-1 * var(--reader-gutter));
    margin-right: calc(-1 * var(--reader-gutter));
  }

  .reader-page-nav a,
  .reader-page-nav__current {
    font-size: 11px;
    min-height: 68px;
    padding: 9px 10px;
  }

  .reader-page-nav__current {
    min-width: 96px;
  }

  .reader-home__lecture {
    display: block;
  }

  :is(.reader-dialog, #reader-search, #reader-preferences) {
    border: 0;
    border-radius: 0;
    height: 100dvh;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    width: 100vw;
  }

  .reader-dialog__body {
    max-height: calc(100dvh - 63px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 14px 16px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --reader-bg: #ffffff;
    --reader-ink: #000000;
    --reader-muted: #333333;
  }

  body {
    color: #000000;
    font-size: 11pt;
  }

  .reader-topbar,
  #reader-toc,
  #reader-outline,
  .reader-anchor-nav,
  .reader-progress-row,
  .reader-page-nav,
  .reader-backdrop,
  .reader-dialog,
  #reader-search,
  #reader-preferences,
  .reader-offline-panel,
  .reader-pwa-notice {
    display: none !important;
  }

  .reader-shell,
  .pagegrid {
    display: block;
  }

  #reader-main,
  .bodycontainer {
    margin: 0 auto;
    max-width: 720px;
    padding: 0;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  .problem-box,
  .solution-box,
  .knowledge-box,
  .mistake-box,
  mjx-container {
    break-inside: avoid;
  }
}
