:root {
    --gap: 8px;
    --letterlink: var(--gap);
    --rs: 10vh;
    --cell-bg: #28292b;
    --bg: #ffdb70;
    --article-bg: #f7f7f7;
    --text: #28292b;
    --link: blue;
    --link-h: #ef303b;
    --gray: hsl(51, 3%, 55%);
    --input-bd: rgba(127,127,127,.21);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 20px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 1em;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    line-height: 1.3;
}
p {
    margin: 0;
    margin-bottom: 0.7em;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--link-h);
    transition: color 0s;
}

h4 { margin: 0; }

button
, input[type="button"]
, input[type="submit"]
{
    font-size: 1rem;
    border: 1px solid var(--input-bd);
    color: var(--text);
    background: rgba(127,127,127,.035);
    border-radius: 4px;
    line-height: 1;
    padding: 0.13em 0.27em 0.17em 0.23em;
    background-clip: padding-box;
}
button:hover
, input[type="button"]:hover
, input[type="submit"]:hover
{
    background: rgba(127,127,127,.1);
}
button:active
, input[type="button"]:active
, input[type="submit"]:active
{
    background: rgba(127,127,127,.35);
}

main {
    position: relative;
    height: 90vh;
    margin: 0 calc(var(--gap) * -1);
    width: 100%;
}

article {
    max-width: 1024px;
    margin: 0 max(0px, var(--gap));
    padding: .5em 1.5em 1em;
    background: var(--article-bg);
    min-height: 100vh;
    border-radius: 2px;

    --nonex-tremble: 3px
}

.main-input {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2em;
    margin-bottom: .5em;
}
.secondary-input {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3em;
    gap: 2em;
}
.fx-col {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
}
.fx-col.input-block {
    flex-grow: 1;
}
.fx-col.screenshot-block {
    justify-content: end;
    white-space: nowrap;
}
.fx-col input {
    display: inline;
}
.fx-col .pickr {
    top: calc(-.25em - 2px);
}
.fx-col .pickr .pcr-button {
    height: 1.5em;
}
.pcr-color-chooser { grid-area: 2/1/2/3 !important; }
.pcr-swatches { display: none !important; }
.pcr-palette {
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}


#gap-size {
    width: 20vw;
    min-width: 200px;
    max-width: 300px;
}
#radius-size {
    width: 80px;
}

.nonex-syms {
    position: absolute;
    color: var(--link-h);
    opacity: 0.5;

    animation-name: nonex-sym;
    animation-duration: .3s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}
@keyframes nonex-sym {
    0% {}
    33% {
        transform: translate(calc(-1 * var(--nonex-tremble)), -7px);
    }
    67% {
        transform: translate(var(--nonex-tremble), -14px);
    }
    100% {
        transform: translate(0, -21px);
        opacity: 0;
    }
}

.text-input {
    font-size: 1em;
    display: block;
    margin-bottom: .5em;
    padding: .25em;
    outline: none;
    border: 1px solid var(--input-bd);
    width: clamp(200px, 100%, 300px);
}

.display-wrapper {
    display: flex;
    position: fixed;
    top: 0;
    height: calc(90vh - var(--scroll-mod));
    width: 100%;;
    margin: 0;
    padding: var(--gap);
    --scroll-mod: 0px;
    will-change: height;
    z-index: -1;
}

.display {
    position: relative;
    display: flex;
    flex-grow: 1;
    flex-direction: row;
    flex-wrap: nowrap;
    margin: calc(var(--gap) * -.5);
    cursor: text;
}
.display.highlight-user .sym:not([data-author="user"]) {
    opacity: 0.75;
}

.sym {
    display: flex;
}

.col {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cell {
    position: relative;
    /* flex-grow: 1; */
    flex-basis: 0;
    margin: calc(var(--gap) / 2);
}
.sol { background: var(--cell-bg); }

.s1 { flex-basis: calc(((100% - (5 * var(--gap))) / 6 * 1) + (0 * var(--gap))); }
.s2 { flex-basis: calc(((100% - (5 * var(--gap))) / 6 * 2) + (1 * var(--gap))); }
.s3 { flex-basis: calc(((100% - (5 * var(--gap))) / 6 * 3) + (2 * var(--gap))); }
.s4 { flex-basis: calc(((100% - (5 * var(--gap))) / 6 * 4) + (3 * var(--gap))); }
.s5 { flex-basis: calc(((100% - (5 * var(--gap))) / 6 * 5) + (4 * var(--gap))); }
.s6 { flex-basis: calc(((100% - (5 * var(--gap))) / 6 * 6) + (5 * var(--gap))); }

.rs-tr { border-top-right-radius: var(--rs); }
.rs-br { border-bottom-right-radius: var(--rs); }
.rs-bl { border-bottom-left-radius: var(--rs); }
.rs-tl { border-top-left-radius: var(--rs); }

.d-tl::before,
.d-bl::before,
.d-tr::after,
.d-br::after
{
    content: '';
    position: absolute;
    display: block;
    width: calc(var(--gap) + 2px);
    height: 100%;
    top: 0;
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
    border-color: var(--cell-bg);
}
.d-tl::before,
.d-tr::after
{ border-top-width: var(--letterlink); }
.d-bl::before,
.d-br::after
{ border-bottom-width: var(--letterlink); }
.d-tl::before,
.d-bl::before
{ left: calc(-1 * var(--gap) - 1px); }
.d-tr::after,
.d-br::after
{ right: calc(-1 * var(--gap) - 1px); }

.cursor {
    position: absolute;
    display: none;
    width: var(--gap);
    top: calc(-.5 * var(--gap));
    bottom: calc(-.5 * var(--gap));
    background: var(--link-h);
    animation: blink 1.2s infinite;
    transform: translateX(-50%);
}
.cursor.range {
    animation: none;
    transform: none;
}
.focus .cursor { display: block; }
@keyframes blink {
    0%   { opacity: .2; }
    50%  { opacity:  1; }
    100% { opacity: .2; }
}

footer {
    display: flex;
    width: 100%;
    max-width: calc(1024px + 2 * var(--gap));
    padding: .5em max(0px, var(--gap));
    margin: 0;
    gap: 2em;
    justify-content: space-between;
}
footer > .fx-col:last-of-type {
    text-align: right;
}
.footer-mailto {
    border-bottom: 1px solid #0001;
}

.mailsnail-20 {
    display: inline-block;
    position: relative;
    -webkit-mask-image: url("/img/mailsnail.png");
    mask-image: url("/img/mailsnail.png");
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    width: 1.81em;
    margin: 0 0.05em 0 -0.35em;
    background: currentcolor;
  }
