body {
  max-width: 800px;
}

main {
  margin-bottom: 4rem;
  margin-top: 1rem;
}

.logo {
  display: block;
  font-family: "Iceland", "Inria Sans", sans-serif;
  font-size: 2rem;
  text-decoration: none;
  color: var(--text-col);
  padding: 0;
}

.logo::after {
  display: inline-block;
  content: ".";
  font-size: 3.5rem;
  line-height: 0;
  height: 4rem;
  color: var(--accent-col);
}

.proj-linking a {
  padding-right: 10px;
  margin-right: 10px;
  position: relative;
  color: var(--faded-text-col);
  text-decoration: none;
}

.proj-linking a:hover {
  text-decoration: underline;
}
.proj-linking a::after,
.proj-linking a::before {
  position: absolute;
  right: 0;
  top: 50%;
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--faded-text-col);
  border-bottom: 1px solid var(--faded-text-col);
  transform: translate(0px, -50%) rotate(-45deg);
}

.proj-linking a::before {
  transform: translate(4px, -50%) rotate(-45deg);
}

header > div {
  display: flex;
}

.proj-header h1 {
  flex-grow: 1;
  font-size: 2rem;
  margin: 0;
}

.proj-header button {
  background: none;
  border: 2px solid var(--faded-text-col);
  color: var(--faded-text-col);
  padding: 5px 10px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.proj-header .completed-btn {
  background: var(--accent-col);
  color: var(--text-col);
  border-color: var(--accent-col);
}
.proj-header button p {
  margin: 0;
  padding-left: 2px;
  color: inherit;
}
.proj-header button i {
  width: 20px;
}
.completed-btn span {
  display: none;
  align-items: center;
}
.completed-btn.completed:not(.loading) .completed-inner {
  display: flex;
}

.completed-btn.uncompleted:not(.loading) > .uncompleted-inner {
  display: flex;
}

.completed-btn.loading > .loading-inner {
  display: flex;
}

.loading-inner > i {
  border: 3px solid rgba(255, 255, 255, 0);
  border-top: 2px solid var(--faded-text-col);
  border-bottom: 2px solid var(--faded-text-col);
  border-radius: 50%;
  width: 10px !important;
  height: 10px !important;
  animation: centered-spin 1.2s linear infinite;
}

@keyframes centered-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.proj-header button:hover {
  border-color: var(--text-col);
  color: var(--text-col);
  cursor: pointer;
}

.selection {
}
.selection button {
  border: 2px solid var(--faded-text-col);
  background: none;
  color: var(--faded-text-col);
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 1rem;
  margin-right: 1rem;
  font-family: inherit;
}

main.video .selection button#walkthrough-section-btn {
  background: var(--text-col);
  border: 2px solid var(--text-col);
  color: var(--bg-col);
}
main:not(.video) .selection button#steps-section-btn {
  background: var(--text-col);
  border: 2px solid var(--text-col);
  color: var(--bg-col);
}

.selection button:hover {
  border: 2px solid var(--faded-text-col);
  color: var(--faded-text-col);
  cursor: pointer;
}

.selection button.active {
  border: 2px solid var(--faded-text-col);
  background: var(--faded-text-col);
  color: var(--bg-col);
}

main.video > .steps {
  display: none;
}
main:not(.video) > .walkthrough {
  display: none;
}
.steps ul {
  padding: 0;
  margin: 0;

  counter-reset: step-counter;
}

.steps li {
  background: #0003;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
}
.steps li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: relative;
  width: 40px;
  min-width: 40px;
  height: 50px;
  background: var(--panel-col);
  border: 1px solid var(--panel-outline);
  border-radius: 10px;
  font-size: 2rem;
  color: var(--secondary-text-col);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 1rem;
}

.markdown details {
  border-radius: 10px;
  border: 1px solid var(--panel-outline);
  border-top: none;
  border: 1px solid var(--panel-outline);
}

.markdown details > :not(summary) {
  padding: 10px;
}

