/*
  CSS stylesheet for the LaTeX Lwarp package
  Copyright 2016-2022 Brian Dunn — BD Tech Concepts LLC
*/

/* 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: "Bembo", "Linux Libertine O", "Hoefler Text", "Garamond",
		"Janson", "TeX Gyre Pagella", "Palatino",
		"Liberation Serif", "Nimbus Roman No 9 L",  "FreeSerif", Times,
		"Times New Roman", serif;
    background: #FAF7F4 ;
    color: black ;
    margin:0em ;
    padding:0em ;
    font-size: 100% ;
    line-height: 1.2 ;
	padding-top: 8em;
}

p {margin: 1.5ex 0em 1.5ex 0em ;}
table p {margin: .5ex 0em .5ex 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: 110% ;
}

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 ;
}

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%
}

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 ;
}

/* 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 ;
}

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 ;}
div.epigraphsource p, div.dictumauthor p { padding: .5ex 0ex 0ex 0ex ; margin: 0ex ;}
div.dictumauthor { font-style:italic }

/* copyrightbox package: */
div.copyrightbox { margin: .5ex .5em }
div.copyrightbox p {margin: 0px .5em ; padding: 0px}
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 ; }

main.bodycontainer {
    /* float: left ; */
    width: 640px;
	margin-left: auto ;
	margin-right: auto ;
}

div.bodywithoutsidetoc main.bodycontainer {
    float: none ;
    /* width: 100% ; */
}

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 ; }

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 {
    font-size:.85em ;
    margin: 3ex 0pt 3ex 0pt
}

.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 ;}

.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}

.fbox { border-color: var(--fg) !important; color: var(--fg) !important; }

.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 ; }

.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 }

/* 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;
}

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-top: 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 ;
}

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% ; }

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 ; }
td.tdm p , td.tmbrule p , td.tdM p , td.tdMrule p { padding-top: 1ex ;
    padding-bottom: 1ex ; margin: 0ex ; }
td.tdb p , td.tdbrule p , td.tdB p , td.tdBrule p { padding-top: 1ex ;
    padding-bottom: 1ex ; margin: 0ex ; }

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;}

.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 {
    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 ; }

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 ;
}

nav.topnavigation{
    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{
    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 {
    line-height: 1.2 ;
    font-size: 1em ;
    border-bottom: 1px solid silver ;
    margin: 0px ;
    padding: 2ex 1em 2ex 1em ;
    text-align:left ;
}

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

/* 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 ;
}

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

div.sidetoccontents {
    overflow-y: auto ;
    width: 100% ;
    text-align: left ;
}

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 ; }

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}

/* 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 ;
}

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.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 {
    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.sidetoccontainer { display:none; }
    nav.topnavigation { display:block }
    nav.botnavigation { display:block }
    main.bodycontainer { width: 100% }
}

@media projection {
    div.sidetoccontainer { display:none; }
    nav.topnavigation { display:block }
    nav.botnavigation { display:block }
    main.bodycontainer { width: 100% }
}


/*
  CSS stylesheet for the LaTeX Lwarp package
  Auto light/dark mode via prefers-color-scheme
  (No manual toggle required.)
*/

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

/* ------------------------------------------------------------
   Theme tokens (LIGHT defaults)
   ------------------------------------------------------------ */
:root {
  color-scheme: light dark;

  /* Core surfaces */
  --bg: #FAF7F4;
  --fg: #000000;
  --muted-fg: #304070;

  /* Links */
  --link: #000080;
  --visited: #800000;

  /* Rules / borders */
  --rule: silver;
  --rule-strong: #808080;
  --rule-mid: #A0A0A0;
  --frame: #000000;

  /* Code / callouts */
  --callout-bg: #000000;
  --callout-fg: #ffffff;

  /* Highlight */
  --highlight: #F8E800;

  /* Shadows */
  --shadow: #808080;

  /* Images */
  --img-border: silver;
}

/* ------------------------------------------------------------
   Theme tokens (DARK overrides)
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e6e8ee;
    --muted-fg: #a9b4d6;

    --link: #8fb3ff;
    --visited: #d6a2a2;

    --rule: #2a2f3a;
    --rule-strong: #3a4150;
    --rule-mid: #3a4150;
    --frame: #c9cdd8;

    --callout-bg: #e6e8ee;
    --callout-fg: #0f1115;

    --highlight: #6b5d00;

    --shadow: rgba(0,0,0,0.65);

    --img-border: #2a2f3a;
  }

  /* Optional: make bitmap images less glaring in dark mode.
     Remove if you dislike this effect. */
  /* img.hyperimage, img.borderimage, img.logoimage { */
  /*   filter: brightness(0.92) contrast(1.05); */
  /* } */
}

