@font-face {
  font-family: 'Junicode';
  /* src: url('path/to/junicode.woff2') format('woff2'), Modern Browsers */
  src: url('Junicode.woff') format('woff');  /* Older Browsers */
  font-weight: normal;
  font-style: normal;
}

/* set variable fol-margin for folio */
:root {
    --fol-margin: 6rem;
    /* additional tint of mgh-grey */
    --mgh-grey-8: #f7f7f6
}

div#intro_cont_main {
  line-height: 1.5em;
}

div#intro_cont_main h1,
div#intro_cont_main div.head {
    font-size: 2.0rem;
    font-weight: bold;
    color: var(--mgh-grey);
    margin-top: 1em;
    text-align: center;
    margin-bottom: 2.2rem;
}   


div#intro_cont_main div.maindiv {
    /* Junicode */
    /* font-family: "Junicode";
    font-size: 1.1em; */
    font-family: Arial, Helvetica, sans-serif;
}

div.maindiv > div.div > div.p:first-of-type, 
div.maindiv > div.div:not(.Summarium):not(.Textus) > div.div_start:first-of-type {
  margin-top: 3em;
}

div:not(.head) > div.p, div.p_start, div.app, div.ftn,
div.p_text, div.ftn_entry
{
    text-align:justify;
}
    
div.div {
    margin-bottom: 2.2rem;  
    font-size: 1.6rem;  
}

div.div:last-of-type {
    margin-bottom:64vh;
}

/* margin for folio */
div.div > div.p, div.div > div.div_start {
    position: relative;
    margin-inline: var(--fol-margin);
}

div.div > div.p a.folio, 
div.div > div.div_start a.folio {
    position: absolute;
    left: calc(var(--fol-margin) * -1);
    font-size: 1.4rem;
    font-weight: normal;
    font-style: italic;
}


/* default for all div.p_start */
div.p_start {
    margin-top: 0.6em;
}

/* but not when immediately preceded by .div_start */
div.div_start + div.p_start {
    margin-top: 0;
}

div.div a, span.citRef {
    cursor: pointer;
}

div.div div.div_start {
	text-align: center;
	font-weight: bold;
	font-size: 2.2rem;
	color: var(--mgh-grey);
}

div.app, div.ftn {
    font-size: 1.4rem;
    line-height: 2rem;
    margin-left: var(--fol-margin);
    margin-right: var(--fol-margin);
}

div.app {
    margin-top: 8em;
    
}
div.ftn {
    margin-top: 4em;
    
}

div.app:empty + div.ftn {
    margin-top: 8em;
}

div.app:empty, div.ftn:empty {
    display:none;
}

div.empty {
    /* margin-bottom: 1.6rem; */
    height: 1.8rem;
}


div.ftn div.ftn_entry {
    margin-bottom:0.4rem;
}

div.ftn_entry > a:first-of-type::after {
    content:")";
}

span.app_entry > a:first-of-type::after {
    content: ")";
    display:inline-block;
    width:0.25em;
}

sub, sup {
    font-size: 0.8em;
}

/* span.after_app_entry {
    display: inline-block;
    width:1em;
} */
span.app_entry {
    margin-right:1em;
}

.italics {
    font-style: italic;    
}

.smallcaps {
     font-variant: small-caps;
}
.bold {
    font-weight: bold;    
}

.smaller {
    font-size: smaller !important;
}

div.smaller {
    line-height: 1.5em;
}

.Junicode {
    font-family: 'Junicode', sans-serif;
    /* font-size: 1.2em; */
}

div > table {
  margin-bottom: 4em;
  width: 80%; /* large desktop: > 1400px */
  margin-inline: 10%;
}

@media (max-width: 2000px) {
  div > table { 
    width: 85%; 
    margin-inline: 7.5%;
 }
}

@media (max-width: 1600px) {
  div > table { 
    width: 90%; 
    margin-inline: 5%;
 }
}

@media (max-width: 1200px) {
  div > table { 
    width: 100%; 
    margin-inline: 0%;
 }
}

div > table:first-child {
    margin-top: 2em;
}


tr {
    margin-bottom: 0.4em;
}

tr:empty,
tr td:empty {
    height: 1.2em; 
}

table td {
    vertical-align: text-top;
}

/* stylings for individual tables */
div#wbg000_abk_main table {
  table-layout: fixed;
}

