/* page layout */
HTML {
    margin: 0;
    border: none;
    padding: 0;

    height: 100%;

    color: black;
    background: white;

    hyphens: auto;
}

BODY {
    margin: 0 auto 0 0;
    border: none;
    border-left: 210px solid #EEE;
    padding: 0 14px 1ex 14px;
    overflow: visible;

    min-height: 100%;

    /* border-left: 1px solid #DDD; */

    max-width: 45em;
    font: 13pt/129% arial, sans-serif, symbol;
}

UL.nav {
    margin: 0 -14px 0 -14px;
    border: none;
    padding: .5ex 14px;

    text-align: right;
    vertical-align: middle;

    background: #EEE;

    font-weight: bold;
    font-size: 18px;
    line-height: 175%;
}

UL.nav>LI {
    margin: 0;
    display: inline;
}

UL.nav>LI.trail {
    float: left;
    margin-right: .5em;
}

UL.nav>LI.trail+LI:before {
    content: "";
}

UL.nav>LI+LI.trail:before {
    content: "> ";
}

UL.nav>LI+LI:before {
    content: "| ";
}

UL.nav>LI A {
    color: #800000;
}

UL.nav>LI.trail A {
    color: #007000;
}

.urlinfo .title {
    font: inherit;
    font-weight: bold;
}

.urlinfo .tail {
    font-size: smaller;
    float: right;
}

/* navigation tree in a sidebar on the left */
.nav-tree {
    position: fixed;
    left: 0;
    top: 0;
    width: 210px;
    height: 100%;
    overflow-y: auto;
    background: #EEE;
    padding: 20px 10px;
    box-sizing: border-box;
}

.nav-tree ul {
    list-style-type: none;
    padding-left: 15px;
    margin: 0;
}

.nav-tree>ul {
    padding-left: 0;
}

