body,td {
    font-family: sans-serif;
}
a:link, a:visited {
    text-decoration: None;
}

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

/* PAGE */

body {
    margin: 0.5vh 0.5vw;
    padding: 0;
}
form {
    margin: 0;
}
div.page {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    width: 99vw;
    height: 99vh;
}
div.leftcol {
    flex: 0 0 20rem;
    border-right: 1pt solid #aaaaaa;
    padding-left: 0.2rem;
    padding-right: 0.4rem;
    height: 99vh;
    overflow: auto;
	-webkit-overflow-scrolling: touch;
}
#sidebar {
    flex: 0 0 2rem;
    background-color: #dddddd;
    height: 99vh;
}
#sidebar a:link, #sidebar a:visited {
    color: #333333;
}
#sidebar > div {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-end;
    height: 8rem;
    width: 2rem;
    border-bottom: 0.1rem solid #aaaaaa;
    border-left: 0.1rem solid #aaaaaa;
    border-right: 0.1rem solid #aaaaaa;
}
#sidebar > div > a {
    flex: 0 0 auto;
    height: 2rem;
    width: 8rem;
    font-size: large;
    transform: rotate(270deg);
    transform-origin: left top;
    text-align: center;
    margin-bottom: -2rem;
}
#sidebar > div > a:hover {
    background-color: #eeeeee;
}
#sidebar > div[status=about] > a {
    height: 2.2rem;
    width: 2rem;
    transform: none;
    margin-bottom: 0rem;
}
#sidebar > div.active {
    background-color: #ffffff;
    font-weight: bold;
}
#sidebar > div[status=help].active {
    background-color: #ffffee;
}
#sidebar > div[status=about] {
    height: 2.2rem;
    width: 2rem;
    background-color: #ffffff;
    border-bottom: 0.1rem solid #aaaaaa;
    border-left: 0;
    border-right: 0;
    padding-bottom: 0.2rem;
}
img.icon {
    height: 2rem;
    width: 2rem;
}
#sidebarcont {
    flex: 0 0 auto;
    background-color: #dddddd;
    height: 99vh;
    overflow-y: auto;
}
#sidebarcont > div {
    display: none;
    background-color: #ffffff;
    border: 0.1rem solid #aaaaaa;
    border-radius: 0.2rem;
    padding: 0.5rem 0.3rem;
    margin: 0rem 0.2rem;
    width: 20rem;
}
#sidebarcont > div.active {
    display: block;
}
details.help {
    border: 0.1rem solid #aaaaaa;
    border-radius: 0.2rem;
    padding: 0.5rem 0.3rem;
    margin: 0rem 0.2rem;
}
details.help p {
    font-size: small;
}
div.midcol {
    flex: 0 0 auto;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    height: 99vh;
    overflow: auto;
	-webkit-overflow-scrolling: touch;
}
div.rightcol {
    flex: 10 2 auto;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: stretch;
    border-left: 1pt solid #aaaaaa;
    padding-left: 0.4rem;
    padding-right: 0.2rem;
    height: 99vh;
    overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/* LEFT-COL */

div.header {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: flex-start;
}
img.hdlogo {
    flex: 0 0 auto;
    max-width: 5rem;
    height: 4rem;
}
img.mainlogo {
    max-width: 15rem;
    height: 5rem;
}
div.hdlinks {
    flex: 0 1 auto;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: baseline;
}
div.hdlinks > a {
    flex: 1 1 4rem;
    background-color: #eeeeff;
    border-radius: 0.4rem;
    border: 0.1rem solid #cccccc;
    padding: 0.2rem 0.2rem;
    margin: 0.2rem 0.2rem;
    text-align: center;
    text-decoration: none;
}

.ilab {
    color: #777777;
    font-weight: bold;
    font-size: small;
}
p.ilab {
    padding: 0.2rem 0rem 0.1rem 0.5rem;
    margin: 0;
}
.sections {
    background-color: #ddeeff;
}
textarea.sections {
	font-size: large;
	font-family: monospace;
	width: calc(100% - 1rem);
	height: 4rem;
	margin: 0.3rem 0.3rem;
}
.tuples {
    background-color: #eeffdd;
}
textarea.tuples {
	font-size: large;
	font-family: monospace;
	width: calc(100% - 1rem);
	height: 5rem;
	margin: 0.3rem 0.3rem;
}
.template {
    background-color: #ffeedd;
}
textarea.template {
	font-size: large;
	font-family: monospace;
	width: calc(100% - 1rem);
	height: 20rem;
	margin: 0.3rem 0.3rem;
}
textarea.description {
	font-size: medium;
	font-family: monospace;
	width: calc(100% - 1rem);
	height: 20rem;
	margin: 0.3rem 0.3rem;
    background-color: #ffffff;
}

div.messages {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
}
.eline {
    font-size: small;
    color: #552222;
    background-color: #ffbbbb;
}
.tline {
	font-size: small;
	font-family: monospace;
    color: #bb0000;
    background-color: #ffeedd;
    white-space: pre;
}

p.buttons {
    text-align: center;
}
button {
    font-weight: bold;
    background-color: #888888;
    color: #ffffff; 
    border-color: #444444;
    cursor: pointer;
}
button.xl {
    font-size: large;
    width: 95%;
    padding: 0.5em;
    border-radius: 1rem;
}
button.l {
    font-size: medium;
    width: 80%;
    padding: 0.3em;
    border-radius: 0.5rem;
}
button.m {
    display: inline;
    font-size: medium;
    width: 40%;
    padding: 0.3em;
    border-radius: 0.5rem;
}
button:hover {
    background-color: #bbbbbb;
}

input.int {
	font-size: medium;
	font-family: monospace;
    width: 3rem;
}
input.name {
	font-size: small;
	font-family: sans-serif;
    font-weight: bold;
	width: calc(100% - 1rem);
}

div.cline {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: baseline;
    margin-left: 1rem;
    background-color: #fafafa;
}
span.cradio, input.cradio {
    flex: 0 0 2rem;
    margin-right: 0rem;
}
span.ctype {
    flex: 0 0 4rem;
    padding-right: 0.5rem;
    font-size: x-small;
    font-style: italic;
}
span.ctext {
    flex: 0 1 auto;
    font-size: x-small;
    font-style: italic;
}
span.cinfo {
    flex: 0 1 auto;
    font-size: x-small;
}

/* MID-COL */

div.navigation {
    font-size: small;
}

div.materialnav {
    width: 100%;
}
div.passages {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: flex-start;
}
div.pages {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    align-items: center;
}
div.pline {
    display: flex;
    flex-flow: column nowrap;
}
.pnav {
    font-size: small;
    color: #6666ff;
    background-color: #eeeeff;
    border-radius: 0.4rem;
    border: 0.1rem solid #cccccc;
    padding: 0.2rem 0.2rem;
    line-height: 1.5em;
    text-decoration: none;
}
.pnav:hover, .s0nav:hover, .s1nav:hover {
    background-color: #eeffff;
}
div.sline {
    display: flex;
    flex-flow: column nowrap;
    margin: 0.1em 0.2em;
}
.s0nav, .s1nav {
    font-size: small;
    color: #6666ff;
    background-color: #eeeeff;
    border-radius: 0.2rem;
    border: 0.1rem solid #cccccc;
    padding: 0.1rem 0.2rem;
    line-height: 1.0em;
    text-decoration: none;
}
.focus {
    background-color: #ffeebb;
}

/* RIGHT-COL */

div.dtheadrow {
    font-weight: bold;
    background-color: #dddddd;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
div.dtheadrow > span {
    margin: 0.2rem;
    padding: 0 0.5rem;
    border-right: 0.2rem solid #ffffff;
}
details.dtrow {
    border: 0.1rem solid #bbbbbb;
}
details.dtrow.focus {
    background-color: #ffaa00;
}
details.dtrow > summary {
    background-color: #f0f0f0;
    margin: 0.2rem 0;
    padding: 0.2rem;
}
details.dtrow > summary > span {
    padding: 0 0.5rem;
    border-right: 0.2rem solid #bbbbbb;
}
div.pretty {
    width: 100%;
    margin: 0.2rem 0 0.5rem 0;
    background-color: #fafafa;
}
a.rwh {
    font-size: small !important;
    background-color: #ddeeff;
}
a.sq {
    font-size: small !important;
    background-color: #eeffdd;
}
a.nd {
    font-size: small;
    background-color: #eeffdd;
}
a.rwh:link,a.rwh:visited,
a.sq:link,a.sq:visited,
a.nd:link,a.nd:visited {
    color: #444444;
} 
