:root {
  --color: black;
  --bg-color: white;
  --focus-border-color: rgb(27, 134, 240);
  --focus-shadow-color: rgba(81, 162, 243, 0.5);
}

*,
*::before,
*::after {
  color: var(--color);
  background-color: var(--bg-color);
}

/* @media (prefers-color-scheme: dark) {
  :root {
    --color: white;
    --bg-color: #111;
  }
} */

.night,
.night * {
  --color: white;
  --bg-color: #111;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  padding-block: 1em;
  padding-inline: 2em;
  display: flex;
  flex-wrap: wrap;
  column-gap: 5em;
}

ul {
  margin: 0;
  padding: 0;
}

input {
  background-color: white;
  color: black;
}

input::selection {
  background-color: black;
  color: white
}

input[type=reset] {
  display: block;
  border-width: 1px;
  border-style: solid;
  border-color: var(--color);
  border-radius: .2em;
  cursor: pointer;
  background-color: var(--bg-color);
  color: var(--color);
  font: 1rem serif;
}

button {
  cursor: pointer;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: .1em;
  background-color: var(--bg-color);
  font: 1rem serif;
  color: var(--color);
}

:focus {
  border-width: 2px;
  border-style: solid;
  border-color: var(--focus-border-color);
  border-radius: .1em;
}

input[type=reset]:hover,
button:hover,
:focus {
  outline: .1em solid var(--bg-color);
  box-shadow: 0 0 0 .2em var(--focus-shadow-color);
}

.steps-section {
  width: 20em;
  padding-block: 1.2em;
}

#form {
  /* width: 16em; */
  display: flex;
  flex-direction: column;
  gap: .5em;
}

.input-group {
  padding: .5em;
  display: flex;
  flex-direction: column;
  border: 1px solid gray;
}

.input-group:not(:last-child) {
  margin-bottom: .5em;
}

.input-group label {
  margin-bottom: .3em;
}

.feedback {
  display: none;
  margin-top: .4em;
  font-size: .9rem;
}

input:valid~.feedback.valid {
  display: initial;
}

input:invalid~.feedback.invalid {
  display: initial;
  font-style: italic;
}

#form h4 {
  margin-top: 0;
  margin-bottom: .5em;
}

#form fieldset {
  /* height: 4em; */
  display: flex;
  flex-direction: column;
}

#solution {
  list-style-type: none;
}

#solution>li:not(:last-child) {
  margin-bottom: 1em;
}

#solution h4 {
  margin-bottom: .5em;
}

.placeholder {
  margin-top: 1em;
  font-style: italic;
}

.search-bar {
  margin-bottom: 1.2em;
  display: flex;
  flex-direction: column;
  gap: .5em;
  overflow: visible;
}

#search-form {
  width: fit-content;
  display: flex;
  gap: .5em;
  overflow: visible;
}

#search-form>* {
  margin-block: .1em;
}

.show-more {
  position: relative;
  translate: 0 -55%;
  padding-inline: 1em;
}

.questions {
  width: 20em;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.question {
  padding-block: 1.2em;
}

.question:first-child {
  padding-top: 0;
}

.question h4 {
  margin-top: 0;
  margin-bottom: .5em;
}

.question:not(:last-child) {
  border-bottom: 1px solid var(--color);
}

.answers {
  padding-left: 1.5em;
  list-style-type: disc;
}

.answer.correct {
  font-weight: bold;
}

#theme-toggle {
  position: absolute;
  top: 1em;
  left: 2em;
  /* height: 1.3em; */
  aspect-ratio: 1/1;
  border: 2px solid transparent;
  outline: .1em solid transparent;
  box-shadow: 0 0 .2em transparent;
  opacity: .5;
}


#theme-toggle:hover {
  opacity: 1;
}

noscript {
  color: red;
}

.hidden {
  display: none;
}