:root {color-scheme: light; font: 16px system-ui, sans-serif; color: #16252c; background: #f3f6f5}
* {box-sizing: border-box}
body {margin: 0}
header {padding: 1rem max(4vw, 1rem); background: #143d36; color: white; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap}
h1 {font-size: 1.3rem; margin: 0}
main {max-width: 82rem; margin: auto; padding: 1rem max(4vw, 1rem)}
button, select, input, textarea {font: inherit; border: 1px solid #77938c; border-radius: .45rem; padding: .55rem .75rem; background: white; color: #16252c}
button {cursor: pointer}
button:disabled {cursor: default; opacity: .65}
button[aria-pressed="true"], .primary {color: white; background: #216251}
nav, .actions, #search {display: flex; gap: .5rem; align-items: center; flex-wrap: wrap}
nav, #mail > .actions, #vault > .actions {margin-bottom: .9rem}
.mail-grid {display: grid; grid-template-columns: minmax(15rem, 23rem) minmax(0, 1fr); gap: 1rem}
.mail-grid > *, #vault {padding: 1rem; border: 1px solid #cbd8d4; border-radius: .7rem; background: white; min-width: 0}
#messages, #logins {list-style: none; margin: 0 0 1rem; padding: 0}
#messages button {display: grid; gap: .2rem; width: 100%; border: 0; border-bottom: 1px solid #d9e4e1; border-radius: 0; text-align: left; overflow-wrap: anywhere}
#messages button:hover, #messages button:focus-visible {background: #e8f3ee}
#messages small, #reader p, #logins li {overflow-wrap: anywhere}
#reader .body {white-space: pre-wrap}
#logins li {padding: 1rem 0; border-bottom: 1px solid #d9e4e1}
dialog {max-width: min(44rem, 95vw); width: 100%; border: 1px solid #77938c; border-radius: .7rem; padding: 1.25rem}
dialog::backdrop {background: #15272488}
label {display: grid; gap: .25rem; margin: .6rem 0}
[hidden] {display: none !important}
@media(max-width: 44rem) {.mail-grid {grid-template-columns: 1fr}}
