body,
button,
input,
select,
textarea,
.ui-widget {
    font-family: 'Montserrat', sans-serif;
}

h1 {
	font-size: 32px;
	font-weight: 500;
	margin-top: 0;
}

h2 {
	font-size: 18px;
	font-weight: 600;
}

h3 {
	font-size: 16px;
	font-weight: 500;
}

h1 img {
	margin-right: 1ex;
	vertical-align: -2px;
}

html {
    height: 100%;
}

body {
    background: var(--background);
    color: var(--text);
    font-size: 14px;
    font-weight: normal;
    margin: 0;
    overflow-y: scroll;
    padding-bottom: 64px;
    position: relative;
    min-height: 100%;
    box-sizing: border-box;
}

body.headless {
    background: none;
    overflow-y: hidden;
    padding-bottom: 0;
}

wbr::after {
    content: "\200b"; /* ZERO WIDTH SPACE */
}

input:focus,
select:focus,
textarea:focus,
button:focus {
	outline: none;
}

#wrap {
    margin-left: 76px;
}

.headless #wrap {
    margin-left: 0;
}

#page {
    clear: both;
    margin: 0 auto 1em;
    overflow: hidden;
    position: relative;
    padding: 2em 1em;
}

.headless #page {
    margin-bottom: 0;
}

a img {
    border: none;
}

.brick {
    display: inline-block;
    vertical-align: top;
}

.clear {
    clear: both;
}

.half,
.third {
    display: inline-block;
    margin-left: 0;
    margin-right: 0;
    vertical-align: top;
}

.half {
    width: 49%;
}

.third {
    text-align: center;
    width: 33%;
}

.half:first-child,
.third:first-child {
    text-align: left;
}

.third:last-child {
    text-align: right;
}

input[type="search"] {
    -webkit-appearance: textfield;
}

input[type="number"],
.ui-widget input[type="number"] {
    box-sizing: content-box;
    text-align: right;
    width: 4em;
}

input[type="password"].password + small span {
    font-weight: bold;
}

input[type="password"].password + small .valid {
    color: green;
}

input.date {
    box-sizing: content-box;
    text-align: center;
    width: 6em;
}

select {
    max-width: 100%;
}

dt {
    font-weight: bolder;
}

.row {
    box-sizing: border-box;
    clear: both;
    display: block;
    margin: 1em 0;
    width: 100%;
}

.row > .row {
    margin: 0;
}

fieldset.row > .row {
    margin: inherit;
}

fieldset.row > .row:first-child,
fieldset.row > legend + .row {
    margin-top: 0;
}

fieldset.row > .row:last-child {
    margin-bottom: 0;
}

.row span ~ label {
	margin-left: 1em;
}

.label {
    display: inline-block;
    width: 8em;
}

.numeric {
    text-align: right;
    white-space: nowrap;
}

.centered {
    text-align: center;
}

.right {
    float: right;
}

.logo {
    background-position: left top;
    background-repeat: no-repeat;
    background-size: contain;
    height: 64px;
}

.circle {
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	display: inline-block;
	border-radius: 50%;
}

#footer {
    box-sizing: border-box;
	color: white;
    position: absolute;
    left: 0;
    bottom: 0;
    text-align: center;
    width: 100%;
}

#footer a {
	color: white;
	text-decoration: none;
}

#footer a:hover {
	color: #FB8B00;
}

.button,
.ui-widget-content .button,
.field,
.ui-widget .field {
    border: none;
    border-radius: 1em;
    box-sizing: border-box;
    font-size: 16px;
    padding: 1ex;
}

.ui-widget-content .button,
.ui-widget .field {
    line-height: 21px;
}

textarea.field {
    font-size: smaller;
}

.button,
.ui-widget-content .button {
    background: var(--heading);
    border-color: transparent;
    color: var(--text);
    padding-left: 1em;
    padding-right: 1em;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    display: inline-flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    margin-right: 1ex;
    margin-bottom: 1ex;
    vertical-align: top;
}

label .button {
    vertical-align: middle;
}

.button:hover {
	background: var(--active);
}

.centered .button {
    margin-left: 1ex;
}

.numeric .button:last-child {
    margin-right: 0;
}

.button:disabled,
.radioButtons .button:disabled,
.button.dialog:disabled,
.button.dialog:disabled:hover,
.radioButtons .button.dialog:disabled,
.radioButtons .button.dialog:disabled:hover,
.button[type="submit"]:disabled,
.button[type="submit"]:disabled:hover,
.ui-widget-content .button[type="submit"]:disabled,
.ui-widget-content .button[type="submit"]:disabled:hover,
.radioButtons input:disabled + .button,
.radioButtons input:checked:disabled + .button,
.radioButtons input:disabled + .button:hover,
.radioButtons input:checked:disabled + .button:hover {
    background: none;
    border-color: inherit;
    color: GrayText;
    cursor: not-allowed;
}

.field,
.ui-widget .field {
    background: white;
}

#alert {
    white-space: pre-line;
}

.ui-dialog {
    box-sizing: border-box;
}

