@font-face {
	font-family: "Inter Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--bg: #ffffff;
	--alt: #f5f5f7;
	--card: #f5f5f7;
	--fg: #1d1d1f;
	--mute: #6e6e73;
	--line: rgb(0 0 0 / 0.1);
	--accent: #0071e3;
	--accent-hover: #0077ed;
	--tint: rgb(0 113 227 / 0.1);
	--danger: #d70015;
	--shadow: 0 30px 60px -20px rgb(0 0 0 / 0.25), 0 10px 20px -10px rgb(0 0 0 / 0.1);
	--head: 3rem;
	color-scheme: light;
}

.dark {
	--bg: #000000;
	--alt: #161617;
	--card: #1c1c1e;
	--fg: #f5f5f7;
	--mute: #86868b;
	--line: rgb(255 255 255 / 0.12);
	--accent: #2997ff;
	--accent-hover: #47a6ff;
	--tint: rgb(41 151 255 / 0.16);
	--danger: #ff453a;
	--shadow: 0 30px 60px -20px rgb(0 0 0 / 0.8);
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
}

body {
	background: var(--bg);
	color: var(--fg);
	font: 15px/1.45 "Inter Variable", ui-sans-serif, system-ui, sans-serif;
	font-feature-settings: "cv11", "ss01";
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

svg.i {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

/* the site's header: sticky, translucent, 48px */
header.top {
	height: var(--head);
	flex: none;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0 1rem;
	border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 80%, transparent);
	backdrop-filter: saturate(1.5) blur(24px);
	position: relative;
	z-index: 20;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-size: 1rem;
	color: var(--fg);
	text-decoration: none;
	min-width: 13rem;
}

.brand svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.search {
	flex: 1;
	max-width: 34rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--card);
	border-radius: 999px;
	padding: 0 0.9rem;
	height: 2.1rem;
	color: var(--mute);
}

.search input {
	border: 0;
	background: none;
	outline: 0;
	width: 100%;
	color: var(--fg);
	font-size: 0.9rem;
}

.top .end {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 999px;
	color: var(--mute);
	transition: background 0.2s, color 0.2s;
}

.iconbtn:hover {
	color: var(--fg);
	background: var(--card);
}

.avatar {
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.8rem;
	color: #fff;
	flex: none;
	background: var(--accent);
}

.avatar.big {
	width: 2.5rem;
	height: 2.5rem;
	font-size: 0.95rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	border-radius: 999px;
	background: var(--accent);
	padding: 0.55rem 1.2rem;
	font-weight: 500;
	color: #fff;
	transition: background 0.2s;
}

.btn:hover {
	background: var(--accent-hover);
}

.btn-quiet {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	padding: 0.4rem 0.9rem;
	font-size: 0.875rem;
	transition: background 0.2s;
}

.btn-quiet:hover {
	background: var(--alt);
}

.notice {
	flex: none;
	text-align: center;
	font-size: 0.8rem;
	color: var(--mute);
	background: var(--alt);
	border-bottom: 1px solid var(--line);
	padding: 0.35rem 1rem;
}

/* three panes */
.app {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: 15rem 24rem 1fr;
}

.app.contacts-mode {
	grid-template-columns: 15rem 22rem 1fr;
}

nav.side {
	padding: 1rem 0.75rem;
	overflow-y: auto;
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

nav.side .btn {
	margin: 0 0.25rem 1rem;
}

.folder {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.45rem 0.75rem;
	border-radius: 0.6rem;
	color: var(--fg);
	text-align: left;
	width: 100%;
	font-size: 0.92rem;
}

.folder svg {
	color: var(--mute);
}

.folder:hover {
	background: var(--alt);
}

.folder[aria-current="page"] {
	background: var(--tint);
	color: var(--accent);
	font-weight: 500;
}

.folder[aria-current="page"] svg {
	color: var(--accent);
}

.folder .n {
	margin-left: auto;
	font-size: 0.8rem;
	color: var(--mute);
	font-variant-numeric: tabular-nums;
}

.side h3 {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--mute);
	font-weight: 600;
	margin: 1.2rem 0.75rem 0.4rem;
}

.side .bottom {
	margin-top: auto;
	padding-top: 1rem;
}

/* message list */
section.list {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-right: 1px solid var(--line);
}

