.layout-simple {
  display: grid;
  max-width: none;
  padding: 0 1.5rem;
  column-gap: 1.5rem;
  grid-template-areas:
    "header"
    "aside1"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
}

.layout-simple > :is(header:first-of-type, footer:last-of-type) {
  display: flex;
  height: max-content;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  margin-bottom: 0;
  background: var(--ly-bg-brand);
  color: var(--ly-brand);
  grid-area: header;
}

.layout-simple > :is(header:first-of-type, footer:last-of-type) > * {
  margin-top: 0;
  margin-bottom: 0;
}

.layout-simple > header:first-of-type {
  position: sticky;
  z-index: 200;
  top: 0;
  height: var(--ly-header-size);
  white-space: nowrap;
}

.layout-simple > main:only-of-type {
  grid-area: main;
}

.layout-simple > footer:last-of-type {
  overflow: auto;
  grid-area: footer;
}

.layout-simple > :is(header:first-of-type, footer:last-of-type) > nav > menu {
  flex-direction: row;
  justify-content: center;
}

.layout-simple > aside {
  display: none;
  padding: 0;
  border-left: none;
  margin: 0;
  backdrop-filter: blur(100px);
}

.layout-simple > aside > nav:only-child {
  position: sticky;
  top: var(--ly-header-size);
  overflow: auto;
  max-height: calc(100vh - var(--ly-header-size));
  box-sizing: border-box;
  padding: 0.5rem;
  margin: 0;
}

.layout-simple > aside:nth-of-type(1):is([data-expandable], [data-expand]) {
  display: block;
  overflow: hidden;
  max-height: var(--ly-aside-size-small);
  margin-right: -1.5rem;
  margin-left: -1.5rem;
  grid-area: aside1;
}

.layout-simple > aside:nth-of-type(1)[data-expand] {
  max-height: none;
}

.layout-simple > aside:nth-of-type(1)[data-expandable]::before {
  display: flex;
  height: var(--ly-aside-size-small);
  align-items: center;
  justify-content: center;
  content: attr(data-expandable);
  cursor: pointer;
}

.layout-simple > aside:nth-of-type(1)[data-expandable]:hover,
.layout-simple > aside:nth-of-type(1)[data-expandable][data-expand] {
  max-height: none;
}

.layout-simple > aside:nth-of-type(1)[data-expandable]:hover::before {
  color: var(--accent);
}

.layout-simple > aside > nav:only-child > ul {
  height: 100%;
}

.layout-simple > aside a {
  color: var(--default);
}

@media (min-width: 960px) {
  .layout-simple > aside:nth-of-type(1)[data-expandable]::before {
    display: none;
  }

  .layout-simple > aside:nth-of-type(1):is([data-expandable], [data-expand]) {
    overflow: unset;
    max-height: none;
    margin-right: 0;
    margin-left: 0;
  }

  .layout-simple:has(> aside:nth-of-type(1)) {
    padding-left: 0;
    grid-template-areas:
      "header header"
      "aside1 main"
      "footer footer";
    grid-template-columns: minmax(0, 0.4fr) 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .layout-simple:has(> aside:nth-of-type(1)) > :is(header:first-of-type, footer:last-of-type) {
    margin-left: 0;
  }

  .layout-simple > aside:nth-of-type(1) {
    display: block;
    box-shadow: var(--shadow-r);
    grid-area: aside1;
  }
}

@media (min-width: 1280px) {
  .layout-simple:has(> aside:nth-of-type(1)) {
    grid-template-areas:
      "header header header"
      "aside1 main   ."
      "footer footer footer";
    grid-template-columns: minmax(0, 0.3fr) 1fr minmax(0, 0.3fr);
  }

  .layout-simple:has(> aside:nth-of-type(2)) {
    padding-right: 0;
    grid-template-areas:
      "header header header"
      "aside1 main   aside2"
      "footer footer footer";
  }

  .layout-simple:has(> aside:nth-of-type(2)) > :is(header:first-of-type, footer:last-of-type) {
    margin-right: 0;
  }

  .layout-simple > aside:nth-of-type(2) {
    display: block;
    box-shadow: var(--shadow-l);
    grid-area: aside2;
  }
}

.layout-simple > header:first-of-type > nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  justify-content: center;
  background: var(--ly-bg-brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-duration), top var(--tr-duration);
}

.layout-simple > header:first-of-type:hover > nav {
  top: 100%;
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .layout-simple > header:first-child {
    justify-content: space-between;
  }

  .layout-simple > header:first-child > nav {
    position: static;
    height: var(--ly-header-size);
    justify-content: flex-start;
    opacity: 1;
    pointer-events: auto;
  }
}