/* ------------------------------------------------------------
   Global element colors (now tokenized)
   ------------------------------------------------------------ */

A:link { color: var(--link); text-decoration: none; }
A:visited { color: var(--visited); }
A:hover { color: var(--link); text-decoration: underline; }
A:active { color: var(--visited); }

body {
  font-family: "Bembo", "Linux Libertine O", "Hoefler Text", "Garamond",
    "Janson", "TeX Gyre Pagella", "Palatino",
    "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
    "Times New Roman", serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0em;
  padding: 0em;
  font-size: 100%;
  line-height: 1.2;
  padding-top: 8em;
}

/* Keep everything else from your existing lwarp.css,
   but replace hard-coded colors with tokens as below. */

/* ------------------------------------------------------------
   REQUIRED substitutions for your existing rules
   (copy/paste these replacements into the matching sections)
   ------------------------------------------------------------ */

/* div.hrule { border-top: 1px solid silver } */
div.hrule { border-top: 1px solid var(--rule); }

/* div.epigraphsource, div.dictumauthor { border-top: 1px solid #A0A0A0 ; } */
div.epigraphsource, div.dictumauthor { border-top: 1px solid var(--rule-mid); }

/* span.highlight { background: #F8E800 ; } */
span.highlight { background: var(--highlight); }

/* .footnotes { border-top: 1px solid silver ; } */
.footnotes { border-top: 1px solid var(--rule); }

