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

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

#wrapper {
	max-width: 60rem;
	margin: 0 auto;
}

#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 5%;
	padding-top: 0;
}
.inner-controls > div {
	flex: 0 1 10rem;
}

.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 h4 {
    margin: 0 0 0.5rem;
}

.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: 30%;
}
.lh span {
    width: 30%;
    display: inline-block;
    background: #f1f1f1;
    margin-right: 2%;
    padding: 0.2rem;
    font-size: small;
    color: #939393;
	border: 1px solid transparent;
}

#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) {
    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;
}

#demo_width {
	display: block;
}

#demo {
	margin-bottom: 2rem;
	width: 100%;
	min-height: 55rem;
}

#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; 
}