.listhead {
	padding: 1rem 1.1rem 0.6rem;
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.listhead h1 {
	font-size: 1.5rem;
	letter-spacing: -0.022em;
	margin: 0;
}

.listhead .count {
	color: var(--mute);
	font-size: 0.85rem;
}

.chips {
	display: flex;
	gap: 0.4rem;
	padding: 0 1.1rem 0.7rem;
	border-bottom: 1px solid var(--line);
}

.chip {
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.2rem 0.75rem;
	font-size: 0.8rem;
	color: var(--mute);
}

.chip[aria-pressed="true"] {
	background: var(--fg);
	color: var(--bg);
	border-color: var(--fg);
}

.rows {
	overflow-y: auto;
	flex: 1;
	list-style: none;
	margin: 0;
	padding: 0;
}

.row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.15rem 0.75rem;
	padding: 0.8rem 1.1rem;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
	position: relative;
}

.row:hover {
	background: var(--alt);
}

.row[aria-selected="true"] {
	background: var(--tint);
}

.row .avatar {
	grid-row: span 3;
	align-self: start;
}

.row .who {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.row.unread .who,
.row.unread .subj {
	font-weight: 650;
}

.row.unread::before {
	content: "";
	position: absolute;
	left: 0.35rem;
	top: 1.35rem;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 999px;
	background: var(--accent);
}

.row time {
	font-size: 0.78rem;
	color: var(--mute);
	white-space: nowrap;
}

.row .subj,
.row .snip {
	grid-column: 2 / 4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.row .snip {
	color: var(--mute);
	font-size: 0.85rem;
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

.row .snip span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.row .snip svg {
	width: 14px;
	height: 14px;
}

.badge {
	font-size: 0.72rem;
	color: var(--mute);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0 0.4rem;
	margin-left: 0.3rem;
	font-weight: 500;
}

.empty {
	text-align: center;
	color: var(--mute);
	padding: 3rem 1.5rem;
}

.empty svg {
	width: 40px;
	height: 40px;
	stroke-width: 1.2;
	margin-bottom: 0.5rem;
}

/* reader */
section.reader {
	overflow-y: auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.toolbar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.5rem 1rem;
	border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: blur(20px);
}

.toolbar .sep {
	width: 1px;
	height: 1.2rem;
	background: var(--line);
	margin: 0 0.35rem;
}

.toolbar .end {
	margin-left: auto;
	display: flex;
	gap: 0.25rem;
}

.thread {
	padding: 1.75rem 2rem 2rem;
	max-width: 52rem;
	width: 100%;
}

.thread h2 {
	font-size: 1.6rem;
	letter-spacing: -0.022em;
	margin: 0 0 1.25rem;
	text-wrap: balance;
}

.msg {
	background: var(--card);
	border-radius: 1rem;
	padding: 1.1rem 1.25rem;
	margin-bottom: 0.9rem;
}

.msg.folded {
	cursor: pointer;
}

.msg header {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.msg .from {
	font-weight: 600;
}

.msg .addr,
.msg .to,
.msg time {
	color: var(--mute);
	font-size: 0.82rem;
}

.msg time {
	margin-left: auto;
	white-space: nowrap;
}

.msg .peek {
	color: var(--mute);
	font-size: 0.88rem;
	margin-top: 0.3rem;
}

.blocked {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 1rem;
	font-size: 0.82rem;
	color: var(--mute);
	background: var(--bg);
	border-radius: 0.7rem;
	padding: 0.5rem 0.8rem;
}

.blocked button {
	color: var(--accent);
	margin-left: auto;
	font-size: 0.82rem;
}

iframe.body {
	width: 100%;
	border: 0;
	margin-top: 1rem;
	background: #fff;
	border-radius: 0.7rem;
	min-height: 6rem;
	display: block;
}

.files {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.file {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 0.75rem;
	padding: 0.5rem 0.75rem;
	font-size: 0.85rem;
	max-width: 16rem;
}

.file .ext {
	font-size: 0.65rem;
	font-weight: 700;
	color: #fff;
	background: var(--accent);
	border-radius: 0.35rem;
	padding: 0.35rem 0.3rem;
	min-width: 2.2rem;
	text-align: center;
	text-transform: uppercase;
}

.file .name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file .size {
	color: var(--mute);
	font-size: 0.75rem;
}

.file button {
	color: var(--mute);
	display: inline-flex;
}

.file button:hover {
	color: var(--fg);
}

.quick {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.65rem 1.1rem;
	color: var(--mute);
	width: 100%;
	text-align: left;
	margin-top: 0.4rem;
}

.quick:hover {
	background: var(--alt);
}

.nothing {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--mute);
	gap: 0.5rem;
}

.nothing svg {
	width: 56px;
	height: 56px;
	stroke-width: 1;
}

/* composer: a sheet like the site's cards */
.composer {
	position: fixed;
	right: 1.5rem;
	bottom: 0;
	width: min(40rem, calc(100vw - 2rem));
	height: min(38rem, calc(100vh - 5rem));
	background: var(--bg);
	border: 1px solid var(--line);
	border-bottom: 0;
	border-radius: 1rem 1rem 0 0;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	z-index: 40;
}

.composer.min {
	height: auto;
}

.composer.min > :not(.chead) {
	display: none;
}

.composer.max {
	inset: 4vh 8vw 0;
	width: auto;
	height: auto;
}

.chead {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.55rem 0.6rem 0.55rem 1.1rem;
	border-bottom: 1px solid var(--line);
	font-weight: 600;
}

.chead span {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.field {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	padding: 0.45rem 1.1rem;
	border-bottom: 1px solid var(--line);
	position: relative;
}

.field label {
	color: var(--mute);
	font-size: 0.88rem;
	min-width: 3.2rem;
}

.field input {
	flex: 1;
	min-width: 8rem;
	border: 0;
	outline: 0;
	background: none;
	padding: 0.25rem 0;
}

.field .more {
	color: var(--mute);
	font-size: 0.82rem;
}

.field .more:hover {
	color: var(--accent);
}

.rcpt {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	background: var(--card);
	border-radius: 999px;
	padding: 0.15rem 0.35rem 0.15rem 0.7rem;
	font-size: 0.85rem;
}

.rcpt button {
	display: inline-flex;
	color: var(--mute);
}

.rcpt button svg {
	width: 14px;
	height: 14px;
}

.suggest {
	position: absolute;
	left: 4.5rem;
	top: 100%;
	z-index: 3;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 0.8rem;
	box-shadow: var(--shadow);
	list-style: none;
	margin: 0.2rem 0 0;
	padding: 0.3rem;
	min-width: 18rem;
}

.suggest li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.4rem 0.6rem;
	border-radius: 0.55rem;
	cursor: pointer;
}

.suggest li[aria-selected="true"],
.suggest li:hover {
	background: var(--tint);
}

.suggest .meta {
	color: var(--mute);
	font-size: 0.8rem;
}

.format {
	display: flex;
	gap: 0.15rem;
	padding: 0.35rem 0.75rem;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}

.format button {
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--mute);
	font-weight: 700;
}

.format button:hover,
.format button[aria-pressed="true"] {
	background: var(--card);
	color: var(--fg);
}

.format .sep {
	width: 1px;
	background: var(--line);
	margin: 0.35rem 0.3rem;
}

.editor {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.1rem;
	outline: 0;
	line-height: 1.6;
}

.editor:empty::before {
	content: attr(data-placeholder);
	color: var(--mute);
}

.editor blockquote {
	border-left: 3px solid var(--accent);
	margin: 0.5rem 0;
	padding-left: 0.9rem;
	color: var(--mute);
}

.editor a {
	color: var(--accent);
}

.composer .files {
	padding: 0 1.1rem;
	margin: 0 0 0.6rem;
}

.cfoot {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	border-top: 1px solid var(--line);
}

.cfoot .state {
	color: var(--mute);
	font-size: 0.8rem;
	margin-left: 0.5rem;
}

.cfoot .end {
	margin-left: auto;
	display: flex;
	gap: 0.25rem;
}

.drop {
	position: absolute;
	inset: 0;
	border-radius: 1rem 1rem 0 0;
	background: color-mix(in srgb, var(--accent) 12%, var(--bg));
	border: 2px dashed var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	font-weight: 600;
	z-index: 4;
}

/* contacts */
.people .group {
	font-size: 0.72rem;
	color: var(--mute);
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 0.8rem 1.1rem 0.3rem;
	border-bottom: 1px solid var(--line);
}

.person {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1.1rem;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
}

.person:hover {
	background: var(--alt);
}

.person[aria-selected="true"] {
	background: var(--tint);
}

.person .meta {
	color: var(--mute);
	font-size: 0.82rem;
}

.card {
	background: var(--card);
	border-radius: 1.25rem;
	padding: 1.75rem;
	margin: 2rem;
	max-width: 36rem;
}

.card .head {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.card h2 {
	margin: 0;
	font-size: 1.5rem;
	letter-spacing: -0.022em;
}

.card dl {
	display: grid;
	grid-template-columns: 7rem 1fr;
	gap: 0.6rem 1rem;
	margin: 0 0 1.25rem;
}

.card dt {
	color: var(--mute);
	font-size: 0.88rem;
}

.card dd {
	margin: 0;
}

.card dd a {
	color: var(--accent);
	text-decoration: none;
}

.form label {
	display: block;
	font-size: 0.85rem;
	color: var(--mute);
	margin: 0.8rem 0 0.3rem;
}

.form input,
.form textarea,
.form select {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 0.7rem;
	background: var(--bg);
}

.form .row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 0.75rem;
}

.multi {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.4rem;
}

.multi input {
	flex: 1;
}

.form .more {
	color: var(--accent);
	font-size: 0.85rem;
	margin: 0.1rem 0 0.3rem;
}

.actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

/* settings */
.settings {
	grid-column: 2 / 4;
	overflow-y: auto;
	padding: 1rem 0;
}

.settings .card {
	max-width: 44rem;
}

.settings h2 {
	font-size: 1.15rem;
	margin: 0 0 0.25rem;
}

.settings p {
	color: var(--mute);
	margin: 0.2rem 0 0.8rem;
}

.opt {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.4rem 0;
}

/* calendar */
.cal {
	padding: 1rem 1.5rem 2rem;
}

.calhead {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.calhead h1 {
	font-size: 1.5rem;
	letter-spacing: -0.022em;
	margin: 0;
}

.calhead .end {
	margin-left: auto;
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

.flip svg {
	transform: scaleX(-1);
}

.month {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid var(--line);
	border-left: 1px solid var(--line);
	border-radius: 1rem;
	overflow: hidden;
	background: var(--bg);
}

.dow {
	font-size: 0.72rem;
	color: var(--mute);
	padding: 0.45rem 0.6rem;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
}

.day {
	min-height: 6.75rem;
	padding: 0.3rem;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	cursor: pointer;
	min-width: 0;
}

.day:hover {
	background: var(--alt);
}

.day.other {
	color: var(--mute);
	background: color-mix(in srgb, var(--alt) 50%, transparent);
}

.day .num {
	font-size: 0.8rem;
	font-weight: 600;
	min-width: 1.6rem;
	height: 1.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	align-self: flex-end;
}

.day.today .num {
	background: var(--accent);
	color: #fff;
}

.ev {
	font-size: 0.75rem;
	text-align: left;
	border-radius: 0.35rem;
	padding: 0.1rem 0.4rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--fg);
	background: color-mix(in srgb, var(--c) 16%, transparent);
	border-left: 3px solid var(--c);
}

.ev.allday {
	background: var(--c);
	color: #fff;
	border-left: 0;
}

.ev .t {
	color: var(--mute);
	margin-right: 0.3rem;
	font-variant-numeric: tabular-nums;
}

.day .more {
	font-size: 0.72rem;
	color: var(--mute);
	text-align: left;
	padding: 0 0.4rem;
}

.calhead .views {
	display: flex;
	gap: 0.3rem;
}

.dayheads,
.allday,
.grid {
	display: grid;
	grid-template-columns: 3.5rem repeat(var(--n), minmax(0, 1fr));
}

.dayhead {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.3rem 0;
	color: var(--mute);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.dayhead b {
	font-size: 1.2rem;
	color: var(--fg);
	text-transform: none;
	letter-spacing: -0.02em;
	min-width: 2.2rem;
	height: 2.2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
}

.dayhead.today b {
	background: var(--accent);
	color: #fff;
}

.allday {
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	font-size: 0.75rem;
}

.allday > div {
	border-left: 1px solid var(--line);
	padding: 0.2rem;
	min-height: 1.8rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.allday > .meta {
	border-left: 0;
	align-self: center;
}

.timegrid {
	height: calc(100vh - 16rem);
	min-height: 18rem;
	overflow-y: auto;
	border-bottom: 1px solid var(--line);
}

.grid .hours .hour {
	height: 3rem;
	font-size: 0.7rem;
	color: var(--mute);
	text-align: right;
	padding-right: 0.5rem;
	transform: translateY(-0.45rem);
}

.grid .col {
	position: relative;
	border-left: 1px solid var(--line);
	background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 3rem);
	height: 72rem;
	cursor: pointer;
}

.grid .col.today {
	background-color: color-mix(in srgb, var(--accent) 4%, transparent);
}

.block {
	position: absolute;
	overflow: hidden;
	text-align: left;
	border-radius: 0.45rem;
	padding: 0.2rem 0.4rem;
	font-size: 0.75rem;
	line-height: 1.3;
	color: var(--fg);
	background: color-mix(in srgb, var(--c) 18%, var(--bg));
	border-left: 3px solid var(--c);
	display: flex;
	flex-direction: column;
}

.block b {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.block span {
	color: var(--mute);
}

.now {
	position: absolute;
	left: 0;
	right: 0;
	border-top: 2px solid var(--danger);
	pointer-events: none;
}

.day .num {
	cursor: pointer;
}

.invite {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	padding: 0.9rem 1rem;
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.invite .meta {
	color: var(--mute);
	font-size: 0.85rem;
}

.invite .row {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.6rem;
}

.form .guests li {
	display: flex;
	justify-content: space-between;
	padding: 0.3rem 0;
	border-top: 1px solid var(--line);
	font-size: 0.9rem;
}

dialog.event {
	max-width: 34rem;
}

.form .opt {
	display: flex;
	color: var(--fg);
	font-size: 0.92rem;
}

.form .opt input {
	width: auto;
}

.btn-quiet.danger {
	color: var(--danger);
}

/* filters */
.rule {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
	padding: 0.6rem 0;
	border-top: 1px solid var(--line);
	font-size: 0.9rem;
}

.rule select,
.rule input {
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--line);
	border-radius: 0.6rem;
	background: var(--bg);
}

.rule input[type="text"] {
	flex: 1;
	min-width: 8rem;
}

.folder .fname {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

/* menus, dialogs, toast */
.menu {
	position: absolute;
	z-index: 50;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 0.8rem;
	box-shadow: var(--shadow);
	padding: 0.3rem;
	min-width: 13rem;
	list-style: none;
	margin: 0;
}

.menu button,
.menu a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	width: 100%;
	padding: 0.45rem 0.7rem;
	border-radius: 0.55rem;
	text-align: left;
	color: var(--fg);
	text-decoration: none;
	font-size: 0.9rem;
}

.menu button:hover,
.menu a:hover {
	background: var(--alt);
}

.menu .who {
	padding: 0.5rem 0.7rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 0.3rem;
	font-size: 0.85rem;
	color: var(--mute);
}

dialog {
	border: 1px solid var(--line);
	border-radius: 1.25rem;
	background: var(--bg);
	color: var(--fg);
	box-shadow: var(--shadow);
	padding: 1.5rem 1.75rem;
	max-width: 30rem;
	width: calc(100vw - 2rem);
}

dialog::backdrop {
	background: rgb(0 0 0 / 0.35);
	backdrop-filter: blur(4px);
}

dialog h2 {
	margin: 0 0 1rem;
	font-size: 1.2rem;
}

.keys {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.45rem 1rem;
	margin: 0;
	font-size: 0.9rem;
}

kbd {
	font: 600 0.78rem/1 "Inter Variable", sans-serif;
	border: 1px solid var(--line);
	border-bottom-width: 2px;
	border-radius: 0.4rem;
	padding: 0.2rem 0.45rem;
	background: var(--card);
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	translate: -50% 0;
	background: var(--fg);
	color: var(--bg);
	border-radius: 999px;
	padding: 0.6rem 0.75rem 0.6rem 1.2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 0.9rem;
	z-index: 60;
	box-shadow: var(--shadow);
}

.toast button {
	color: var(--bg);
	font-weight: 600;
	opacity: 0.85;
	padding: 0.2rem 0.6rem;
}

.only-narrow {
	display: none !important;
}

/* phone and small tablet: one pane at a time */
@media (max-width: 900px) {
	.brand {
		min-width: 0;
	}

	.brand b {
		display: none;
	}

	.only-narrow {
		display: inline-flex !important;
	}

	.app,
	.app.contacts-mode {
		grid-template-columns: 1fr;
	}

	nav.side {
		position: fixed;
		inset: var(--head) auto 0 0;
		width: 17rem;
		background: var(--bg);
		z-index: 30;
		translate: -100% 0;
		transition: translate 0.25s ease;
		box-shadow: var(--shadow);
	}

	body.drawer nav.side {
		translate: 0 0;
	}

	section.reader,
	.app .detail {
		display: none;
	}

	body.reading section.list {
		display: none;
	}

	body.reading section.reader,
	body.reading .app .detail {
		display: flex;
	}

	.thread {
		padding: 1.25rem 1rem;
	}

	.settings {
		grid-column: 1;
	}

	.cal {
		padding: 0.75rem 0.5rem;
	}

	.day {
		min-height: 4.25rem;
		padding: 0.15rem;
	}

	.ev .t {
		display: none;
	}

	.composer,
	.composer.max {
		inset: 0;
		width: auto;
		height: auto;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
