html, body {
	height: 100vh;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	padding: 0;
	margin: 0;
	background-color: #eee;
}

body {
	display: grid;
	grid-template-columns: 240px 1fr;
	grid-template-rows: 64px 1fr;
}

header {
	grid-column: 1 / span 2;
	display: flex;
	align-items: center;
}

header > h1 {
	width: 240px;
	text-align: center;
	margin: 0;
	font-weight: normal;
}

@media screen and (max-width: 1400px) {
	body {
		grid-template-columns: 1fr;
	}

	.sidebar {
		display: none;
	}
}

header > .account {
	display: grid;
	grid-template-columns: 48px auto;
	gap: 0 8px;
	margin-right: 16px;
}

header > .account > .pic {
	grid-column: 1;
	grid-row: 1 / span 2;
	height: 48px;
	text-align: center;
	line-height: 48px;
	background-color: green;
	border-radius: 100%;
	color: white;
	font-weight: bold;
}

.sidebar > * {
	box-sizing: border-box;
	height: 48px;
	padding: 0 8px;
}

.sidebar > li {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.sidebar > .button {
	margin-bottom: 8px;
}

.sidebar > .button button {
	appearance: none;
	width: 100%;
	border: none;
	border-radius: 4px;
	background-color: #0087ff;
	color: white;
	height: 48px;
	cursor: pointer;
}

.sidebar > .button button:hover {
	background-color: #279aff;
}

.filler {
	flex-grow: 1;
}

main {
	background: white;
	border-top-left-radius: 16px;
	border-left: 1px solid #ccc;
	border-top: 1px solid #ccc;
	height: 100%;
	display: flex;
}

main > .list {
	flex-grow: 1;
	width: 40%;
}

main > #mail,
main > #placeholder {
	flex-grow: 1;
	width: 60%;
	border-left: 1px solid #ccc;
	display: flex;
	flex-direction: column;
}


@media screen and (max-width: 900px) {
	main {
		flex-direction: column;
	}

	main > .list, main > #placeholder, main > #mail {
		flex-grow: 0;
		width: 100%;
	}

	li.sample {
		display: none !important;
	}

	iframe {
		min-height: 400px;
		height: 50vh;
		height: calc(100vh - 120px);
		max-height: 90vh;
	}
}

@media screen and (max-width: 700px) {
	header > .search {
		display: none;
	}
}

@media screen and (max-width: 450px) {
	header > .account, header > .filler {
		display: none;
	}

	header > h1 {
		width: 100%;
	}
}


main > #placeholder {
	align-items: center;
	justify-content: center;
}

main > #placeholder > .text {
	max-width: 60ch;
	padding: 32px;
}

main > #mail > h2 {
	margin: 0;
	padding: 16px;
}

main > #mail > table {
	margin: 0 16px;
}

main > #mail > table tr td:nth-child(1) {
	width: 50px;
}

main > #mail > iframe {
	width: 100%;
	flex-grow: 1;
}

iframe {
	border: none;
}

main > .list > .toolbar {
	display: flex;
	height: 48px;
	align-items: center;
	border-bottom: 1px solid #ccc;
	padding-left: 64px;
}

main > .list > #mails {
	margin: 0;
	list-style: none;
	padding: 0;
}

main > .list > #mails > li {
	display: grid;
	grid-template-columns: 48px 1fr;
	padding: 8px;
	gap: 8px;
	border-bottom: 1px solid #ccc;
	cursor: pointer;
}

main > .list > #mails > li > .initials {
	text-transform: uppercase;
	grid-row: 1 / span 2;
	grid-column: 1;
	width: 48px;
	height: 48px;
	line-height: 48px;
	text-align: center;
	background-color: indigo;
	color: white;
	font-weight: bold;
	border-radius: 100%;
}

main > .list > #mails > li:not(.read) > .subject {
	font-weight: bold;
}

li.read {
	background-color: #f0f0f0;
}

li {
	transition: background-color 0.1s ease-out;
}
li.focused, li:hover {
	background-color: rgba(0,0,0,0.1);
}

.bubble {
	display: span;
	color: white;
	background-color: #0087ff;
	padding: 0 10px;
	border-radius: 20px;
	text-align: center;
}