* { box-sizing: border-box; }

html, body, header, footer, main, section, article, aside, nav {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

html { height: 100%; }

body, main, section, article, aside {
  gap: 1em;
}

main, section, article, aside {
  padding: 0 1em;
}

header, footer, aside {
  flex: 0;
  min-height: min-content;
  min-width: min-content;
}

header, footer {
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  overflow: visible;
}

main, section, nav {
  flex-direction: row;
}

nav {
  flex: 0;
  justify-content: center;
  min-width: max-content;
  min-height: max-content;
}

aside, article {
  overflow-y: auto;
  justify-content: flex-start;
  gap: 1em;
}
