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

body {
    color: #111;
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    line-height: 1.5;
}

article {
    margin: 6rem auto;
    max-width: 48rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: justify;
}

footer {
    font-size: 1rem;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header p {
    font-size: 1.5rem;
    margin-bottom: 0;
}

header p + p {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 2rem;
    margin-top: 0;
}

a {
    color: #0074d9;
    text-decoration-color: #7fdbff;
    transition: text-decoration-color 0.25s;
}

a:focus,
a:hover {
    text-decoration-color: #0074d9;
}

ol {
    margin-bottom: 2rem;
}

p + ol {
    margin-top: -2rem;
}

ul {
    margin-bottom: 2rem;
}

ul li {
    margin-bottom: 1rem;
}

ol li {
    margin-bottom: 0;
}

mark {
    background-color: #ffdc00;
    color: #111;
    font-weight: bold;
}

hr {
    background-color: #ddd;
    border: 0;
    height: 0.125rem;
    margin: 4rem auto;
    width: 50%;
}

form {
    margin-bottom: 2rem;
}

.control {
    margin-bottom: 1rem;
    position: relative;
    text-align: right;
}

.control label {
    display: block;
    font-size: 1rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.control input {
    border: 1px solid #aaa;
    border-radius: 4px;
    color: #111;
    font-size: 1rem;
    height: 2rem;
    line-height: 1;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    transition: border-color 0.25s;
    width: 100%;
}

.control input:focus,
.control input:hover {
    border-color: #111;
    outline: none;
}

.control button[type="submit"] {
    background-color: #0074d9;
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    height: 3rem;
    line-height: 1;
    margin-left: auto;
    margin-top: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    text-transform: uppercase;
    transition: box-shadow 0.25s, transform 0.25s;
    vertical-align: middle;
    white-space: nowrap;
}

.control button:focus {
    outline: 0;
}

.control button:hover {
    box-shadow: 0 0 1rem #7fdbff;
}

.control button:active {
    box-shadow: none;
}

@media all and (min-width: 576px) {
    .control {
        align-items: center;
        display: flex;
    }

    .control label {
        flex: 1;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .control input {
        flex: 0 1 40%;
    }
}

.prepend {
    align-items: center;
    background-color: #ddd;
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    bottom: 1px;
    display: flex;
    font-size: 1rem;
    height: 1.875rem;
    justify-content: center;
    line-height: 1;
    padding-left: 1rem;
    padding-right: 1rem;
    position: absolute;
    right: 1px;
}

.output {
    margin-bottom: 2rem;
}

.variable {
    align-items: center;
    display: flex;
}

.variable-term {
    align-items: center;
    display: flex;
    flex: 0 0 9rem;
}

.variable-term::after {
    content: '=';
    margin-left: auto;
    margin-right: 2rem;
}

.variable-definition {
    flex: 0 1 auto;
}

.attribution {
    margin-top: 2rem;
    text-align: center;
}

.attribution img {
    display: block;
    margin-bottom: 0.5rem;
    margin-left: auto;
    margin-right: auto;
}

.attribution p {
    font-size: 1rem;
}