.nav-tree li {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.nav-tree a {
    text-decoration: none;
    display: block;
    padding: 2px 0;
}

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

.nav-tree .active>a {
    font-weight: bold;
}

.nav-tree .has-children>a::after {
    content: ' ▼';
    font-size: 0.8em;
    vertical-align: middle;
}

.nav-tree .has-children.expanded>a::after {
    content: ' ▲';
}


/* contents structure */
H1 {
    margin: 36px 0 0 0;

    font-size: 2em;
    line-height: 120%;
    text-align: left;

    page-break-after: avoid;
}

P.date {
    margin-top: 1ex;
    margin-bottom: 24pt;

    color: #555;

    font-size: smaller;
    line-height: normal;
    height: 20px;
}

P.date>SPAN {
    line-height: 0;
    vertical-align: middle;
    display: inline-block;
    margin-left: 20px;
}

P.date>SPAN:first-child {
    margin-left: 0;
}

H2 {
    margin: 4ex 0 1ex 0;

    font-size: 1.59em;
    line-height: 120%;
    text-align: left;

    page-break-after: avoid;
}

H3 {
    margin: 2ex 0 1ex 0;

    font-size: 1.26em;
    line-height: 120%;
    text-align: left;

    page-break-after: avoid;
}

H4 {
    margin: 1ex 0 1ex 0;

    font-size: 1em;
    line-height: 120%;
    text-align: left;

    page-break-after: avoid;
}

P.license {
    margin-top: 7ex;

    clear: left;

    color: #555;

    font-size: smaller;
    line-height: normal;
}

/* override browser defaults */
DIV {
    margin: 0;
    border: none;
    padding: 0;
}

A {
    color: #007000;
    text-decoration: inherit;
    font-weight: bold;
}

A:visited {
    color: #004000;
    text-decoration: inherit;
}

A:hover {
    color: #00D000;
    text-decoration: underline;
}

A.disguised {
    font: inherit;
}

IMG {
    margin: 0;
    border: none;
    padding: 0;

    max-width: 100%;
    height: auto;
}

A IMG {
    vertical-align: text-bottom;
}

IMG.para {
    margin: 1ex 0;
    max-width: 100%;
    height: auto;
}

P {
    margin: 1ex 0;
    border: 0;
    padding: 0;
}

BLOCKQUOTE {
    margin: 2ex 0 2ex 2em;
    border: 0;
    padding: 0;
    font-style: italic;
}

TEXTAREA {
    font-size: 100%;
    width: 100%;
}

/* block level elements */
DIV.figure {
    border-left: 1em solid #FCC;
    padding-left: .5em;
    margin-left: .5em;

    text-align: left;
}

DIV.table {
    border-left: 1em solid #CFC;
    padding-left: .5em;
    margin-left: .5em;

    text-align: left;
}

DIV.figure>P,
DIV.table>P {
    font-style: italic;
}

DIV.figure>P EM,
DIV.table>P EM {
    font-style: normal;
    font-weight: bold;
}

DIV.figure>PRE.listing {
    margin-left: 0;
    margin-right: -2mm;
    /* compensate the padding from DIV.figure */
}

DIV.figure>P.listing {
    margin-left: 0;
}

DIV.standout {
    margin: 1ex -10px 1ex -0.5em;
    border: 1px solid yellow;
    padding: 0 10px 0 0.5em;
    background-color: white;
    color: black;
}

DIV.block {
    margin-top: 2ex;
    margin-bottom: 2ex;
}

DIV.equ {
    margin: 1ex 0 1ex 2em;
    font-family: monospace;
    white-space: pre;
}

TD PRE {
    margin-top: 0;
}

PRE.listing {
    border-left: 1em solid #DDD;
    padding-left: .5em;
    margin-left: .5em;
}

PRE {
    margin: .5ex 0 .5ex 1.5em;
    font-size: smaller;
    font-family: monospace
}

/* lists */
OL,
UL {
    margin: 0;
    padding: 0 0 0 2em;
}

UL.inline {
    padding-left: 0;
    list-style-type: square;
}

LI {
    margin: 1.5ex 0;
    padding: 0;
}

*.compact>LI {
    margin: 0.5ex 0;
    padding: 0;
}

*.toc>LI {
    margin: 0;
    padding: 0;
}

DL {
    margin: 0;
    padding: 0;
}

DT {
    margin: 0.2ex 0;
    padding: 0;
    font-weight: bold;
}

DT:first-child {
    margin-top: 1.5ex;
}

DD {
    margin: 1.5ex 0 1.5ex 2em;
    padding: 0;
}

DT+DD {
    margin-top: 0ex;
}

DD+DD {
    margin-top: 2ex;
}

DL.code>DT {
    font-weight: normal;
    font-family: monospace;
}

UL.photos,
UL.photos>LI {
    display: inline;
    margin: 0;
    padding: 0;
}

UL.photos IMG {
    padding-bottom: 0.5ex
}

H2.list:before {
    content: counter(h2list) ". ";
}

H2.list {
    counter-increment: h2list;
    text-align: left;
    font-size: 100%;
    font-weight: bold;
}

H2.side {
    float: left;
    clear: left;
    margin: 0 auto 1ex -210px;
    border: none;
    border-top: 1px solid black;
    padding: 0 10px;
    width: 160px;
    font-size: 200%;
    text-align: center;
    color: gray;
}

/* tables */
TD,
TH {
    text-align: left;
    vertical-align: inherit;
}

TR {
    vertical-align: baseline;
}

TABLE *.l {
    text-align: left;
}

TABLE *.c {
    text-align: center;
}

TABLE *.r {
    text-align: right;
}

TABLE.status {
    margin: 0;
    border: none;
    padding: 0;
    border-collapse: separate;
    border-spacing: 1em 1ex;
}

TABLE.list {
    margin: 1ex 0 1ex 1.5em;
    border: none;
    padding: 0;
    border-collapse: collapse;
}

TABLE.list TH {
    padding: 0 0 0.5ex 1em;
}

TABLE.list TD {
    padding: 0.5ex 0 0 1em;
}

TABLE.list TH:first-child,
TABLE.list TD:first-child {
    padding-left: 0;
}

/* TABLE.list */
TR.spaced TD {
    padding-top: 1ex;
}

TABLE.images {
    border-collapse: collapse;
    background-color: #CCCC66;
    color: black;
    border-style: solid;
}

TABLE.form {
    border: 1px solid #009;
    background: #EEF;
}

/* inline elements */
SPAN.bf {
    font-weight: bold;
}

SPAN.it {
    font-style: italic;
}

SPAN.tt {
    font-family: monospace;
}

SPAN.var {
    font-family: serif;
    font-style: italic;
}

SPAN.errmsg {
    font-size: 70%;
    font-weight: normal;
    color: red;
}

SPAN.title {
    font-weight: bold;
}

SPAN.title A {
    color: black;
}

SPAN.title A:hover {
    color: #00D000;
}

H1.inline {
    display: inline;

    margin: 1ex 0;
    text-align: left;
    font-size: 100%;
    font-weight: bold;
}

H1.inline:after {
    content: ".";
}

SPAN.links {
    font-size: smaller;
}

/* blog */
H2.blog {
    margin: 6ex 0 0 -2ex;
    border-top: 1ex solid #666;
    border-left: 1ex solid #666;
    padding: .5ex 0 .5ex 1ex;
    text-align: left;
    font: 100% sans-serif
}

H2.blog SPAN.id {
    float: right;
    font-size: 180%;
    padding-right: 1mm;
    color: gray
}

H2.blog SPAN.blogtitle {
    font-size: 120%;
}

/* H2.blog */
SPAN.blogtitle INPUT {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 100%;
    width: 100%;
}

H2.blog SPAN.date {
    font-size: 80%;
}

H2.blog time {
    font-size: 80%;
}

H2.blog a {
    color: inherit;
    font-weight: inherit;
}

/**********************************************************************
 * wide pages
 */

BODY.wide {
    margin: 0;
    border-left: none;
    padding: 0 .5em 1ex .5em;
    max-width: 100%;
    overflow: auto;
}

/**********************************************************************
 * small screens
 */

@media all and (max-width: 600px) {

    /* smaller font for the title bar */
    UL.nav {
        font-size: 15px;
        line-height: 200%;
    }

    /* no side bar */
    BODY {
        margin: 0;
        border-left: none;
        padding: 0 .5em 1ex .5em;
        max-width: none;
        overflow: auto;
    }

    UL.nav {
        margin-left: -.5em;
        margin-right: -.5em;
        padding-left: .5em;
        padding-right: .5em;
    }

    .side {
        display: none;
    }

    /* elements cannot extend outside BODY any more */
    BODY,
    PRE {
        overflow: auto;
    }
}

/**********************************************************************
 * print layout
 */

@media print {

    /* no page navigation */
    .nav,
    .noprint,
    .noprint * {
        display: none;
    }

    /* no side bar */
    BODY {
        margin: 0;
        border-right: none;
        padding: 0;
        max-width: none;
    }

    .side {
        display: none;
    }

    /* smaller font for reading on paper */
    BODY {
        font-size: 11pt;
        line-height: inherit;
    }
}

@page {
    margin: 25mm 18mm;
}

/* Pagination styling */
.pagination {
    list-style-type: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    text-decoration: none;
    display: inline-block;
}

.pagination .page-item.active .page-link {
    background-color: #00e;
    color: white;
    border-color: #00e;
}

.pagination .page-link:hover {
    background-color: #f0f0f0;
}

.pagination .page-item.disabled .page-link {
    color: #999;
    cursor: not-allowed;
}