div#wbg000_abk_main table td:first-of-type,
div#wbg000_Einleitung_3bernahmenau table td:first-of-type,
div#wbg00_Siglen_Tabelle table td:first-of-type,
div#wbg201_Anhang_titelindex table td:first-of-type {
  width:25ch;
}


div#wbg00_Siglen_Tabelle table, 
div#ov_articles table {
    margin-top: 6em;
}

/* div#wbg00_Siglen_Tabelle table tr td:has(+ td) {
    padding-right: 2em;
} */

/* div#ov_articles table tbody tr:nth-child(2n+1) {
    background-color: var(--mgh-grey-7);
} */

div#ov_articles table thead tr, 
div#ov_articles table tbody tr:nth-child(2n) {
    background-color: var(--mgh-grey-7);
}

div#ov_articles table thead th {
    padding-block: 0.6em;
}

div#ov_articles table td.summarium {
    color: var(--mgh-grey);
	font-weight: bold;
}

div#ov_articles table thead th,
div#ov_articles table tr td:first-of-type {
    font-style: italic;
}


div#wbg203_Register_quellen table tr td:first-of-type {
    width: 50%;
    padding-right: 2em;
}

/* div#wbg203_Register_quellen table td.cell_tab { */
table td.cell_tab {
  padding-left: 2em;
}

.spaced {
    letter-spacing: 2px; 
}

.right {
    float: right;
}
.left {
    float: left;
}

.hidden {
    display: none;
}

.p_center {
    text-align: center !important;
}

/* subhead in appendix registry */
div#wbg201_Anhang_titelindex div.p_center,
div#wbg203_Register_quellen div.subhead {
    text-align: center;
    color: var(--mgh-grey);
    font-weight: bold;
}

.p_right {
    text-align: right;
}

/* tabstop */
:root {
    --tabstop: 3em;
}
span.tabstop {
    margin-left: var(--tabstop);    
}

/* lit list. bigger tabstop (plus width of 1ch) for lines starting with tabstop */
div#wbg000_lit_litlist span.tabstop:first-child {
  margin-left: calc(var(--tabstop) + 1ch);
}

/* indent in lit list. depending from tabstop */
div#wbg000_lit_litlist div.p:not(:nth-child(1)) {
    text-indent: calc(calc(var(--tabstop) + 1ch) * -1); /* negative value */
	padding-left: calc(var(--tabstop) + 1ch);
}


mark {
background-color: #f7a60a;
}

/* changed for review version */
/* .citRef {
    width:0.7em;
    height:0.7em;
    display:inline-block;
    background-image: url("link.svg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin-right:0.5em;
    margin-left:0.5em;
} */

.citRef {
    width:0.7em;
    height:0.7em;
    display:inline-block;
}

#intro_cont_citRefs, .citRefs {
    display:none;
}

.dialogCit, 
.dialogURL {
    padding-top:1em;
}

/* JQueryUI Bug in 1.12.1-stable:
 * Opacity value wrong
 * cf. <https://bugs.jqueryui.com/ticket/15188>
 */
.ui-widget-overlay {
    background: grey;
    opacity: .3;
}


.ui-dialog-titlebar {
    background:#555951;
    color:white;
}

.ui-corner-all,
.ui-widget,
.ui-widget-content,
.ui-dialog-titlebar,
.ui-widget-header {
    border:0px;
}

#rotator_div {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -121px;
    margin-left: -288px;
    z-index: 101;
    background: rgba(255,255,255,1);
}

#rotator_div img {
    background: rgba(255,255,255,1);
}

div#hover-popup {
    /* font-family: "Junicode"; */
    position: absolute;
    display: none;
    background: var(--mgh-grey-7);
    border: 1px solid var(--mgh-grey-6);
    padding: 10px;
    border-radius: 0px;
    box-shadow: 0 2px 8px var(--mgh-grey-6);
    max-width: 300px;
    z-index: 1000;
    pointer-events: none;
}
div#hover-popup a {
    color: var(--mgh-red);
}

/* main footer for links above the MGH footer */
div#mainWrapper:has(div#main_footer){
    margin-bottom: 0;
}

div#main_footer {
    margin-top: var(--mainMargin);
    height: 4.2rem;
    line-height: 4.2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.4rem;
    color: var(--mgh-grey);
}