/* .marginpar, .marginparblock { border-top/bottom: 1px solid silver ; } */
.marginpar, .marginparblock {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* section.textbody div.footnotes { border-bottom: 2px solid silver ; } */
section.textbody div.footnotes { border-bottom: 2px solid var(--rule); }

/* .footnoteheader { border-top: 2px solid silver ; } */
.footnoteheader { border-top: 2px solid var(--rule); }

/* .mpfootnotes { border-top: 1px solid silver ; } */
.mpfootnotes { border-top: 1px solid var(--rule); }

/* section.textbody>pre.programlisting { border-top/bottom: 1px solid silver ; } */
section.textbody>pre.programlisting {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* div.abstract dt {color:#304070;} */
div.abstract dt { color: var(--muted-fg); }

/* img, img.hyperimage, img.borderimage { border: 1px solid silver; box-shadow: 3px 3px 3px #808080 ; } */
img, img.hyperimage, img.borderimage {
  /* border: 1px solid var(--img-border); */
  /* box-shadow: 3px 3px 3px var(--shadow); */
}

/* img.logoimage { box-shadow: 3px 3px 3px #808080 ; border: 1px solid black ; } */
img.logoimage {
  box-shadow: 3px 3px 3px var(--shadow);
  border: 1px solid var(--frame);
}

/* figure.boxed, figure.boxruled { border: 1px solid black ; } */
figure.boxed, figure.boxruled { border: 1px solid var(--frame); }

/* figure.ruled { border-top/bottom: 1px solid black ; } */
figure.ruled {
  border-top: 1px solid var(--frame);
  border-bottom: 1px solid var(--frame);
}

/* figure.ruled div.figurecaption ... { border-top/bottom: 1px solid silver ; } */
figure.ruled div.figurecaption, figure.boxruled div.figurecaption {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* table > tbody > tr.hline > td {border-top: 1px solid #808080 ; } */
table > tbody > tr.hline > td { border-top: 1px solid var(--rule-strong); }

/* tr.tbrule td {border-top: 1px solid black ; } */
tr.tbrule td { border-top: 1px solid var(--frame); }

/* table td.tvertbarl / r etc use black */
table td.tvertbarl { border-left: 1px solid var(--frame); }
table td.tvertbarldouble { border-left: 4px double var(--frame); }
table td.tvertbarr { border-right: 1px solid var(--frame); }
table td.tvertbarrdouble { border-right: 4px double var(--frame); }

table td.tvertbarldash { border-left: 1px dashed var(--frame); }
table td.tvertbarldoubledash { border-left: 2px dashed var(--frame); }
table td.tvertbarrdash { border-right: 1px dashed var(--frame); }
table td.tvertbarrdoubledash { border-right: 2px dashed var(--frame); }

/* for cmidrules: border-top: 1px solid #A0A0A0 ; */
table td.tdrule,
table td.tdrulel,
table td.tdruler,
table td.tdrulelr {
  border-top: 1px solid var(--rule-mid);
}

/* mdframed / tcolorbox etc: border: 1px solid black ; */
.mdframed, .tcolorbox, .shadebox { border: 1px solid var(--frame); }

/* mdframedtitle, .tcolorboxtitle { border-bottom: 1px solid silver ; } */
.mdframedtitle, .tcolorboxtitle { border-bottom: 1px solid var(--rule); }

/* framed package borders */
.framed, pre.boxedverbatim, fcolorbox { border: 1px solid var(--frame); }
.framedleftbar { border-left: 3pt solid var(--frame); }

/* niceframe/generalframe borders */
div.niceframe { border: 6px groove var(--frame); }
div.curlyframe { border-left: 3px dotted var(--frame); border-right: 3px dotted var(--frame); }
div.artdecoframe { border-left: 10px double var(--frame); border-right: 10px double var(--frame); }
div.generalframe { border: 6px groove var(--frame); }

/* beamerframe */
div.beamerframe { border: 1px solid var(--rule-strong); }

/* notes package borders */
div.notesimportantnote, div.noteswarningnote, div.notesinformationnote { border: 1px solid var(--rule); }

/* notes icon background gold -> keep, but readable in dark */
div.notesicon {
  background: #caa400; /* darker gold */
  color: #000;
}

/* alg2e borders */
div.alg2evline, div.alg2evsline { border-left: 1px solid var(--frame); }

/* span.alg2elinenumber { color: red ; } */
span.alg2elinenumber { color: #d14b4b; }

/* program listing callouts */
span.callout {
  background-color: var(--callout-bg);
  color: var(--callout-fg);
}

/* header/footer/nav borders */
nav.topnavigation{
  border-bottom: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
nav.botnavigation{
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
header { border-bottom: 1px solid var(--rule); }
footer { border-top: 1px solid var(--rule); }

/* sidetoc container background and borders */
div.sidetoccontainer {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

/* sidetoc title border */
div.sidetoctitle { border-bottom: 1px solid var(--rule); }

/* sidetoc links */
nav.sidetoc p a { color: var(--fg); }

/* shadowbox / box shadow colors */
.shadowbox, .shabox { box-shadow: 3px 3px 3px var(--shadow); border: 1px solid var(--frame); }
.doublebox { border: 3px double var(--frame); }
.ovalbox, .Ovalbox { border: 1px solid var(--frame); }
.framebox { border: 1px solid var(--frame); }

/* thmbox borders */
.thmbox { border: 1px solid var(--rule-strong); }
.thmboxtitle { border-bottom: 1px solid var(--rule-strong); }

/* ------------------------------------------------------------
   END theme layer and substitutions
   ------------------------------------------------------------ */


@media (prefers-color-scheme: dark) {
  img:not(.noinvert) {
    filter: invert(1) hue-rotate(0deg) !important;
  }
  video:not(.noinvert) {
    filter: invert(1) hue-rotate(0deg) !important;
  }
}


.site-favicon-link{
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 1000;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 2.25rem;   /* click target */
  height: 2.25rem;  /* click target */
  border-radius: 1.125rem;

  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
}

.site-favicon-link:hover{
  background: var(--hover);
  border-color: var(--border);
}

.site-favicon-link:focus-visible{
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  background: var(--hover);
  border-color: var(--border);
}

.site-favicon-img{
  width: 2.0rem;   /* icon size */
  height: 2.0rem;
  display: block;
  image-rendering: auto;
}

/* =========================
   Structured Vacuum Side TOC
   ========================= */

:root{
  --sv-toc-width: 290px;
  --sv-toc-gap: 18px;
  --sv-toc-z: 9999;
  --sv-toc-border: rgba(0,0,0,0.12);
  --sv-toc-bg: rgba(255,255,255,0.96);
  --sv-toc-shadow: 0 10px 30px rgba(0,0,0,0.18);
  --sv-toc-radius: 10px;
  --sv-toc-top: 10px;
  --sv-toc-bottom: 10px;
  --sv-toc-pad: 10px;
  --sv-toc-font: 0.95em;
}

/* Desktop: reserve space so content isn't covered */
@media (min-width: 980px){
  .bodywithoutsidetoc{
    /* margin-left: calc(var(--sv-toc-width) + var(--sv-toc-gap)); */
  }
}

.sv-toc-item {
  font-family: "Bembo", "Linux Libertine O", "Hoefler Text", "Garamond",
    "Janson", "TeX Gyre Pagella", "Palatino",
    "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
    "Times New Roman", serif;
}

/* Toggle button (mobile hamburger) */
#sv-toc-toggle{
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: calc(var(--sv-toc-z) + 2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule-mid);
  border-radius: 999px;
  background: var(--callout-fg);
  box-shadow: var(--shadow);
  color: var(--callout-bg);
  font-family: "Bembo", "Linux Libertine O", "Hoefler Text", "Garamond",
    "Janson", "TeX Gyre Pagella", "Palatino",
    "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times,
    "Times New Roman", serif;
  cursor: pointer;
}

#sv-toc-toggle:focus{
  outline: 2px solid rgba(0,0,0,0.35);
  outline-offset: 2px;
}

#sv-toc-toggle:hover{
  background: var(--callout-bg);
  border-color: var(--border);
  color: var(--callout-fg);
}

#sv-toc-toggle .sv-toc-icon{
  font-size: 1.1em;
  line-height: 1;
}

#sv-toc-toggle .sv-toc-label{
  /* font-size: 0.95em; */
}

/* Backdrop (mobile) */
#sv-toc-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: var(--sv-toc-z);
  display: none;
}

/* The sidebar itself */
#sv-sidetoc{
  position: fixed;
  top: var(--sv-toc-top);
  bottom: var(--sv-toc-bottom);
  left: var(--sv-toc-gap);
  width: var(--sv-toc-width);
  z-index: calc(var(--sv-toc-z) + 1);
  border: 1px solid var(--sv-toc-border);
  border-radius: var(--sv-toc-radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: var(--sv-toc-font);
  float: left;
}

/* Header row inside the TOC */
#sv-sidetoc .sv-toc-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sv-toc-border);
}

#sv-sidetoc .sv-toc-title{
  font-weight: 600;
}

#sv-sidetoc .sv-toc-close{
  border: 1px solid var(--sv-toc-border);
  background: transparent;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 1.5em;
}

