html,
body {
  background: var(--bg-col);
  padding: 0;
  margin: 0;
}

/*Nav*/

.top-nav a {
  margin: 0.2rem;
  display: block;
  padding: 0.8rem;
  text-decoration: none;
  width: fit-content;
  opacity: 0.8;
  border-radius: 3rem;
}

.top-nav a:hover {
  opacity: 1;
  background: var(--overlay-col);
}

.filter-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--overlay-col) solid 1px;
  border-radius: 1rem;
  width: 3rem;
  height: 3rem;
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--bg-col);
  z-index: 6;
}

.back-arrow-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--overlay-col) solid 1px;
  border-radius: 1rem;
  width: 3rem;
  height: 3rem;
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--bg-col);
  z-index: 6;
}

.back-arrow-nav > a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
}
.back-arrow-nav:hover,
.filter-nav-btn:hover {
  cursor: pointer;
  background: var(--overlay-col);
}

/*Section & Chapter view*/

.hide-completed .completed {
  display: none !important;
}

#chapter-menu {
  display: flex;
  flex-direction: column;
  width: 20%;
  min-width: 220px;
  max-width: 400px;
  max-height: 100vh;
}

.section-select-btn {
  position: relative;
  align-items: center;
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem auto;
  display: flex;
  border: var(--overlay-col) solid 1px;
  border-radius: 0.5rem;
  text-decoration: none;
}

.section-select-btn h2,
.section-select-btn p {
  margin: 0;
}

.chapter > summary:hover,
.section-select-btn:hover {
  cursor: pointer;
  background: #fff1;
}

.section-select-btn img {
  width: 4rem;
  margin-right: 1rem;
}

.section-select-btn h2 {
  font-size: 1.2rem;
}

.section-select-btn h2 > strong {
  color: var(--accent-col);
  font-weight: 400;
  font-size: 1.2rem;
}

.chapter > summary {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem;
}

.chapter > summary h3 {
  margin: 0;
}

.chapter > summary p {
  margin: 0;
  opacity: 0.5;
  text-transform: uppercase;
}

