html {
    display: grid;
    height: 100%;
    grid-template-rows: 100%;
}
body {
	display: inherit;
	grid-template-rows: 0px 100% auto;
}
body>header, body>main {
	padding: 0;
}
body header {
	text-align: center;
    padding-inline: 80px 350px;
	z-index: 1;
}
body header > * {
	margin: 5px 0;
}
main {
	display: grid;
	grid-template-columns: minmax(0,1fr) 350px;
}
main > section {
	margin-bottom: 0;
	z-index: 2;
}
main > section:first-child {
    margin: 100px 3rem 0 calc(80px + 3rem);
}
main > section:first-child p {
    text-wrap: balance;
    text-align: center;
}
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;
    width: 100%;
}
main section:last-child a {
	text-align: center;
    display: block;
    font-size: 15px;
    padding: 0.5em 0;
}
#demo {
  min-height: 250px;
  height: 40vh;
  height: round(40vh,1px);
  background: linear-gradient(60deg,#4ECDC4,#00A0B0);
  --mask:
    radial-gradient(36.62px at 50% calc(100% - 51.00px),#000 99%,#0000 101%) calc(50% - 60px) 0/120px 100%,
    radial-gradient(36.62px at 50% calc(100% + 21.00px),#0000 99%,#000 101%) 50% calc(100% - 30px)/120px 100% repeat-x;
  -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 {
	margin-bottom: calc(var(--pico-spacing)/3);
}
fieldset:last-child {
	margin-bottom: 0;
}
form legend {
	text-decoration: underline;
	font-size: 1.2em;
}
form label {
	cursor: pointer;
}
form legend span {
	display: inline-block;
	margin-left: 10px;
}
main .code {
	overflow: auto;
	padding-bottom: 80px;
}
main .code code {
	font-size: 0.75em;
	cursor: text;
	color: var(--pico-color);
}
pre[class*=language-] {
	margin: 0;
}
.border-type {
    position: absolute;
    left: 20px;
    top: 100px;
    display: grid;
    gap: 10px;
}
.border-type label {
	position: relative;
    width: 70px;
    aspect-ratio: 1;
    display: grid;
    --mask-size: 10px;
}
.border-type label input {
    opacity: 0;
    grid-area: 1/1;
}
.border-type label span {
    position: absolute;
    left: 105%;
    top: 50%;
    translate: 0 -50%;
    white-space: nowrap;
    font-size: .9em;
    color: #fff;
    background: #000;
    padding: 2px 5px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: .3s;
}
.border-type label:hover span {
	opacity: 1;
}
.border-type label i {
    grid-area: 1/1;
    display: grid;
    border: 1px solid var(--pico-form-element-color);
    border-radius: 5px;
}
.border-type label i:before {
	content: "";
    display: grid;
    margin-bottom: 15px;
    background: var(--pico-form-element-color);
    -webkit-mask: var(--mask);
    		mask: var(--mask);
}
.border-type label input:checked + i:before {
	background: var(--pico-primary);
}
.border-type label input:checked + i {
	box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
    border: 1px solid var(--pico-primary);
}
.border-type label:nth-child(1) {
	--mask:
    radial-gradient(12.81px at 50% calc(100% - 18.00px),#000 98%,#0000 102%) calc(50% - 20px) 0/40px 100%,
    radial-gradient(12.81px at 50% calc(100% + 8.00px),#0000 98%,#000 102%) 50% calc(100% - 10px)/40px 100% repeat-x;  
}
.border-type label:nth-child(2) {
  --mask:
    radial-gradient(15.7px at 50% calc(100% + 6.60px),#0000 calc(99% - 4px),#000 calc(101% - 4px) 99%,#0000 101%) calc(50% - 24px) calc(50% - 8px + .5px)/48px 16px,
    radial-gradient(15.7px at 50% -6.6px,#0000 calc(99% - 4px),#000 calc(101% - 4px) 99%,#0000 101%) 50% calc(50% + 8px)/48px 16px;
}
.border-type label:nth-child(2)  i:before {
	margin-bottom: 0;
}
.border-type label:nth-child(3) {
	--mask:
    radial-gradient(15.7px at calc(100% + 6.60px) 50%,#0000 calc(99% - 4px),#000 calc(101% - 4px) 99%,#0000 101%) calc(50% - 8px + .5px) calc(50% - 24px)/ 16px 48px,
    radial-gradient(15.7px at -6.6px 50%,#0000 calc(99% - 4px),#000 calc(101% - 4px) 99%,#0000 101%) calc(50% + 8px) 50%/16px 48px;
 }
.border-type label:nth-child(3)  i:before {
	margin-bottom: 0;
}
@media (max-width: 850px) {
	html {
		height: auto;
		min-height: 100%;
	}
	body {
		grid-template-rows: auto auto 1fr;
	}
	body header {
		padding: 0;
		order: -2;
	}
	main {
		grid-template-columns: 1fr;
	}
	main .code {
		padding-bottom: 15px;
	}
	.grid {
		grid-template-columns: repeat(2,minmax(0,1fr));
	}
	main > section:first-child {
	    width: 100%;
	    padding: 25px;
	    margin: auto;
	}
	main section:last-child {
		height: auto;
	}
	.border-type {
	    position: static;
	    display: flex;
	    justify-content: center;
	}
	.border-type label span {
		bottom: 105%;
		left: 50%;
		top: auto;
		translate: -50% 0;
	}
	form {
		display: grid;
	}
}