/* Scroll area */
#sv-sidetoc .sv-toc-nav{
  height: calc(100% - 44px);
  overflow: auto;
  padding: var(--sv-toc-pad);
}

/* List styling */
#sv-sidetoc ol{
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#sv-sidetoc li{
  margin: 0;
  padding: 0;
}

#sv-sidetoc .sv-toc-link{
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--link);
  line-height: 1.25;
}

#sv-sidetoc .sv-toc-link:hover{
  background: rgba(0,0,0,0.06);
}

#sv-sidetoc .sv-toc-link[aria-current="location"]{
  background: rgba(0,0,0,0.30);
  font-weight: 600;
}

/* Indentation for levels */
#sv-sidetoc .level-1 > li > .sv-toc-link{ padding-left: 8px; }
#sv-sidetoc .level-2{ padding-left: 14px; margin-top: 2px; }
#sv-sidetoc .level-3{ padding-left: 14px; margin-top: 2px; }
#sv-sidetoc .level-2 .sv-toc-link{ font-size: 0.95em; }
#sv-sidetoc .level-3 .sv-toc-link{ font-size: 0.92em; opacity: 0.95; }

/* Mobile: off-canvas by default, open via html.sv-toc-open */
@media (max-width: 99979px){
  #sv-sidetoc{
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 0;
    width: min(92vw, 340px);
    transform: translateX(-105%);
    transition: transform 160ms ease;
  }

  html.sv-toc-open #sv-sidetoc{
    transform: translateX(0);
  }

  html.sv-toc-open #sv-toc-backdrop{
    display: block;
  }
}