.progress-bar-circle {
  width: 2rem;
  height: 2rem;
  margin-right: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: radial-gradient(closest-side, #1e2025 79%, transparent 80% 100%),
    conic-gradient(var(--accent-col) 0% var(--fill-angle, 0deg), #fff3 0);
}

hgroup {
  padding: 5vmin;
}

hgroup h1 {
  border-bottom: solid 2px var(--accent-col);
  width: fit-content;
  padding: 0.7rem 2rem;
  font-weight: 400;
  margin: 0.8rem auto;
}

hgroup h2 {
  font-size: 1.3rem;
  font-weight: 300;
  width: fit-content;
  margin: 0.8rem auto;
}

/*Task listing*/

main {
  overflow-y: auto;
  margin: auto;
  display: flex;
  flex-direction: row;
  padding: 0 10px;
}

.filters {
  position: relative;
  width: 20%;
  padding: 10px;
  box-sizing: border-box;
  max-width: 370px;
  min-width: max(270px, 23%);
}

.filters ul {
  padding: 0 1rem;
  list-style: none;
}

.filters li {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  margin: 0.5rem 0;
}

.filters li > span {
  height: 100%;
  display: flex;
  align-items: center;
}

.filters li label {
  padding-left: 0.5rem;
}

.filters li > span:nth-of-type(2) {
  opacity: 0.5;
}

.tasks {
  width: auto;
  flex-grow: 1;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filters details {
  margin-bottom: 18px;
  border: var(--overlay-col) solid 1px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.filters summary {
  font-size: 1.2rem;
  display: block;
  list-style: none;
  position: relative;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.filters summary:hover {
  background: var(--overlay-col);
}

.filters details summary::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  right: 10px;
  top: 20px;
  border-right: 1px solid var(--text-col);
  border-bottom: 1px solid var(--text-col);
  transform: translateY(-50%) rotate(135deg);
}

.filters details[open] summary::before {
  content: "";
  position: absolute;
  right: 15px;
  top: 15px;
  border-right: 1px solid var(--text-col);
  border-bottom: 1px solid var(--text-col);
  transform: translateY(calc(-50% + 2px)) rotate(45deg);
}

.hidden {
  display: none !important;
}

/*Task Section*/

.chapter {
  position: relative;
  width: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.chapter::after {
  content: " ";
  position: absolute;
  left: 1rem;
  width: 40px;
  height: 40px;
  border-top: 1px var(--overlay-strong-col) solid;
}

.task-listing {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

.task-listing > a {
  border: var(--overlay-col) solid 1px;
  display: flex;
  border-radius: 0.5rem;
  text-decoration: none;
  height: 100%;
  transition: all 150ms ease-in-out;
}

.task-listing > a:hover {
  transform: scale(1.05);
  border-color: var(--panel-outline);
  box-shadow: 0 0 8px 4px var(--overlay-col);
}

.task-listing > a > div {
  flex-grow: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
}
.task-listing > a div > .fa-check {
  display: none;
}
.completed a div > .fa-check {
  display: block;
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: #3f3;
}

@media only screen and (min-width: 800px) and (max-width: 1999px) {
  .task-listing {
    width: 33%;
  }
}

@media only screen and (min-width: 2000px) {
  .task-listing {
    width: 25%;
  }
}

.task-listing h3 {
  display: flex;
  justify-content: space-between;
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: 400;
}

.task-listing p {
  margin: 0;
}

.tags {
  margin: 0;
  flex-grow: 1;
  padding: 0;
  display: flex;
  flex-wrap: wrap-reverse;
  list-style: none;
  height: auto;
}

.task-listing .tags > li {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  height: fit-content;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  border: var(--overlay-col) solid 1px;
  margin: 0.1rem 0;
  margin-right: 0.5rem;
}

.task-listing p {
  opacity: 0.5;
}

/*GENERAL ELEEMENT STYLES*/

input[type="checkbox"] {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border: 1px solid var(--panel-outline);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type="checkbox"]:checked {
  border-color: var(--text-col);
}

input[type="checkbox"]:checked::after,
input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 60%;
  background: var(--text-col);
  transform: translate(-50%, -50%) rotate(45deg);
  text-align: center;
  font-size: 14px;
  color: var(--text-col);
}

input[type="checkbox"]:checked::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#section-menu {
  z-index: 9;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #0008;
}

#section-menu > div {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  max-height: min(1000px, 100vh);
  max-width: min(600px, 100vw);

  transform: translate(-50%, -50%);
  background: var(--bg-col);
  border: 1px solid #fff4;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#section-menu > div > div > a > img {
  width: 80px;
  padding: 0 1rem;
}

#section-menu > div > div {
  height: 25%;
  box-sizing: border-box;
  padding: 1rem;
}

#section-menu a {
  display: flex;
  text-decoration: none;
  align-items: center;
  height: 100%;
  border-radius: 1rem;
}

#section-menu a:hover {
  cursor: pointer;
  background: #fff1;
}

#section-menu > div > h2 {
  display: flex;
  padding: 1rem 1rem;
  justify-content: space-between;
}

.close-btn {
  position: relative;
  background: none;
  width: 2rem;
  height: 2rem;
  border-radius: 2rem;
  border: none;
}

.close-btn:before,
.close-btn:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: white;
  width: 1px;
  height: 60%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn:before {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#section-menu > div > h2 > button:hover {
  background: #fff3;
}

#section-menu h2,
h3 {
  text-transform: uppercase;
  margin: 0;
}

#section-menu h3 {
  opacity: 0.5;
}

.mobile-only {
  display: none;
}

.closed {
  opacity: 0;
  pointer-events: none;
}

/*Mobile support*/
@media only screen and (max-width: 600px) {
  .mobile-only {
    display: flex;
  }
  .top-nav {
    display: none;
  }

  .mobile-closed {
    opacity: 0;
    pointer-events: none;
  }

  #section-menu > div {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: none;
    border-radius: 0;
    transform: none;
  }

  #section-menu > div > div {
    max-height: 200px;
  }

  .filters {
    z-index: 8;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    min-width: 100px;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-col);
  }
}