* {
    margin: 0 0;
    padding: 0 0;
    box-sizing: border-box;
	display: grid;
	outline: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

script, head {
  display: none;
}

html {
    font-family: "Comfortaa", sans-serif;
    width: 100vw;
    justify-content: center;
}

@media screen and (max-width: 768px) {
    html {
        font-size: 12px;
    }
}

@media screen and (max-width: 368px) {
    html {
        font-size: 9px;
    }
}

body {
    background: #F9FDFD;
	width: 100%;
    height: 100vh;
    display: grid;
    overflow-x: hidden;
    justify-self: center;
    justify-content: center;
}

.central {
	width: 100%;
    height: min-content;
    max-width: 70rem;
	text-align: center;
    user-select: none;
    justify-self: center;
    padding: 4rem 2rem 6rem 2rem;
}

.title-box {
    grid-column: 1;
	width: 100%;
    height: min-content; 
    margin-bottom: 2rem;   
}

#help-button {
    justify-self: center;
    align-self: center;
    border: none;
    background: transparent;
    border: 0.19rem solid #8decd3;
    border-radius: 1rem;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    padding: 0.38rem;
    transition: transform 0.12s ease-out;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    margin-top: -3rem;
    transform: translateY(-1.6rem) scale(1);
    justify-self: right;
}

#help-button:active {
    transform: translateY(-1.45rem) scale(0.95);
}

#help-button:focus,
#help-button:hover {
    border: 0.19rem solid #44EBF8;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    outline: none;
}

#help-button svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#help-button svg path {
    stroke: black;
    stroke-width: 7;
    transition: stroke-dasharray 0.44s, stroke-dashoffset 0.44s;
    will-change: stroke-dasharray, stroke-dashoffset;
}

.kf1 #dot {
    stroke-dasharray: 12.5 190;
    stroke-dashoffset: 0;
}

.kf2 #dot {
    stroke-dasharray: 58 190;
    stroke-dashoffset: -102;
}

.kf3 #dot {
    stroke-dasharray: 12.5 177;
    stroke-dashoffset: -190;
}

.kf1 #qmark {
    stroke-dasharray: 97 207;
    stroke-dashoffset: -112;
}

.kf2 #qmark {
    stroke-dasharray: 58 207;
    stroke-dashoffset: 0;
}

.kf3 #qmark {
    stroke-dasharray: 97 112;
    stroke-dashoffset: 97;
}

#help-text {
    margin-top: 2rem;
    text-align: left;
    transition: opacity 0.44s;
    text-align: justify;
}

#help-text.hide {
    opacity: 0;
    position: fixed;
    transform: translateY(-10000px);
}

h2 {
	font-size: 3rem;
}

p {
    user-select: none;
}

.maths {
    font-weight: normal;
    font-family: freeserif, "times new roman", serif;
    font-style: italic;
    display: inline;
    margin: 0 0.5rem;
}

.maths sup {
    display: inline;
    font-size: 0.85em;
}

.maths sub {
    display: inline;
    font-size: 0.71em;
}

.maths em {
    font-style: normal;
    display: inline;
    font-size: 0.95em;
}

.maths .under {
    position: absolute;
    display: inline;
    overflow: visible;
    transform: translateY(72%) translateX(-120%) scale(0.75);
}

.maths .small {
    font-size: 0.91em;
    display: inline;
}

.graph-box {
    grid-column: 1;
	display: block;
    margin-bottom: 1.32rem;
    height: min-content;    
}

.graph-box canvas {
	width: 100%;
	height: min(30rem, 50vh);
    touch-action: none;
}

.ui-box {
    grid-column: 1;
    height: min-content;    
}

#drag-handle {
    grid-column: 1;
}

#drag-handle-line {
    height: 3rem;
    justify-self: center;
    align-self: center;
    display: none;
    transform: translateX(0.7rem);
}