/* Desktop: TOC always visible; hide mobile controls */
@media (min-width: 99980px){
  #sv-toc-toggle{ display: none; }
  #sv-toc-backdrop{ display: none !important; }
  #sv-sidetoc{ transform: none !important; }
  #sv-sidetoc .sv-toc-close{ display: none; }
}

  :root{
    --page-max: 86ch;
    --ink: #111;
    --muted: #444;
    --bg: #fff;
    --panel: #f6f7f8;
    --border: #d9dde1;
    --link: #0b57d0;
  }
  @media (prefers-color-scheme: dark){
    :root{
      --ink: #eaeaea;
      --muted: #b9b9b9;
      --bg: #0f1115;
      --panel: #171a21;
      --border: #2a2f3a;
      --link: #7ab4ff;
    }
  }

  /* Keep it self-contained and resistant to existing Lwarp styles */
  .paper-hero-wrap{
    background: var(--bg);
    color: var(--ink);
	padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
  }
  .paper-hero{
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 1.1rem 1rem 1rem 1rem;
  }
  .paper-hero h2{
    margin: 0 0 .35rem 0;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: .1px;
  }
  .paper-hero .deck{
    margin: 0 0 .75rem 0;
    color: var(--muted);
    font-size: .98rem;
    line-height: 1.45;
  }
  .paper-hero .meta{
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    align-items: baseline;
    margin: 0 0 .75rem 0;
    font-size: .9rem;
    color: var(--muted);
	justify-content: center;
  }
  .paper-hero .meta a{ color: var(--link); text-decoration: none; }
  .paper-hero .meta a:hover{ text-decoration: underline; }

  .paper-hero .meta a small:hover{ text-decoration: none; }


/* Kill underline on the <a> itself, even on hover/focus */
a.dl,
a.dl:hover,
a.dl:focus,
a.dl:focus-visible {
  text-decoration: none !important;
}

/* Also kill underline on descendants (in case your CSS underlines children too) */
a.dl:hover *,
a.dl:focus-visible * {
  text-decoration: none !important;
}

/* Re-add underline only for the title */
a.dl:hover .dl-title,
a.dl:focus-visible .dl-title {
  text-decoration: underline !important;
}

/* Optional layout */
a.dl .dl-sub { display: block; }


  .hero-grid{
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: .85rem;
    align-items: start;
  }
  @media (max-width: 860px){
    .hero-grid{ grid-template-columns: 1fr; }
  }

  .key-points{
    margin: .65rem 0 0 0;
    padding: .7rem .85rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .key-points h3{
    margin: 0 0 .35rem 0;
    font-size: .95rem;
    letter-spacing: .2px;
  }
  .key-points ul{
    margin: 0;
    padding-left: 1.05rem;
    color: var(--ink);
    font-size: .92rem;
    line-height: 1.45;
  }

  .artifacts{
    margin: .65rem 0 0 0;
    padding: .7rem .85rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .artifacts h3{
    margin: 0 0 .45rem 0;
    font-size: .95rem;
    letter-spacing: .2px;
  }
  .artifact-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: .45rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .artifact-grid a{
    display: block;
    padding: .55rem .65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--link);
    text-decoration: none;
    line-height: 1.25;
  }
  .artifact-grid a:hover{ text-decoration: underline; }
  .artifact-grid small{
    display: block;
    margin-top: .15rem;
    color: var(--muted);
    font-size: .82rem;
    text-decoration: none;
  }

  details.cite{
    margin-top: .6rem;
  }
  details.cite summary{
    cursor: pointer;
    color: var(--link);
    font-size: .9rem;
  }
  details.cite pre{
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: .5rem 0 0 0;
    padding: .65rem .7rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font-size: .85rem;
    line-height: 1.35;
  }


/* If you have a sticky header, this prevents anchors from hiding under it */
:where(h1, h2, h3, h4, h5, h6) {
  scroll-margin-top: 6rem;
}

/* Heading link wrapper */
.heading-permalink {
  color: inherit;
  text-decoration: none;
  position: relative;
}

/* Subtle “this is interactive” cue on hover/focus */
:where(h1, h2, h3, h4, h5, h6):hover .heading-permalink,
.heading-permalink:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* The icon that appears on hover/focus */
.heading-permalink .permalink-icon {
  display: inline-block;
  margin-left: 0.5rem;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  font-size: 0.9em;
  vertical-align: baseline;
}

/* Show icon when the heading is hovered, or when link is keyboard-focused */
:where(h1, h2, h3, h4, h5, h6):hover .permalink-icon,
.heading-permalink:focus-visible .permalink-icon {
  opacity: 0.75;
  transform: translateX(0);
}

/* Optional: small tooltip on hover/focus */
.heading-permalink[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.35rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  white-space: nowrap;
  background: rgba(0,0,0,0.75);
  color: white;

  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

:where(h1, h2, h3, h4, h5, h6):hover .heading-permalink[data-tooltip]::after,
.heading-permalink:focus-visible[data-tooltip]::after {
  opacity: 1;
  transform: translateY(0);
}


/* ---------------------------
   Highlight-to-share: selection
--------------------------- */

::selection {
  background: rgba(255, 232, 120, 0.55);
  color: inherit;
}

@media (prefers-color-scheme: dark) {
  ::selection {
    background: rgba(255, 215, 90, 0.35);
  }
}

/* ---------------------------
   Highlight-to-share: popover
--------------------------- */

.hts-popover {
  position: fixed;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  border-radius: 0.85rem;
  /* background: rgba(18, 18, 18, 0.92); */
  /* color: rgba(255, 255, 255, 0.92); */
  background: var(--callout-fg);
  /* box-shadow: var(--shadow); */
  color: var(--callout-bg);
  box-shadow: 0 10px 30px var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule-mid);
  -webkit-backdrop-filter: blur(10px);
}

.hts-popover[data-theme="light"] {
  /* background: rgba(250, 250, 250, 0.96); */
  /* color: rgba(10, 10, 10, 0.92); */
  /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); */
  border: 1px solid var(--rule-mid);
  background: var(--callout-fg);
  box-shadow: var(--shadow);
  color: var(--callout-bg);
}