.markdown details summary:before {
  content: "";
  width: 8px;
  height: 8px;
  display: block;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translate(0, -50%) rotate(45deg);
  border-right: 2px solid var(--faded-text-col);
  border-top: 2px solid var(--faded-text-col);
  transition: 100ms ease-in-out transform;
}
.markdown details[open] summary:before {
  transform: translate(2px, calc(-50% - 3px)) rotate(135deg);
}
.markdown summary {
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 10px;
  position: relative;
  display: block;
  list-style: none;
  padding-left: 35px;
}

.markdown summary:hover {
  background: var(--panel-outline);
  cursor: pointer;
}
.walkthrough,
.steps {
  margin-top: 2rem;
}
.walkthrough video {
  border-radius: 1rem;
  border: 1px solid var(--panel-col);
}

.walkthrough .code-snip-selection button {
  background: none;
  color: var(--text-col);
  padding: 5px 10px;
  border: 1px solid var(--text-col);
  border-radius: 10px;
  font-size: 0.8rem;
  margin-right: 5px;
  font-family: inherit;
  position: relative;
}

.code-snippets {
  background: var(--panel-col);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-outline);
  margin-top: 2rem;
  box-shadow: inset 0 0 50px #ccc1;
}

.code-snippets h2 {
  margin: 0;
  border-bottom: 1px solid var(--panel-outline);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.walkthrough .code-snip-selection button:hover,
.walkthrough .code-snip-selection button.selected {
  background: var(--text-col);
  color: var(--bg-col);
  cursor: pointer;
}

.walkthrough .code-snip-selection button:after {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  top: -8px;
  background: var(--text-col);
  width: 4px;
  height: 4px;
  border-radius: 2px;
  opacity: 0;
  transition: 1s linear opacity;
}

.walkthrough .code-snip-selection button.highlight:after {
  opacity: 1;
}

#code-snippets section h1 {
  display: none;
}
.hidden {
  display: none;
}

.steps h1 {
  margin-top: 5rem;
}

/*Question overlay*/
.full-overlay-wrapper {
  display: none;
  z-index: 10;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00000060;
  align-items: center;
  justify-content: center;
}

.full-overlay-wrapper.opened {
  display: flex;
}

.questions-overlay {
  position: relative;
  background: var(--panel-col);
  border-radius: 1rem;
  box-shadow: 0 0 0.5rem 0.5rem #0003;
  width: 100%;
  min-width: 300px;
  max-width: 700px;
  display: flex;
  flex-flow: column;
}

.questions-overlay form {
  display: flex;
  margin: 0 1.5rem;
  margin-top: 1.7rem;
  border-radius: 0.8rem;
  transition: all 150ms linear;
}
.questions-overlay h2 {
  font-size: 1.5rem;
  padding: 1rem 1.5rem;
  margin: 0;
  font-weight: 400;
  border-bottom: 1px solid #fff3;
}
.questions-overlay form:focus-within {
  background-color: #00000015;
  margin: -0.8rem 0.7rem;
  margin-top: 0.9rem;
  padding: 0.8rem 0.8rem;
}

.close-questions {
  width: fit-content;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 1.5rem;
  font-size: 1.2rem;
  border: none;
  color: var(--text-col);
  background: none;
}

.close-questions:hover {
  background: #fff4;
}
/*Cross */
.close-questions::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: var(--text-col);
  transform: translateY(-50%) rotate(45deg);
}

.close-questions::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: var(--text-col);
  transform: translateY(-50%) rotate(-45deg);
}

.questions-overlay input[type="text"] {
  background: none;
  outline: none;
  border: none;
  border-bottom: gray solid 1px;
  flex-grow: 1;
  font-size: 1rem;
  transition: all 150ms linear;
}

.questions-overlay form:focus-within input[type="text"] {
  border: none;
  border-radius: 0.4rem;
}

.questions-overlay form button {
  transition: all 150ms linear;
  opacity: 0;
  margin-left: 0.4em;
  font-size: 1rem;
  color: white;
  background-color: rgb(50, 100, 255);
  border: none;
  border-radius: 0.4rem;
  padding: 0.2rem 0.4rem;
}

.questions-overlay form button:hover {
  background: rgb(80, 140, 255);
}

.questions-overlay form:focus-within button {
  opacity: 1;
}

