body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

:root {
  --pico-font-size: 100%;
}

html {
  position: relative;
  min-height: 100%;
}

main {
  flex: 1;
}

.theme-toggle {
  padding: 0.25rem 0.5rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border: none;
  background: none;
  margin-bottom: 0;
}

.theme-toggle:focus,
.theme-toggle:focus-visible {
  box-shadow: none;
  outline: none;
  border: none;
}

.validation-message {
  color: var(--pico-del-color);
}

/* Landing page hero */
.hero {
  text-align: center;
  padding: 0 0 1rem;
}

.hero h1 {
  margin-bottom: 0.25rem;
}

.hero-search {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 0px;
}

.hero-search input[type="search"] {
  margin-bottom: 0;
}

.hero-search[role="search"] {
  box-shadow: none !important;
}

.hero-search button {
  white-space: nowrap;
  margin-bottom: 0;
}

/* Category cards */
section > .grid {
  margin-bottom: 0;
}

section > .grid article {
  display: flex;
  flex-direction: column;
}

section > .grid article > p {
  flex: 1;
}

section > .grid article footer a {
  width: 100%;
  text-align: center;
}

/* Sidebar layout */
@media (min-width: 992px) {
  #layout {
    grid-template-columns: 12rem auto;
    grid-column-gap: 3rem;
  }

  #layout > aside > nav {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: unset;
  }
}

#layout > aside nav ul {
  border-left: 1px solid var(--pico-muted-border-color);
  padding-left: 0;
  margin: 0;
}

#layout > aside nav ul li {
  padding: 0.125rem 0;
}

#layout > aside nav ul li a {
  display: block;
  margin-left: -1px;
  padding: 0.25rem 1rem;
  border-left: 1px solid transparent;
  text-decoration: none;
}

#layout > aside nav ul li a:hover {
  border-left-color: var(--pico-secondary-underline);
}

#layout > aside nav ul li a[aria-current] {
  border-left-color: var(--pico-primary);
  color: var(--pico-primary);
  font-weight: 600;
}
