:root {
	--font-size: 17px;
}
html {
    display: grid;
    height: 100%;
    grid-template-rows: 100%;
}
body {
	display: inherit;
	grid-template-rows: 0px 1fr auto;
}
body>header, body>main {
	padding: 0;
}
body header {
	text-align: center;
	padding-right: 350px;
}
body header > * {
	margin: 5px 0;
}
h1 {
	font-style: normal;
    font-weight: 700;
    font-size: 50px;
    font-family: 'Montserrat', sans-serif;
    line-height: 56px;
    text-transform: none;
    letter-spacing: -2px;
    color: #505050;
    white-space: nowrap;
}
@media only screen and (prefers-color-scheme: dark) {
	h1 {
		color:#fff;
	}
}
h1 span {
    font-size: 70px;
    vertical-align: middle;
}
h1 span:first-child {
    letter-spacing: -14px;
}
h1 span:nth-child(2) {
    position: relative;
    letter-spacing: -15px;
    z-index: 1;
}
h1 span:nth-child(3) {
    color: #c39f76;
    filter: blur(2px);
}
h1 span:nth-child(2):before {
    content: "";
    position: absolute;
    top: 10px;
    height: 28px;
    border-left: 1.5px solid var(--background-color);
    border-top: 1.5px solid var(--background-color);
    width: 44px;
    left: 2px;
    border-top-left-radius: 41px 24px;
}
h1 span:nth-child(2):after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 4.5px;
    height: 37px;
    border-left: 1.5px solid var(--background-color);
    z-index: 5;
}
body header h1 + p {
	text-indent: 130px;
    margin-top: -22px;
    font-size: 15px;
}
[data-ea-publisher] {
    position: fixed;
    width: fit-content;
    inset: auto 350px 0 45px;
    margin: auto;
    text-align: center;
}
a.tweet {
    background-color: #1095c1;
    border-radius: 0 50px 50px 0;
    display: grid;
    place-content: center;
    width: 46px;
    height: 46px;
    position: fixed;
    left: 0;
    bottom: 70px;
    box-shadow: rgb(0 0 0 / 40%) 0px 4px 8px;
}
a.how {
    bottom: 130px;
    color: #fff;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 40px;
    text-decoration: none;
}
.credit {
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    transform-origin: right top;
    transform: translate(-30%) rotate(-45deg);
    color: #fff;
    border-image: linear-gradient(var(--primary) 0 0) fill 0//0 100vw;
    text-decoration: none;
}
main {
	display: grid;
	grid-template-columns: minmax(0,1fr) 350px;
}
main > section {
	margin-bottom: 0;
	z-index: 2;
}
main > section:first-child {
	border: 2px dashed ;
	padding: 50px;
	margin: 160px auto auto;
	width: 70%;
	height: 50%;
	max-height: 100%;
	max-width: 100%;
	min-width: 300px;
	min-height: 200px;
	overflow: hidden;
	resize: both;
	position: relative;
}
main > section:first-child:before {
    content: "Resize me";
    position: absolute;
    bottom: 8px;
    right: 39px;
    font-size: 15px;
}
main > section:first-child:after {
    content: "";
    position: absolute;
    width: 20px;
    aspect-ratio: 1;
    right: 10px;
    bottom: 3px;
    background: 
    	conic-gradient(from 90deg at 2px 2px,currentColor,#0000 1deg 90deg,currentColor 91deg) 0 0/50% 50%,
    	linear-gradient(45deg, #0000 calc(50% - 2px),currentColor ,#0000 calc(50% + 2px));
    background-repeat: no-repeat;
    transform: rotate(160deg);
}
main section:last-child {
    display: grid;
    grid-auto-rows: auto minmax(0,1fr);
    height: 0;
    min-height: 100%;
}
main section:last-child button {
	margin: 0;
	font-size: 1em;
    padding: 10px;
}
#demo {
  height: 100%;
}

.cut-1,
.cut-1 {
  background: linear-gradient(135deg,#1f005c, #5b0060, #870160, #ac255e, #ca485c, #e16b5c, #f39060, #ffb56b) fixed;
  --g: #0000 98%,#000;
  --s: 51% 51% no-repeat;
  --mask: 
     radial-gradient(circle 40px at 0    0   ,var(--g)) 0    0   /var(--s),
     radial-gradient(circle 40px at 100% 0   ,var(--g)) 100% 0   /var(--s),
     radial-gradient(circle 40px at 100% 100%,var(--g)) 100% 100%/var(--s),
     radial-gradient(circle 40px at 0%   100%,var(--g)) 0    100%/var(--s);
  -webkit-mask: var(--mask);
          mask: var(--mask);
}

.cut-2 {
  position: relative;
  z-index: 0;
}
.cut-2:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg,#1f005c, #5b0060, #870160, #ac255e, #ca485c, #e16b5c, #f39060, #ffb56b) fixed;	
  -webkit-mask: var(--mask);
          mask: var(--mask);
}

.cut-3-1 {
   background: linear-gradient(135deg,#1f005c, #5b0060, #870160, #ac255e, #ca485c, #e16b5c, #f39060, #ffb56b) fixed;
   clip-path: var(--c);
}
.cut-3-2 {
  background: linear-gradient(135deg,#1f005c, #5b0060, #870160, #ac255e, #ca485c, #e16b5c, #f39060, #ffb56b) fixed;
  -webkit-mask: var(--mask);
          mask: var(--mask);
}

.cut-4 {
   background: linear-gradient(135deg,#1f005c, #5b0060, #870160, #ac255e, #ca485c, #e16b5c, #f39060, #ffb56b) fixed;
   clip-path: var(--c);
}
.cut-4-1 {
  background: linear-gradient(135deg,#1f005c, #5b0060, #870160, #ac255e, #ca485c, #e16b5c, #f39060, #ffb56b) fixed;
  -webkit-mask: var(--mask);
          mask: var(--mask);
}
main article {
	margin: 0;
    padding-block: 10px;
    text-align: center;
    border-radius: 0;
}
main article form {
	text-align: left;
	margin-bottom: 0;
}
fieldset:last-child {
	margin-bottom: 0;
}
form legend {
	text-decoration: underline;
	font-size: 1.2em;
}
form label {
	cursor: pointer;
    white-space: nowrap;
}
form legend span {
	display: inline-block;
	margin-left: 10px;
}
form fieldset {
	margin:  0;
}
[style*="display"][style*="none"] + hr {
	display: none;
}

main .code {
	overflow: auto;
}
main .code code {
	font-size: 0.75em;
	cursor: text;
	color: var(--color);
}
pre[class*=language-] {
	margin: 0;
}
.toolbar {
    position: sticky;
    bottom: 0;
}
.corners {
    position: fixed;
    inset: 100px 440px auto 90px;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(4,auto);
    justify-content: center;
    gap: 15px;
    max-width: max-content;
    margin: auto;
}
.corners legend {
	font-size: 0.9em;
}
.code-e {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.border-type {
    position: fixed;
    z-index: 3;
    left: 20px;
    top: 130px;
    display: grid;
    grid-gap: 10px;
}
.border-type label {
    width: 70px;
    aspect-ratio: 1;
    display: grid;
    --mask-size: 18px;
}

.border-type label input {
    opacity: 0;
    grid-area: 1/1;
}
.border-type label i {
    grid-area: 1/1;
    display: grid;
    border: 1px solid var(--form-element-color);
    border-radius: 5px;
}
.border-type label i:before {
	content: "";
    display: grid;
    margin: 5px;
    background: var(--form-element-color);
    -webkit-mask: var(--mask);
    		mask: var(--mask);
}
.border-type label input:checked + i:before {
	background: var(--primary);
}
.border-type label input:checked + i {
	box-shadow: 0 0 0 var(--outline-width) var(--form-element-focus-color);
    border: 1px solid var(--primary);
}
.border-type label:nth-child(1) {
	--mask: radial-gradient(circle var(--mask-size),#0000 98%,#000) 10000% 10000%/99.5% 99.5%;
}
.border-type label:nth-child(2) {
	--b: 5px;
	--g:#000 var(--b),#0000 0 calc(100% - var(--b)),#000 0;
	--mask:
	 radial-gradient(var(--mask-size),#0000 calc(98% - var(--b)),#000 calc(100% - var(--b)) 98%,#0000) 
       10000% 10000%/99.5% 99.5%, 
     linear-gradient(90deg,var(--g)) 50%/100% calc(100% - 2*var(--mask-size) + var(--b)) no-repeat,
     linear-gradient(      var(--g)) 50%/calc(100% - 2*var(--mask-size) + var(--b)) 100% no-repeat
}

.border-type label:nth-child(3) i:before{
   	clip-path: polygon(var(--mask-size) 0,calc(100% - var(--mask-size)) 0,100% var(--mask-size),100% calc(100% - var(--mask-size)),calc(100% - var(--mask-size)) 100%,var(--mask-size) 100%,0 calc(100% - var(--mask-size)),0 var(--mask-size));
}
.border-type label:nth-child(4) {
  --b:  5px;
  --g1:#000 var(--b),#0000 0 calc(100% - var(--b)),#000 0;
  --g2:#0000   calc(0.707*var(--mask-size)), 
       #000  0 calc(0.707*var(--mask-size) + var(--b)),
       #0000 0 calc(100% - 0.707*var(--mask-size) - var(--b)),
       #000  0 calc(100% - 0.707*var(--mask-size)),
       #0000 0;
  --mask:
    linear-gradient(45deg ,var(--g2)),
    linear-gradient(-45deg,var(--g2)),
    linear-gradient(90deg ,var(--g1)) 50%/100% calc(100% - 2*var(--mask-size)) no-repeat,
    linear-gradient(180deg,var(--g1)) 50%/calc(100% - 2*var(--mask-size)) 100% no-repeat;
}

@media (max-width: 900px) {
	html {
		height: auto;
		min-height: 100%;
	}
	body {
		grid-template-rows: auto auto 1fr;
	}
    [data-ea-publisher] {
        position: static;
        order: -1;
    }
	body header {
		padding-right: 0;
        order: -2;
	}
	main {
		grid-template-columns: 1fr;
	}
	.corners {
	   position: static;    
	   grid-column: 1/-1;
	   grid-template-columns: repeat(2, 1fr);
 	   max-width: 100%;
 	   text-align: left;
 	   justify-content: start;
 	   margin:  0 0 var(--spacing);
	}
	.corners legend {
	   font-size: 1.2em;
	}
    .corners label:nth-last-of-type(2) {
        order:2;
    }
	body footer {
		display: none;
	}
	main > section:first-child {
		resize: none;
	    width: 100%;
	    border: none;
	    padding: 25px;
	    margin: auto;
	}
	main section:last-child {
		height: auto;
	}
	main > section:first-child:before,
	main > section:first-child:after {
		content: none;
	}
	.border-type {
	    position: static;
	    display: flex;
	    justify-content: center;
	}
	form {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-gap: 5px;
	}
	form hr {
		display: none;
	}
	form > :first-child,
	form > :last-child,
	form > .angle {
		grid-column: 1/-1;
	}
    fieldset:not([style]):has(+ [style*=none]) {
        grid-column: 1/-1;
    }
    .credit {
        position: relative;
        transform: none;
        color: var(--primary);
        border-image: none;
        padding: 20px;
        text-align: center;
    }
}
@media (max-width: 400px) {
    h1 {
        font-size: 40px;
    }
    body header h1 + p {
        font-size: 12px;
    }
}