.qo-field {
  margin: 0.8rem 0 0 1.5rem;
  overflow: auto;
  height: fit-content;
  padding: 0;
  padding-top: 1.5rem;
}

.qo-field li {
  display: block;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.qo-field li p {
  margin: 0.4rem 0;
}

.qo-field .qo-answer {
  padding: 0.2rem 0.4rem;
  border-left: 5px solid blueviolet;
  border-radius: 5px;
  margin-right: 3rem;
  background: #0002;
}

.qo-field .qo-unanswered-q {
  padding: 0.2rem 0.4rem;
  border-left: 5px solid crimson;
  border-radius: 5px;
  margin-right: 3rem;
  background: #f002;
}

.qo-field .qo-unanswered-q summary {
  cursor: pointer;
}

.questions-btn[open] .fa-question {
  display: none;
}
.questions-btn:not([open]) .fa-close {
  display: none;
}

.questions-btn > summary {
  width: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.6rem;
  cursor: pointer;
  background: var(--navbar-bg-col);
  width: 3rem;
  height: 3rem;
  border-radius: 2rem;
  box-shadow: 2px 0px 5px #0004;
  margin-bottom: 1rem;
}
.header-buttons {
  display: flex;
  flex-direction: column;
  align-items: end;
}

.questions-footer {
  margin-bottom: 200px;
}

.questions-footer summary {
  background: var(--overlay-col);
  width: 50px;
  height: 50px;
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
}

.questions-footer summary:hover {
  cursor: pointer;
  background: var(--overlay-strong-col);
}
.questions-footer[open] summary .fa-question {
  display: none;
}
.questions-footer:not([open]) summary .fa-xmark {
  display: none;
}

.questions-panel button {
  background: none;
  color: var(--text-col);
  padding: 10px 20px;
  border: none;
  border-left: 1px solid var(--panel-outline);
  font-size: 1rem;
  font-family: inherit;
  position: relative;
  font-family: inherit;
  border-radius: 0 8px 8px 0;
}
.questions-panel button:hover {
  background: var(--overlay-col);
  cursor: pointer;
}

.questions-panel input {
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  padding: 10px;
  flex-grow: 1;
}
.questions-panel input:focus {
  outline: none;
  background: var(--bg-col);
  border-radius: 8px 0 0 8px;
}

.questions-panel form {
  border: var(--panel-outline) 1px solid;
  border-radius: 10px;
  display: flex;
  margin-top: 20px;
  flex-direction: row;
}

.questions-panel form:focus-within {
  border: var(--panel-outline) 1px solid;
}

.questions-panel {
  background: var(--panel-col);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-outline);
  margin-top: 1rem;
  box-shadow: inset 0 0 50px #ccc1;
}

.questions-panel h2 {
  margin: 0;
  border-bottom: 1px solid var(--panel-outline);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.questions-list li {
  list-style: none;
}

.questions-list li > .question-entry {
  padding: 5px 10px;
  border-radius: 5px 5px 0 0;
  margin: 0;
  position: relative;
}
.asked-by-user>.question-entry:before {
  content: "You: ";
  color: var(--secondary-text-col);
}
:not(.asked-by-user)>.question-entry:before {
  content: "Q: ";
  color: var(--text-col);
}

.questions-list li > .question-entry {
  color: var(--faded-text-col);
}
.questions-list li > .answer-entry {
  margin-top: 0;
  border-radius: 10px;
  background: var(--overlay-col);
  border: 1px solid var(--panel-outline);
  padding: 5px 10px;
}

.questions-list li > .answer-entry.awaiting-answer {
  width: fit-content;
  border: var(--secondary-text-col) solid 1px;
  color: var(--secondary-text-col);
  border-radius: 1rem;
}
.questions-list li > .answer-entry.awaiting-answer::before {
  content: "Awaiting answer...";
}

.status-bubble {
  background: #3f3;
  padding: 8px 10px;
  border-radius: 10px;
  opacity: 0;
  display: none;
}
.status-bubble.success,
.status-bubble.error {
  background: #3f3;
  color: black;
  opacity: 1;
  display: block;
  transition: 300ms linear opacity display;
}
.status-bubble.error {
  background: #f33;
}