@import url(//fonts.googleapis.com/css?family=Bitter);
:root {
    --color-primary: #bf5700;
    --color-secondary: #fff8ed;
    --color-secondary-dk: #f6e4cc;
    --color-black: #333;
    --color-black-lt: #555;
    --color-grey: #aaa;
    --color-grey-lt: #e9e9e9;
    --color-bold: #d14;
}

* {
    box-sizing: border-box;
}
body {
    color: var(--color-black-lt);
    font-family: "Bitter", Georgia, "Times New Roman", Times, serif;
    font-size: 15px;
    line-height: 1.7em;
}

main {
    display: flex;
    align-items: stretch;
}
.rs-output {
    height: 100%;
    min-height: 182px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-black);
    font-style: normal;
    font-weight: normal;
    line-height: 1.3em;
    margin: 0 0 15px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

pre,
code {
    background-color: var(--color-secondary);
    border: 1px solid var(--color-secondary-dk);
    color: var(--color-black);
    font-family: Monaco, monospace, Courier, "Courier New";
    font-size: 13px;
    line-height: 1.3em;
    padding: 1px 3px;
}
pre {
    padding: 15px 20px;
}

.container {
    margin: 0 auto;
    max-width: 1000px;
    min-width: 300px;
    padding: 0 20px;
}

.inputs {
    position: relative;
}

.test:after {
    clear: both;
    content: "";
    display: table;
}

.test label {
    display: block;
}

.test input,
.test textarea {
    width: 100%;
}

.test .pattern-input {
    display: inline-block;
    margin-bottom: 5px;
}

.test .subject-split {
    color: var(--color-black-lt);
    display: inline-block;
    font-size: 0.9em;
    width: auto;
}

@media (min-width: 800px) {
    .inputs,
    .results {
        float: left;
        width: 50%;
    }
    .inputs {
        padding: 0 10px 0 0;
    }
    .results {
        padding: 12px 0 0 10px;
    }
}

.header {
    padding-top: 1em;
    text-align: center;
}

.header h1 {
    color: var(--color-primary);
    font-size: 5em;
    line-height: 1em;
    margin: 0 0 15px 0;
    text-shadow: var(--color-grey) 2px 2px;
}

.footer {
    clear: both;
    font-size: 0.9em;
    text-align: center;
}

.footer p {
    margin: 0;
}

.footer a {
    white-space: nowrap;
}

.results pre {
    overflow: auto;
}

.results__result {
    padding-bottom: 1.1em;
}
.results__result:last-child {
    padding-bottom: 0;
}

.results__error {
    color: var(--color-bold);
}

main {
    flex-direction: column;
}

@media (min-width: 800px) {
    main {
        flex-direction: row;
    }
}

.reference ul {
    padding: 0;
    display: grid;
    grid-template-columns: 100%;
    gap: 0.5rem;
}
@media (min-width: 520px) and (max-width: 799px) {
    .reference ul {
        grid-template-columns: 50% 50%;
    }
}
@media (min-width: 800px) {
    .reference ul {
        grid-template-columns: 33% 33% 33%;
    }
}

.reference li {
    list-style-type: none;
}

.reference li > code:first-child {
    display: inline-block;
    margin-right: 5px;
    text-align: center;
    width: 60px;
}

.reference a {
    white-space: nowrap;
}

.reference__more {
    text-align: center;
}

input,
textarea {
    border: 1px solid #ddd;
    font-family: Monaco, monospace, Courier, "Courier New";
    font-size: 14px;
    padding: 8px 10px;
    resize: vertical;
}

body.regex .regex,
body.fancy-regex .regex-fancy {
    display: block;
}

body.fancy-regex .regex,
body.regex .regex-fancy {
    display: none;
}
