﻿:root {
    --alternate-text: darkgreen;
    --error-color: red;
    --ghost-color: #AAA;
    /* should I highlight by turning the background yellow? */
    --highlight-background: #FFFFB3;
    /* or by turning the text magenta? */
    --highlight-color: mediumvioletred;
    --info-color: dodgerblue;
    --success-color: forestgreen;
    --pause: 3000ms;
    --quick: 500ms;
}

/* background */
html {
    background-color: var(--background-color);
}

html::before {
    content: "";
    position: fixed;
    background: radial-gradient(at top, var(--background-stroke) 24%, var(--background-color));
    mask-image: url(/img/background.svg);
    mask-size: 80px;
    width: 100%;
    height: 100%;
    z-index: -1;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: sans-serif;
}

@media screen {
    #container {
        margin-left: auto;
        margin-right: auto;
        min-height: 100vh;
        max-width: 1024px;
        background-color: var(--main-background);
        box-shadow: 0 0 18px 5px black;
    }
}

table {
    border-collapse: collapse;
}

.sticky {
    position: sticky;
    top: 0;
}

/* COPY
 *
 */
h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--header-color);
}

h2 {
    font-size: large;
}

h3 {
    margin-bottom: 0.5rem;
}

hr {
    border-top: thin solid var(--text-color);
    margin-left: 0;
    max-width: 600px;
}

blockquote {
    border-left: solid 3px var(--table-border);
    border-radius: 3px;
    margin: 1em 0.5em;
    padding: 0 0.5em;
    max-width: 30em;
}

caption {
    margin: 0.25rem 0;
    font-size: 1.125em;
    font-weight: bold;
    text-align: left;
}

code.block {
    display: block;
    margin-top: -1.6em;
    white-space: pre;
}

dfn {
    font-style: normal;
    font-variant: small-caps;
}

figure {
    margin: 1rem 0;
    width: fit-content;
}

figcaption {
    margin: 0.25rem 0;
    text-align: center;
}

blockquote,
p,
ol.copy li,
ul.copy li {
    line-height: 1.6;
}

ul {
    margin-top: 0.5rem;
}

ul.tree {
	list-style-type: none;
	margin-top: 0;
	margin-left: 0;
	padding-left: 0;
    line-height: 1.6;
}
ul.tree ul {
	list-style-type: none;
	margin-top: 0;
	margin-left: 10px;
	padding-left: 0px;
	background: url(/img/dot.png) repeat-y;
}
ul.tree ul li {
	margin: 0px;
	padding: 0px 0px 0px 12px;
	background: url(/img/node.png) no-repeat;
}
ul.tree ul li:last-child {
	background: url(/img/node.png) no-repeat;
	background-color: var(--main-background);
}

.hint {
    cursor: help;
}

.alternate-text {
    color: var(--alternate-text);
}

.error,
.warning {
    color: var(--error-color);
}

/*.last-updated {
    font-size: small;
}

.last-updated > time {
    font-style: italic;
}*/

.nowrap {
    white-space: nowrap;
}

/* hyperlinks */
a:link,
a.faux {
    color: var(--link-color);
}

a:link {
    text-decoration: none;
}

a.faux {
    cursor: pointer;
}

a:link:hover,
a.faux:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--link-color);
}

/* SVG icons */
svg.icon {
    width: 1.25em;
    height: 1.25em;
    fill: var(--text-color);
    vertical-align: text-bottom;
}

svg.icon.return {
    vertical-align: middle;
}

main a[href] > svg.icon,
main a.faux > svg.icon,
button > svg.icon {
    margin-right: 0.25em;
}

main a[href]:hover > svg.icon,
main a.faux:hover > svg.icon {
    fill: var(--link-color);
}

main a[href] > svg.icon.new-window,
main a.faux > svg.icon.new-window {
    margin-right: 0;
    margin-left: 0.25em;
    width: 1em;
    height: 1em;
    vertical-align: baseline;
}

/* FORMS
 *
 */
input[type=date],
input[type=email],
input[type=number],
input[type=password],
input[type=search],
input[type=tel],
input[type=text],
input[type=url],
select,
textarea {
    box-sizing: content-box;
    border-style: solid;
    border-width: thin;
    border-color: var(--border-color);
    padding: 1px 2px;
    font-family: sans-serif;
    font-size: medium;
    background-color: var(--form-background);
}

input[type=date]:disabled,
input[type=email]:disabled,
input[type=number]:disabled,
input[type=password]:disabled,
input[type=search]:disabled,
input[type=tel]:disabled,
input[type=text]:disabled,
input[type=url]:disabled,
select:disabled,
textarea:disabled {
    border-color: var(--ghost-color);
    color: var(--ghost-color);
}

input[type=password] {
    width: 12ch;
}

input[type=tel] {
    width: 14ch;
}

input[type=email],
input[type=text],
input[type=url],
select,
textarea {
    max-width: 22ch;
}

textarea{
    width: 22ch;
}

@media (min-width: 480px) {
    textarea {
        width: 32ch;
        max-width: initial;
    }
}

@media (min-width: 640px) {
    textarea {
        width: 40ch;
        max-width: initial;
    }
}

label {
    white-space: nowrap;
}

div.criteria,
form.criteria {
    margin-bottom: 0.5rem;
    border-radius: 7px;
    padding: 6px;
    width: fit-content;
    background-color: var(--criteria-color);
}

input[type=number].nospinner::-webkit-outer-spin-button,
input[type=number].nospinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number].nospinner {
    -moz-appearance: textfield;
}

.two-column-form {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: max-content max-content;
    align-items: start;
    justify-items: start;
}

.two-column-form > button,
.two-column-form > label {
    justify-self: end;
}

.two-column-form > button {
    grid-column-start: 2;
}