@media screen and (min-width: 1200px) {

    .central {
        max-width: 100vw;
        width: 100vw;
        height: 100%;
        padding: 0;
        grid-template-rows: max-content auto;
        grid-template-columns: 40rem auto;
    }

    .graph-box {
        grid-row: 1/3;
        grid-column: 3;
        border-left: 0.1rem solid black;
        position: sticky;
        top: 0; 
        margin-bottom: 0;
    }

    .graph-box canvas {
        height: 100vh;
    }

    .title-box {
        grid-row: 1;
        grid-column: 1;
        padding: 2rem;
        padding-top: 3rem;
        padding-right: 0;
        margin-bottom: -2rem;
    }

    .ui-box {
        grid-row: 2;
        grid-column: 1;
        padding: 2rem;
        padding-right: 0;
        min-width: 30rem;
    }

    #drag-handle {
        grid-column: 2;
        grid-row: 1/3;
        width: 2rem;
        height: 100vh;
        position: sticky;
        top: 0; 
        cursor: ew-resize;
    }

    #drag-handle-line {
        display: grid;
    }
}

.dropdown {
    text-align: center;
    height: calc(6px + 1.6rem + 1rem + 1.4rem);
    background: transparent;
    align-content: center;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    display: grid;
    min-width: 10rem;
}

.dropdown .inner {
    width: 100%;
    font-size: 1rem;
    line-height: 1;
    border: 0.19rem solid #8decd3;
    border-radius: 1rem;
    align-content: center;
    padding: 0.8rem 0rem;
    position: absolute;
    background: #F9FDFD;
    z-index: 1;
    display: grid;
    will-change: height;
}

.dropdown .inner:hover {
    border: 0.19rem solid #44EBF8;
}

.dropdown .inner:focus-within,
.dropdown .inner:focus {
    box-shadow: 0 0 0 0.125rem #44EBF8;
}

.dropdown p {
    height: calc(1.4rem + 1rem);
    padding: 0.7rem 0;
    line-height: 1;
    transform: scale(1);
    opacity: 1;
    transition: opacity 0.132s, transform 0.132s, height 0.22s, padding 0.22s;
    will-change: height;
}

.dropdown .hidden {
    height: 0rem;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.dropdown p:hover,
.dropdown p:focus {
    transform: scale(1.2);
}

.button-titles {
    grid-template-columns: 1fr minmax(10rem, 1fr) 1fr;
    grid-gap: 1.12rem;
    margin-bottom: 0.7rem;
}
  
.button-box {
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 1.12rem;
    grid-row-gap: 1.32rem;
    margin-bottom: 1.32rem;
}

.button-box h3 {
	margin-bottom: 1.2rem;
}

#points-holder {
    position: relative;
    height: 100%;
}

#points-textarea {
    resize: vertical;
    background: #F9FDFD;
    z-index: 2;
    position: absolute;
    width: 100%;
    min-width: 100%;
    height: 100%;
    transition: height 0.22s, min-width 0.22s;
    will-change: height, width;
    transform: translateZ(0);    
    font-size: 1rem;
    white-space: pre-wrap;
}

#points-textarea::-webkit-scrollbar {
    display: none;
}

.equation-label {
    display: inline;
    font-size: 1.7rem;
    font-weight: bold;
    margin: 0.5rem 0;
    align-self: center;
    height: 2rem;
    align-content: center;
}

@media screen and (max-width: 768px) {
    .equation-label {
        font-size: 1.2rem;
    }

    #fourierseries-label {
        font-size: 0.9rem;
    }
}

.options {
    width: 100%;
	display: none;
	align-items: center;
	justify-self: center;
	justify-items: left;
	grid-gap: 1.12rem;
    grid-template-columns: 12rem auto 6rem;
    grid-column: 1 / 4;
}

.options .equation-label {
    grid-column: 1/3;
    justify-self: center;
}

.options h4 {
	grid-column: 1;
    align-self: center;
    justify-self: center;
}

