@media print {
    hr, navigation, #std-flipbook-nav { visibility: hidden; }
    body { margin: 3em; }
}

body {
    font-family: "Noto Serif Tamil", "Noto Sans Tamil", "Times New Roman", serif;
    background-color: #fdfaf3;
    color: #1f1a17;
    padding-top: 2.5em;
    padding-bottom: 2.5em;
}

coverpage { text-align: center; page-break-before: always; }
h1, h2 { page-break-before: always; font-size: 1.25em; text-align: center; color: #7a2021; }

navigation { display: block; }
navigation a { color: #7a2021; text-decoration: none; font-weight: bold; }
navigation a:hover { text-decoration: underline; }
text > a { text-decoration: none; font-weight: bold; margin-left: .05em; color: #7a2021; }

article > details > id { display: none; }
article > bdetails > id { display: none; }
id, pfile, cfile, nfile { display: none; }

book-title, book, title, atitle, btitle, subtitle, author, publisher, year {
    display: block;
    font-weight: bold;
    font-size: 1.15em;
    text-align: center;
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

atitle {
    font-size: 1.4em;
    color: #7a2021;
}

atitle1 { display: block; font-weight: bold; font-size: 1.15em; text-align: center; }
title > line, atitle > line { font-size: 1em; line-height: 1.5em; }
publisher, year { font-size: .85em; }

b { font-weight: bold; }
br { display: block; }

para {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
    text-align: justify;
    break-inside: auto;
}

para > text {
    display: block;
    font-size: 1em;
    text-indent: 2em;
    line-height: 1.65em;
    margin-top: 1em;
    margin-bottom: 1em;
}

para > text.continued-text {
    text-indent: 0;
}

para > translation {
    display: block;
    text-indent: 2em;
    line-height: 1.6em;
    margin-top: 1em;
    margin-bottom: 1em;
}

text > sup {
    line-height: 0;
    vertical-align: super;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 0.15em;
    margin-right: .25em;
}

verse > line > sup {
    line-height: 0;
    vertical-align: super;
    font-size: .75em;
    font-weight: bold;
    margin-left: 0.05em;
    margin-right: .25em;
}

sup { font-size: .85em; margin-left: .05em; }
details > title > line > sup,
p-title > sup {
    line-height: 0;
    vertical-align: super;
    font-weight: bold;
    margin-left: 0.05em;
    margin-right: .25em;
}

verse > number { display: none; }
verse, sverse, gverse, inscription {
    display: block;
    font-style: normal;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 2em;
    line-height: 1.6em;
    page-break-inside: avoid;
}

line { display: block; line-height: 1.55em; }
verse[language="en"] > line { font-family: "Serif"; font-style: italic; }
sverse > line { font-family: "Sanskrit 2003"; font-style: normal; }
gverse > line { font-family: "Noto Serif Grantha"; font-style: normal; font-size: .85em; }

verse[language="sa"] { display: block; font-style: normal; margin-top: 1em; line-height: 1.5em; }
verse[language="en"] { display: block; font-style: italic; margin-top: 1em; line-height: 1.5em; }
verse[language="gr"] { display: block; font-style: normal; margin-top: 1em; line-height: 1.5em; }
verse[language="sa"] > line { font-family: "Noto Serif Devanagari"; font-style: normal; font-size: 1.15em; }

p-title {
    display: block;
    font-weight: bold;
    font-size: 1.12em;
    color: #5b1919;
    text-align: left;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

em { font-weight: bold; font-style: normal; }

para > text > ul {
    display: block;
    list-style: decimal;
    columns: 1;
    list-style-position: outside;
    text-indent: 0em;
    padding-left: 1em;
    margin-left: 1em;
    margin-right: 1em;
}
para > text > ul > li { display: list-item; line-height: 1.5em; margin-top: 0.6em; }

para > ul {
    display: block;
    list-style: decimal;
    columns: 1;
    list-style-position: outside;
    text-indent: 0;
    margin-left: 2em;
}
para > ul > li { display: list-item; line-height: 1.75em; }

para > text > ol {
    display: block;
    list-style: disc;
    list-style-position: outside;
    text-indent: 0;
    margin-left: 2%;
}
para > text > ol > li { display: list-item; color: black; line-height: 1.75em; }

footnote > text {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
    text-align: justify;
    line-height: 1.5em;
    text-indent: 0;
}
footnote > text > sup { vertical-align: baseline; font-weight: normal; }
footnote > p-title { display: block; font-weight: bold; text-align: center; margin-top: 1em; margin-bottom: 1em; }

figure {
    display: block;
    margin: 1.5em auto;
    text-align: center;
}

.floatright { width: 35%; float: right; margin-left: 1.5em; margin-right: 0; }
.floatleft { width: 35%; float: left; margin-right: 1.5em; margin-left: 0; }
.floatnone, .hbooktitle, .booktitle {
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

figure img,
.half, .full, .pfull, .lfull, .center {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.caption, figcaption {
    font-size: 0.95em;
    font-weight: bold;
    color: #4a3d33;
    text-align: center;
    margin-top: 0.6em;
    line-height: 1.5em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

table, th, td {
    border: 1px solid #cbbba0;
}

th, td {
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

.reference {
    border: none;
    font-size: 0.92em;
    margin-left: 1em;
}
.reference td {
    border: none;
    padding: 3px 6px;
}
