
:root{
    --acc-color: darkgrey;
    --border-width: 1px;
    --fs: 2.5em;
    --border: var(--border-width) solid var(--acc-color);
}

/*  LAYOUT
===================================================================== */

body{
    display: grid;
    background-color: whitesmoke;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;

    display: grid;
    grid-template-rows: min-content 1fr;

    line-height: 1.5;
    font-family: monospace;
    text-transform: lowercase;
    font-size: var(--fs);
}

body > header{
    padding: 1em;
    background-color: var(--acc-color);
    border-bottom: var(--border);
    
    font-weight: bold;
}

body > main{
    padding: 0 1em 1em;
    /*! display: grid; */
    /*! grid-template-columns: .5fr 1fr 1fr; */
    /*! grid-row: auto; */
    gap: 1em;
    overflow: hidden;
}

section{
    /*! display: grid; */
    grid-template-rows: .1fr 1fr;
    overflow: hidden;

    position: relative;
    width: 100%;
}
section > header{
    /*! display: grid; */
    grid-template-columns: auto 1fr;
    gap: 1em;
    align-items: baseline;
    /*! padding-top: 1em; */
    /*! margin: auto; */
}
section > header button{
    display: block;

    line-height: 1.5;
    font-family: monospace;
    text-transform: lowercase;
    font-size: var(--fs);

    padding: 0.5em 1em;
    border: var(--border);
    background-color: var(--acc-color);
    cursor: pointer;
    border-radius: 5em;

    font-weight: bold;
    margin: auto;
    margin-top: 20vh;
}
section > header label{
    color: grey;
    padding-top: calc(var(--border-width) + 0.5em);
    display: block;
}

/* section > header label::before{
    content: '(';
}
section > header label::after{
    content: ')';
} */

a, a:visited{
    color: currentColor;
}


/*  STDOUT
===================================================================== */

.stdout{
    /*! background: white; */
    /*! border: var(--border); */
    margin-top: 1em;
    white-space: pre;
    font-family: monospace;
    line-height: initial;
    overflow: auto;
    padding: 0.5em;
    text-align: center;
}
.stdout hr{
    border: none;
    border-bottom: var(--border);
}


/*  loading state
===================================================================== */

section > .loading{
    position: absolute;
    inset: 0;
    pointer-events: none;

    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
}
section.running > *:not(.loading){
    opacity: 0.5;
}
section.running > .loading::after{
    content: "waiting for server response...";
    display: inline-block;
    background: #666;
    color: white;
    z-index: 1;
    padding: 1em;
    border-radius: 5em;
}

label {
    text-align: center
}

section.done > .stdout {
    color: green;
}

section.running > .stdout {
    color: orange;
}