.hts-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.35rem 0.55rem;
  border-radius: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  line-height: 1;
  white-space: nowrap;
}

.hts-btn:hover {
  /* background: rgba(255, 255, 255, 0.10); */
  background: var(--callout-bg);
  color: var(--callout-fg);
}

.hts-popover[data-theme="light"] .hts-btn:hover {
  /* background: rgba(0, 0, 0, 0.06); */
  background: var(--callout-bg);
  color: var(--callout-fg);
}

.hts-btn:focus-visible {
  outline: 2px solid rgba(120, 180, 255, 0.8);
  outline-offset: 2px;
}

.hts-icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

.hts-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 0.1rem;
}

.hts-popover[data-theme="light"] .hts-sep {
  background: rgba(0, 0, 0, 0.12);
}

/* Small toast for “Copied” feedback */
.hts-toast {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  padding: 0.5rem 0.7rem;
  border-radius: 0.75rem;
  background: rgba(18, 18, 18, 0.92);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hts-toast[data-theme="light"] {
  background: rgba(250, 250, 250, 0.96);
  color: rgba(10, 10, 10, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}


/* Ensure MathJax output is selectable even if other site CSS is aggressive */
mjx-container,
mjx-container * {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* If you use "highlight to share" selection styling, keep MathJax readable */
mjx-container::selection,
mjx-container *::selection {
  background: rgba(255, 235, 59, 0.25);
}


.issue-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.92);
  color: rgba(0,0,0,0.88);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;

  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.issue-fab.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.issue-fab:hover {
  transform: translateY(-1px);
}

.issue-fab:focus-visible {
  outline: 2px solid rgba(0,0,0,0.6);
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  .issue-fab {
    background: rgba(20,20,20,0.78);
    border-color: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.92);
    box-shadow: 0 10px 30px rgba(0,0,0,0.40);
  }
  .issue-fab:focus-visible {
    outline-color: rgba(255,255,255,0.70);
  }
}


  /* ---- diff display modes ----
     clean mode: deletions hidden, insertions read normally
     diff mode: deletions red/strikethrough, insertions green/underlined
  */
  body[data-diff="off"] del.chg { display: none; }
  body[data-diff="off"] ins.chg {
    text-decoration: none;
    background: none;
  }

  body[data-diff="on"] ins.chg {
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    background: color-mix(in oklab, #22c55e 22%, transparent);
    text-decoration-color: color-mix(in oklab, #22c55e 50%, transparent);
    border-radius: 0.25rem;
    padding: 0 0.12em;
  }
  body[data-diff="on"] del.chg {
    text-decoration: line-through;
    text-decoration-thickness: 0.22em;
    background: color-mix(in oklab, #ef4444 18%, transparent);
    text-decoration-color: color-mix(in oklab, #ef4444 50%, transparent);
    border-radius: 0.25rem;
    padding: 0 0.12em;
  }

  /* note-only markers never display inline */
  .chg-note { display: none; }

  /* ---- changelog block ---- */
  details.changelog {
    margin-top: 0.4rem;
    /* border: 1px solid color-mix(in oklab, currentColor 18%, transparent); */
	color: var(--link);
    border: 1px solid var(--border);
    border-radius: 10px;
    /* border-radius: 0.8rem; */
    padding: 0.6rem 0.8rem;
    /* background: color-mix(in oklab, currentColor 4%, transparent); */
    background: var(--bg);
  }
  details.changelog > summary {
    cursor: pointer;
    /* font-weight: 600; */
    list-style: none;
  }
  details.changelog > summary::-webkit-details-marker { display: none; }
  details.changelog:hover > summary { text-decoration: underline; }

  .chg-tools {
    display: flex;
    gap: 0.6rem;
    margin: 0.7rem 0 0.4rem;
  }
  .chg-toggle {
    border: 1px solid color-mix(in oklab, currentColor 22%, transparent);
    background: color-mix(in oklab, currentColor 6%, transparent);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font: inherit;
    cursor: pointer;
  }

  .changelog-panel {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.4rem;
  }

  .chg-day {
    border-top: 1px solid color-mix(in oklab, currentColor 12%, transparent);
    padding-top: 0.6rem;
  }
  .chg-day:first-child { border-top: 0; padding-top: 0; }

  .chg-day h4 {
    margin: 0 0 0.45rem;
    font-size: 0.9rem;
font-family: "Bembo", "Linux Libertine O", "Hoefler Text", "Garamond", "Janson", "TeX Gyre Pagella", "Palatino", "Liberation Serif", "Nimbus Roman No 9 L", "FreeSerif", Times, "Times New Roman", serif;
    /* opacity: 0.9; */
font-weight: normal;
	color: var(--muted);
	font-style: italic;
  }

  .chg-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 0.75rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.65rem;
    background: color-mix(in oklab, currentColor 5%, transparent);
  }

  .chg-badge {
    align-self: start;
    font-size: 0.78rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid color-mix(in oklab, currentColor 18%, transparent);
    opacity: 0.95;
    white-space: nowrap;
  }
  .chg-badge.add { border-color: color-mix(in oklab, #22c55e 55%, transparent); background: color-mix(in oklab, #22c55e 18%, transparent); color: var(--fg);}
  .chg-badge.del { border-color: color-mix(in oklab, #ef4444 55%, transparent); background: color-mix(in oklab, #ef4444 18%, transparent); color: var(--fg);}
  .chg-badge.rep { border-color: color-mix(in oklab, #f59e0b 55%, transparent); background: color-mix(in oklab, #f59e0b 18%, transparent); color: var(--fg);}
  .chg-badge.note { border-color: color-mix(in oklab, #60a5fa 55%, transparent); background: color-mix(in oklab, #60a5fa 18%, transparent); color: var(--fg);}

  .chg-main { min-width: 0; }
  .chg-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
  }
  .chg-meta {
    margin: 0.15rem 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
  }
  .chg-meta a { text-decoration: none; }
  .chg-meta a:hover { text-decoration: underline; }

  /* highlight target on click */
  .chg-target-flash {
    outline: 2px solid color-mix(in oklab, #60a5fa 55%, transparent);
    outline-offset: 3px;
    border-radius: 0.5rem;
    transition: outline-color 600ms ease;
  }


/* ===========================
   Diff display modes
   Default: final/accepted text
   =========================== */

/* FINAL (accepted) view: hide deletions, show insertions as plain text */
html.diff-final :is(del, .diffdel, .DIFdel, .DIFdelbegin, .DIFdelend) {
  display: none !important;
}

html.diff-final :is(ins, .diffins, .DIFadd, .DIFaddbegin, .DIFaddend) {
  text-decoration: none !important;
  background: none !important;
  color: inherit !important;
}

/* SHOW-CHANGES view: reveal deletions/insertions with conventional styling */
html.diff-show :is(del, .diffdel, .DIFdel, .DIFdelbegin, .DIFdelend) {
  display: revert !important; /* keeps block elements block, inline inline */
  text-decoration: line-through;
}

html.diff-show :is(ins, .diffins, .DIFadd, .DIFaddbegin, .DIFaddend) {
  text-decoration: underline;
}

