*, *::before, *::after {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html {
	font-size: 125%;
}
body {
	min-width: 18rem;
	padding: 0;
	margin: 0;
}

#wrapper {
	display: flex;
	margin: 0 auto;
}

.sidebar {
	width: 32.3rem;
	position: sticky;
	top: 0;
	height: fit-content;
}

.content {
	width: calc(100% - 32.3rem);
	margin-left: -1px;
}

#controls,
#output,
#demo_controls,
#demo {
	border: 1px solid;
}

summary,
.inner-controls,
#demo_controls,
#demo {
	padding: 1rem;
}

summary {
	cursor: pointer;
}

.inner-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding-top: 0;
}

.inner-controls > div {
	flex: 0 1 30%;
}

.inner-controls > div,
label {
	font-size: 0.8rem
}

#font_family {
	flex: 1 1 100%;
}

#font_family label {
	display: inline-block;
	margin: 0 2rem 0.5rem 0;
}

.font-control {
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
	padding: 0.2rem;
}

.font-control h4 {
	margin: 0 0 0.5rem;
	width: 100%;
}

.fs::after {
	content: 'px';
	position: absolute;
	right: 1.2rem;
	top: 0;
	bottom: 0;
	margin: auto;
	height: fit-content;
	opacity: 0.3;
}
.fs {
	width: 48%;
	display: inline-block;
	position: relative;
}
.fs input {
	width: 2rem;
	width: -webkit-fill-available;
	text-align: center;
}
.lh {
	margin-top: 0.5rem;
	display: block;
}
.lh input {
	width: 26%;
}
.lh span {
	width: 22%;
	display: inline-block;
	background: #f1f1f1;
	margin-right: 0;
	padding: 0.2rem;
	font-size: small;
	color: #939393;
	border: 1px solid transparent;
}

/* Additional Sizes box */
.font-control.additional-sizes {
	display: flex;
	flex-wrap: wrap;
}

.additional-sizes label {
	flex: 1 1 33%;
	display: flex;
	border: 1px solid;
	align-items: center;
	justify-content: center;
	margin-bottom: -1px;
	margin-right: -1px;
}

/* Output Section */
#output {
	margin-bottom: -1px;
}

#output_wrapper table {
	margin: 0 0 1rem 2rem;
	width: calc(100% - 4rem);
	border-collapse: collapse;
}

#output_wrapper tr:nth-child(even of :not(.hidden)) {
	background: rgba(41, 58, 106, 0.03);
}

#output_wrapper th {
	position: relative;
	font-style: italic;
	font-weight: 400;
	font-size: 1rem;
	text-align: left;
	padding: 0.4rem 0.8rem 1.5rem 0.8rem;
}

th::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 0.3rem;
	height: 1.85rem;
	background: #C4C4C4;
}

#output_wrapper td {
	padding: 0.8rem;
}

#demo_controls {
	margin-bottom: -1px;
	position: sticky;
	top: 0;
	background: #fff;
	padding: 0.3rem 1rem;
}

.content-width-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 17rem;
}

#demo_width {
	display: block;
}

#demo {
	width: 100%;
	min-height: 100rem;
	border-bottom: none;
}

#demo.loaded * {
	transition: font-size .3s, line-height .3s;
}

#demo h1, #demo h2, #demo h3, #demo h4, #demo h5, #demo h6 {
	font-weight: 400;
	font-family: var(--headerFont);
}
#demo p {
	font-family: var(--bodyFont);
}

/* Autocomplete */
/*the container must be positioned relative:*/
.autocomplete {
position: relative;
display: inline-block;
}

input {
border: 1px solid transparent;
background-color: #f1f1f1;
padding: 0.2rem;
}

input[type=text] {
background-color: #f1f1f1;
width: 100%;
}

.autocomplete-items {
position: absolute;
border: 1px solid #d4d4d4;
border-bottom: none;
border-top: none;
z-index: 99;
/*position the autocomplete items to be the same width as the container:*/
top: 100%;
left: 0;
right: 0;
}

.autocomplete-items div {
padding: 10px;
cursor: pointer;
background-color: #fff; 
border-bottom: 1px solid #d4d4d4; 
}

/*when hovering an item:*/
.autocomplete-items div:hover {
background-color: #e9e9e9; 
}

/*when navigating through the items using the arrow keys:*/
.autocomplete-active {
background-color: DodgerBlue !important; 
color: #ffffff; 
}

/* Visibility of new controls */
.hidden {
	display: none;
}