input[type=number],
input[type=text] {
	padding: 0.5rem 0.9rem;
    border: 0.19rem solid #8decd3;
	border-radius: 1rem;
    background: transparent;
	text-align: center;
	justify-self: center;
    width: 100%;
	font-family: "Comfortaa", sans-serif;
	font-size: 1rem;
}

input[type=number]:hover,
input[type=text]:hover {
	border: 0.19rem solid #44EBF8;	
}

input[type=number]:focus,
input[type=text]:focus {
	box-shadow: 0 0 0 0.125rem #44EBF8;
} 

.options textarea {
    width: 100%;
    grid-column: 2 / 4;
}

.var-slider-holder {
    grid-column: 1 / 4;
    width: 100%;
    grid-gap: 1.12rem;
    grid-template-columns: 2rem auto 8rem;
    align-items: center;
}

.var-slider-holder input {
    text-align: left;
}

button {
    padding: 0.5rem 0.9rem;
    border: 0.19rem solid #8decd3;
    border-radius: 1rem;
    background: transparent;
    text-align: center;
    justify-self: center;
    width: 100%;
    font-family: "Comfortaa", sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    border: 0.19rem solid #44EBF8;  
}

button:focus {
    box-shadow: 0 0 0 0.125rem #44EBF8;
} 

#reset-vars {
    grid-column: 2/4;
    justify-self: right;
    width: 8rem;
    margin-bottom: -2rem;
}

.codes {
	padding-top: 0.9rem;
	grid-template-columns: 5rem 1fr;
	grid-gap: 1rem 2rem;
	padding-bottom: 2.5rem;
}

textarea {
    padding: 1rem;    
    font-size: 1rem;
    background: transparent;
    border: 0.19rem solid #8decd3;
	border-radius: 1rem;
    font-family: Consolas, monospace;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

textarea::-webkit-scrollbar {
    display: none;
}

.codes textarea {
    grid-column: 2;
}

textarea:hover {
	border: 0.19rem solid #44EBF8;
}

textarea:focus {
	box-shadow: 0 0 0 0.125rem #44EBF8;
} 

.codes h4 {
	grid-column: 1;
	text-align: center;
	align-self: center;
	justify-self: center;
}

#variable-name-input {
    width: 16rem; 
    font-size: 1rem;
    justify-self: left; 
    text-align: left;
    font-family: Consolas, monospace;
}

a {
    padding: 0.22rem;
	text-decoration: none;
    color: #8decd3;
}

a:hover {
	color: #44EBF8;
}

a:visited {
	color: #44EBF8;
}


input[type=range] {
    -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
    width: 100%; /* Specific width is required for Firefox. */
    background: transparent; /* Otherwise white in Chrome */
    height: 1.5rem;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
}

/* Special styling for WebKit/Blink */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 1.7rem;
    width: 1.7rem;
    border-radius: 0.6rem;
    background-color: #F9FDFD;
    cursor: pointer;
    margin-top: -0.6rem; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    border: 0.19rem solid #8decd3;
}
   
input[type=range]:hover::-webkit-slider-thumb {
    border: 0.19rem solid #44EBF8;
}

input[type=range]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.125rem #44EBF8;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.5rem;
  cursor: pointer;
  background-color: #D6F6EE;
  border-radius: 0.25rem;
}

/* All the same stuff for Firefox */
input[type=range]::-moz-range-thumb {    
    height: 1.7rem;
    width: 1.7rem;
    border-radius: 0.6rem;
    background-color: #F9FDFD;
    cursor: pointer;
    border: 0.19rem solid #8decd3;
}
   
input[type=range]:hover::-moz-range-thumb {
    border: 0.19rem solid #44EBF8;
}

input[type=range]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.125rem #44EBF8;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 0.5rem;
    cursor: pointer;
    background-color: #D6F6EE;
    border-radius: 0.25rem;
}