.error-message {
    border: thin inset;
    color: var(--active);
    margin: 1em auto;
    padding: 1ex 0;
    text-align: center;
}

.error-message,
.form,
.preview {
    box-sizing: border-box;
    width: 640px;
    max-width: 100%;
}

.preview {
    height: 914px; /* Fit A4 document */
}

.form {
    margin: 2em auto 0;
    text-align: left;
}

.preview + .form {
    display: inline-block;
    margin: 0 0 0 1em;
    vertical-align: top;
}

.form h1 {
    border-bottom: 3px solid;
    font-size: 50px;
    font-weight: inherit;
    margin: 0 0 16px;
    padding-bottom: 16px;
    text-align: center;
}

.summary {
    border-spacing: 0;
    box-sizing: border-box;
    margin-top: 1em;
    width: 100%;
}

.summary th,
.heading {
    color: var(--heading);
}

.summary th {
	font-weight: normal;
    padding: 1ex;
    text-align: left;
}

.summary > tbody td,
.summary > thead td,
.summary > tfoot td,
.summary th {
    border: thin inset #969799;
    padding: 1ex;
    vertical-align: middle;
}

.summary > tbody > tr.separator {
    background: none;
    height: 1em;
}

.summary tr.open {
	height: 4em;
}

.summary .toolbar {
    display: none;
    margin-top: 1ex;
    position: absolute;
    white-space: nowrap;
}

a,
.summary .toolbar button,
.radioButtons input:enabled + .button:hover {
	color: var(--active);
}

.summary .toolbar a,
.summary .toolbar button,
#page nav a,
.incomplete small {
	font-weight: bolder;
}

.summary .toolbar a,
.summary .toolbar button {
	cursor: pointer;
    font-size: smaller;
}

.summary .toolbar a,
.summary .toolbar button,
nav a {
	margin-right: 1em;
	text-decoration: none;
}

.summary .toolbar img,
nav a img {
	margin-right: 1ex;
}

.summary .toolbar button {
	background: none;
	border: none;
}

.summary .toolbar label,
.summary .toolbar a,
.summary .toolbar form,
.summary .toolbar button {
    display: inline-block;
    vertical-align: top;
}

.summary .open .toolbar {
    display: block;
}

.sortable {
    cursor: pointer /*n-resize*/;
}

.sortable::after {
	content: ' \21d5';
	margin-left: 4px;
	vertical-align: middle;
}

.sortable.up {
    cursor: pointer /*s-resize*/;
}

.sortable.up::after {
    content: ' \25b2'; /* BLACK UP-POINTING TRIANGLE */
}

.sortable.down::after {
    content: ' \25bc'; /* BLACK DOWN-POINTING TRIANGLE */
}

form.dialog,
div.dialog {
    display: none;
}

fieldset {
    display: inline-block;
    vertical-align: top;
}

img.icon,
input.icon,
button.icon > img {
    vertical-align: bottom;
    height: 16px;
}

input.icon,
button.icon {
    cursor: pointer;
}

button.icon {
    background: none;
    border: none;
    padding: 0;
}

.radio > label {
    white-space: nowrap;
}

.radio > label > input[type="radio"] {
    margin-left: 1ex;
    margin-right: 0;
}

label > span:first-child {
    display: inline-block;
    vertical-align: middle;
    width: 12em;
}

label > span + input {
    vertical-align: middle;
}

.mark {
	border-radius: 0.5em;
    box-sizing: content-box;
    cursor: default;
    display: inline-block;
    font-weight: bolder;
    text-align: center;
    height: 1em;
    width: 1em;
}

.droppable {
    background: var(--active);
    color: var(--text);
}

.total > span {
    margin-right: 1em;
}

/* intTelInput */
.iti {
    width: 100%;
}

.chart {
    display: inline-block;
    position: relative;
    height: 400px;
    width: calc(50% - 1em);
    min-width: 600px;
}

.chart.round {
    width: calc(33% - 1em);
    min-width: 400px;
}

.incomplete img {
	vertical-align: middle;
}

.grid {
	border-collapse: collapse;
}

.grid thead,
.grid tbody {
	vertical-align: top;
}

.grid th,
.grid td {
	border: thin solid;
	padding: 1ex;
}

.grid td > :first-child {
	margin-top: 0;
}

.grid td > :last-child {
	margin-bottom: 0;
}

.headless #header,
.headless #footer {
    display: none;
}

.results {
    border-collapse: collapse;
}

.results th {
    text-align: center;
}

.results td:has(sup) {
    white-space: nowrap;
}

.results th[scope="row"],
.results .annotations,
.results .notes {
    text-align: left;
}

.results .subtitle,
.results .annotations {
    font-size: smaller;
}

.results,
.results .annotations {
    counter-reset: annotation;
}

.results .annotation,
.results .annotations sup {
    counter-increment: annotation;
}

.results .annotation::before,
.results .annotations sup::before {
    content: counter(annotation);
}

.results .button {
    margin: 0;
}

@media screen and (max-width: 640px) { /* VGA: 640 x 480 */
	.summary tr.open {
		height: 5em;
	}

	.summary .toolbar {
	    margin-top: 0;
	}
}
