:root {
  color-scheme: dark;
  --bg: #090c14;
  --panel: #101823;
  --card: #151f2e;
  --line: #344158;
  --ink: #f2f6fa;
  --muted: #bec9da;
  --mint: #a4f1da;
  --danger: #ffbfbd;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow-x: clip; min-width: 0; }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea, summary { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
h1, h2, p { margin: 0; }
p { line-height: 1.55; }
h2 { font-size: 1.1rem; overflow-wrap: anywhere; }
.wrap { width: min(72rem, calc(100% - clamp(2rem, 8vw, 7rem))); margin-inline: auto; }
.top { min-height: 70px; display: flex; align-items: center; z-index: 1; position: relative; border-bottom: 1px solid #a4b6cc36; }
.portal-link { min-height: 44px; display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 650; }
.portal-link:hover { text-decoration: underline; }
.brand-mark { width: 20px; height: 20px; border: 1.5px solid var(--mint); border-radius: 50%; position: relative; transform: rotate(-24deg); }
.brand-mark::after { content: ""; position: absolute; inset: 7px -4px auto; height: 1px; background: linear-gradient(90deg, transparent, #d0bfff 24% 70%, transparent); }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 10; inset: .75rem auto auto .75rem; width: auto; height: auto; clip-path: none; padding: .6rem; background: var(--bg); }
main { isolation: isolate; position: relative; padding-block: clamp(2rem, 7vw, 5.6rem) 3rem; }
.entry-art { z-index: -1; position: absolute; inset: 0 0 auto auto; width: min(68rem, 108%); height: min(39rem, 86svh); overflow: hidden; }
.entry-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right 47%; }
.entry-art::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg), #090c14e8 20%, #090c144d 56%, transparent 81%, var(--bg)),
  linear-gradient(0deg, var(--bg), transparent 38%, transparent 82%, var(--bg)); }
body.has-mailbox .entry-art { opacity: .32; height: 22rem; }
.account-setup { max-width: 37rem; padding-block: clamp(2rem, 9vw, 6rem); }
.account-setup > p { max-width: 34ch; }
.account-setup .account-legacy { margin-top: .6rem; }
.invite-passcode { display: grid; justify-items: start; gap: .45rem; max-width: 22rem; margin-block: .85rem; }
.invite-passcode input { max-width: 16rem; }
.invite-passcode .hint { margin: 0; }
#invite-qr-dialog::backdrop { background: #090e18; }
#invite-qr-canvas { display: block; width: min(100%, 16rem); height: auto; margin: 0 auto 1rem; image-rendering: pixelated; }
.page-head h1 { font: 400 clamp(5.5rem, 12vw, 10rem)/.9 var(--serif); letter-spacing: -.091em; }
.page-head em { color: #b7eadd; }
.page-head p { font-size: clamp(1rem, 2vw, 1.2rem); margin-top: 1.5rem; max-width: 28rem; }
body.has-mailbox .page-head h1 { font-size: clamp(3.7rem, 9vw, 6.5rem); }
.status { min-height: 1.45rem; color: var(--mint); margin: .8rem 0; font-size: .92rem; overflow-wrap: anywhere; }
.status[data-error] { color: var(--danger); }
.entry-form { display: grid; gap: .6rem; width: min(100%, 23rem); margin-top: .4rem; }
.entry-form label { font-weight: 650; }
.entry-form .button { justify-self: start; margin-top: .35rem; }
.hint { color: var(--muted); font-size: .9rem; }
input, textarea { width: 100%; min-width: 0; background: #0a101a; color: var(--ink); border: 1px solid #596780; border-radius: .35rem; padding: .65rem .75rem; min-height: 44px; }
textarea { resize: vertical; }
textarea::placeholder { color: var(--muted); }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: .58rem .9rem; border: 1px solid transparent; border-radius: .35rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.primary { color: #0a241e; background: var(--mint); border-color: var(--mint); }
.primary:hover { background: #d2fff0; border-color: #d2fff0; }
.secondary { color: var(--ink); background: var(--card); border-color: #53637c; }
.secondary:hover { background: #24334a; }
.quiet { color: var(--mint); background: transparent; border-color: transparent; }
.quiet:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.active-name { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; overflow-wrap: anywhere; }
.workspace-actions { margin: .5rem 0 .8rem; }
.action-panel { padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: .6rem; margin: .8rem 0; max-width: 35rem; display: grid; gap: .6rem; }
.action-panel p { color: var(--muted); font-size: .92rem; }
.action-panel input { font: .875rem var(--mono); }
.mailbox { display: grid; grid-template-columns: minmax(10rem, .72fr) minmax(0, 2fr); border: 1px solid var(--line); border-radius: .65rem; overflow: clip; background: var(--panel); }
.contacts { border-right: 1px solid var(--line); padding: clamp(.9rem, 2.5vw, 1.5rem); }
.contacts p { margin-top: .6rem; }
.contacts ul, #messages { list-style: none; padding: 0; margin: 0; }
.contacts ul { display: grid; gap: .35rem; margin-top: .55rem; }
.contacts button { padding: .6rem .65rem; justify-content: start; text-align: start; font-weight: 600; background: transparent; width: 100%; overflow-wrap: anywhere; }
.contacts button[aria-pressed="true"] { border-color: #74b5a6; background: #22332f; }
.contacts button:hover { background: #25324a; }
.conversation { min-width: 0; padding: clamp(.9rem, 2.5vw, 1.5rem); }
.empty { min-height: 16rem; display: grid; align-content: center; justify-items: center; gap: .45rem; text-align: center; padding: .6rem; }
.empty p { color: var(--muted); }
.thread-header { border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.thread-header h2 { font-size: 1.28rem; }
summary { color: var(--mint); padding-block: .45rem; line-height: 1.4; }
#verification p, .settings p { color: var(--muted); margin: .25rem 0 .6rem; font-size: .92rem; }
#safety-code { display: block; color: var(--ink); font: .88rem/1.5 var(--mono); margin: .25rem 0 .5rem; overflow-wrap: anywhere; }
.message-area { overflow-y: auto; min-height: 10rem; max-height: min(45svh, 32rem); padding: .8rem .2rem; }
#messages { display: grid; gap: .5rem; }
#messages li { justify-self: start; max-width: min(92%, 36rem); border: 1px solid var(--line); border-radius: .55rem; padding: .5rem .65rem; background: #192539; overflow-wrap: anywhere; }
#messages li.sent { justify-self: end; background: #1e3633; border-color: #46766b; }
#messages li.unreadable { color: var(--danger); }
#messages li p { white-space: pre-wrap; }
.message-meta { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.compose { display: grid; gap: .5rem; border-top: 1px solid var(--line); padding-top: .65rem; }
.compose button { justify-self: end; }
.settings { margin-top: .85rem; width: fit-content; }
.danger { background: #361a21; color: var(--danger); border-color: #b96d73; }
.danger:hover { background: #502732; }
dialog { width: min(29rem, calc(100% - 2rem)); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: .6rem; padding: 1.15rem; }
dialog p { margin: .55rem 0 1rem; }
dialog::backdrop { background: #03050bd9; }
@media (max-width: 38rem) {
  .mailbox { grid-template-columns: minmax(0, 1fr); }
  .contacts { border-right: none; border-bottom: 1px solid var(--line); }
  .contacts ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
  .entry-art { width: 118%; right: 0; opacity: .7; }
  .entry-art::after { background: linear-gradient(90deg, var(--bg), #090c14d9 36%, transparent 84%, var(--bg)),
    linear-gradient(0deg, var(--bg), transparent 54%, transparent 82%, var(--bg)); }
  .empty { min-height: 11.5rem; }
}

.relay-label { display: inline-block; font: 570 .25em/1 system-ui, sans-serif; letter-spacing: .03em; margin-inline-start: .32em; color: var(--muted); vertical-align: .2em; }
.top { justify-content: space-between; gap: .5rem; }
.top-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: .15rem .6rem; }
.connection { display: inline-flex; gap: .45rem; align-items: center; font-size: .86rem; color: var(--muted); }
.connection > span:first-child { width: .52rem; height: .52rem; border-radius: 50%; background: var(--muted); }
.connection[data-state="live"] > span:first-child { background: var(--mint); box-shadow: 0 0 .6rem var(--mint); }
.connection[data-state="offline"] > span:first-child { background: var(--danger); }
.relay-health-row { display: flex; flex-wrap: wrap; gap: .2rem .65rem; align-items: center; }
#relay-health[data-state="online"] > span:first-child { background: var(--mint); }
#relay-health:is([data-state="storage"], [data-state="unavailable"], [data-state="unreachable"], [data-state="timeout"]) > span:first-child { background: var(--danger); }
#privacy-view { display: grid; gap: .65rem; justify-items: start; border: 1px solid var(--line); border-radius: .7rem; background: var(--panel); padding: 2rem; max-width: 34rem; }
#privacy-view p { color: var(--muted); }
.active-name { margin: 0 .2rem 0 0; font-weight: 750; }
.workspace-actions { min-width: 0; }
.mailbox.focused { grid-template-columns: minmax(0, 1fr); }
.mailbox.focused .contacts { display: none; }
.contact-view { min-width: 0; }
.contacts input { margin-top: .65rem; }
.lane-select { display: flex; flex-wrap: wrap; gap: .4rem; margin: .45rem 0; }
select { background: var(--panel); color: var(--ink); border: 1px solid #596780; border-radius: .35rem; min-height: 44px; padding: .4rem .55rem; max-width: 100%; }
label input[type=checkbox] { width: 1.05rem; height: 1.05rem; min-height: 0; margin: 0 .25rem .17rem 0; vertical-align: middle; accent-color: var(--mint); }
.number { color: var(--mint); font: 600 .86rem var(--mono); }
.contacts button { display: grid; row-gap: .2rem; grid-template-columns: minmax(0, 1fr) auto; align-content: center; padding: .58rem .65rem; }
.contacts button > small:not(.contact-unread) { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 400; }
.contacts button[data-muted="true"] > span:first-child { color: var(--muted); }
.thread-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .55rem; }
.thread-top h2 { flex: 1 1 9rem; }
.menu { position: relative; }
.menu summary { min-height: 44px; padding-inline: .35rem; }
.menu-content { z-index: 2; min-width: min(15rem, 75vw); display: grid; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); padding: .4rem; box-shadow: 0 10px 25px #03051080; }
.menu[open] .menu-content { position: absolute; right: 0; top: 100%; }
.menu-content button { justify-content: flex-start; text-align: start; }
.thread-tools { margin-top: .4rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .38rem; padding: .25rem 0; }
.tag-list:empty { display: none; }
.tag-list span, .reaction-list span { border: 1px solid var(--line); border-radius: 1rem; padding: .17rem .54rem; font-size: .83rem; }
.message-area { max-height: min(58svh, 38rem); overscroll-behavior: contain; }
.message-area .message-subject { font-weight: 730; }
#messages li { width: fit-content; scroll-margin: .6rem; }
#messages li[data-highlight="true"] { outline: 2px solid var(--mint); outline-offset: 3px; }
#messages li .message-menu summary { font-size: .84rem; padding-block: .38rem; }
#messages li .message-menu .actions { margin-top: .3rem; }
#messages li .message-menu button { min-height: 44px; padding: .36rem .56rem; font-size: .85rem; }
#messages li .message-file { margin: .4rem 0; }
#messages li [data-action="file"] { justify-content: start; text-align: start; }
#messages li .file-kind { font-size: .82rem; color: var(--muted); }
#messages li .message-quote { margin: .25rem 0; border-inline-start: 2px solid var(--mint); padding-inline-start: .55rem; color: var(--muted); }
#messages .reaction-list { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: .38rem; }
.message-body { overflow-wrap: anywhere; }
.message-body strong { font-weight: 760; }
.message-body a { color: var(--mint); }
#message[data-drop="true"] { border-color: var(--mint); }
.reply-preview { display: flex; align-items: center; gap: .55rem; justify-content: space-between; border-inline-start: 3px solid var(--mint); padding-inline-start: .5rem; }
.reply-preview p { overflow-wrap: anywhere; }
.file-list { list-style: none; padding: 0; margin: .2rem 0; }
.file-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; overflow-wrap: anywhere; }
.file-check-link { margin-top: .55rem; padding-inline: 0; }
.bitmail-account-card { max-width: 32rem; padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: .65rem; background: var(--panel); }
.bitmail-account-card h1 { font: 400 clamp(1.8rem, 5.5vw, 3rem)/1.08 var(--serif); letter-spacing: -.035em; }
.bitmail-account-card p { margin-block: .65rem 1rem; color: var(--muted); }
.bitmail-account-card #passkey-status:empty { margin: 0; }
.bitmail-passkey-options { margin-top: .45rem; }
.compose-send { justify-content: end; }
.compose-send .hint { margin-inline-end: auto; }
.compose .file-list:empty { display: none; }
.compose-status .status { margin: .15rem 0; min-height: 0; }
.compose label { font-weight: 650; }
.inline-limited { max-width: 22rem; }
.settings-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.settings-row input { flex: 1 1 10rem; width: auto; }
.settings-row label { min-width: 9rem; }
#profile-form { max-width: 27rem; }
#settings-dialog details { border-top: 1px solid var(--line); padding-block: .33rem; }
.settings-list { display: grid; gap: .5rem; margin: .5rem 0; }
.settings-list > button { justify-self: start; }

@font-face {
  font-family: "Bit Mail Hieroglyphs";
  src: url("/bitmail/inbox/assets/egyptian-symbols.ffd650ed9536bf33.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+13000-13001,U+13080,U+130B8,U+1313F,U+13153,U+13171,U+131A3,U+131B9,U+13216,U+13254,U+133E4;
}

@font-face {
  font-family: "Bit Mail Cuneiform";
  src: url("/bitmail/inbox/assets/cuneiform-symbols.20b80d16ee2915d1.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+12000,U+1200A,U+12020,U+1202D,U+12032,U+12038,U+12040,U+12055,U+12079,U+12100,U+12226,U+1230B;
}

@font-face {
  font-family: "Bit Mail Phaistos";
  src: url("/bitmail/inbox/assets/phaistos-symbols.d7768e6dd27e1eec.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+101D0,U+101D1,U+101D9,U+101DB,U+101E7,U+101E8,U+101EE,U+101EF,U+101F1,U+101F4,U+101F5,U+101FC;
}

.secret-symbols { border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .65rem; }
.secret-symbols summary { cursor: pointer; }
.secret-symbols label { display: block; margin-block-start: .5rem; }
.symbol-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(2.65rem, 1fr)); gap: .35rem; margin-block: .55rem; }
.symbol-key { min-height: 2.75rem; min-width: 0; padding: .25rem; font: 1.35rem/1 "Bit Mail Hieroglyphs", "Bit Mail Cuneiform", "Bit Mail Phaistos", "Segoe UI Historic", system-ui, sans-serif; }
.secret-symbols .status:empty { display: none; }
.filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.filter-grid label { display: grid; gap: .25rem; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem; margin-bottom: .4rem; }
body.has-mailbox main { padding-block-start: clamp(1.5rem, 3.5vw, 3.25rem); }
body.has-mailbox .page-head h1 { font-size: clamp(3.7rem, 8vw, 5.65rem); }
dialog { width: min(45rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: calc(100svh - 2rem); overflow: auto; }
@media (min-width: 60rem) {
  .message-area { max-height: clamp(12rem, calc(100svh - 43rem), 31rem); }
}
dialog h3 { margin: .7rem 0 .35rem; font-size: 1rem; }
dialog p { margin: .45rem 0; }
.dialog-list { list-style: none; margin: .5rem 0; padding: 0; display: grid; gap: .38rem; }
.dialog-list > li { padding: .55rem .6rem; border: 1px solid var(--line); border-radius: .35rem; overflow-wrap: anywhere; }
.dialog-list button { justify-content: start; text-align: start; }
.dialog-list strong { display: block; }
.dialog-list small { display: block; color: var(--muted); margin-bottom: .2rem; }
#image-dialog img { width: auto; max-width: 100%; max-height: 74svh; display: block; margin-inline: auto; }
#attachment-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 66svh; overflow: auto; padding: .75rem; background: var(--card); }
#file-browser select { min-width: 0; }
#file-browser-list h3 { overflow-wrap: anywhere; }
#file-browser-list .actions { margin-block-start: .35rem; }
#file-browser-more { margin-block-start: .5rem; }
#device-id { display: block; color: var(--mint); overflow-wrap: anywhere; }
.timing-list { display: grid; grid-template-columns: minmax(6rem,1fr) minmax(9rem,2fr); gap: .3rem .7rem; }
.timing-list dd { margin: 0; color: var(--muted); }
body[data-density="compact"] #messages { gap: .3rem; }
body[data-density="compact"] #messages li { padding: .35rem .48rem; }
body[data-message-size="large"] .message-body, body[data-message-size="large"] textarea { font-size: 1.2rem; }
body[data-theme="light"] {
  color-scheme: light;
  --bg: #ebf1f2; --panel: #f8fbfb; --card: #e9f0f0; --line: #849ba3; --ink: #102027; --muted: #415861;
  --mint: #075d49; --danger: #9b131c;
  background: var(--bg); color: var(--ink);
}
body[data-theme="light"] .entry-art { opacity: .18; }
body[data-theme="light"] input, body[data-theme="light"] textarea { background: #fff; }
body[data-theme="light"] .primary { background: var(--mint); color: #fff; border-color: var(--mint); }
body[data-theme="light"] .secondary:hover, body[data-theme="light"] .contacts button:hover { background: #d5e8e5; }
body[data-theme="light"] .contacts button[aria-pressed="true"], body[data-theme="light"] #messages li.sent { background: #def5e9; }
body[data-theme="light"] #messages li { background: #e9f3fc; }
body[data-theme="light"] .danger { background: #fff3f2; }
@media (max-width: 38rem) {
  .relay-label { font-size: .23em; }
  .top-tools .button { font-size: .87rem; }
  .button { padding-inline: .65rem; }
  .thread-top h2 { flex-basis: 100%; }
  .mailbox.focused { grid-template-columns: minmax(0,1fr); }
  .message-area { max-height: 46svh; }
  .thread-tools .button, .composer-tools .button { font-size: .88rem; }
  .filter-grid { gap: .4rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .entry-art[data-arrival="true"] { animation: relay-flash 620ms ease-out; }
  @keyframes relay-flash { 0% { filter: brightness(1.4); } 100% { filter: brightness(1); } }
}

.contacts .draft-tag { color: var(--mint); font-weight: 650; }
.attachment-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .35rem .8rem; margin: .45rem 0; }
.attachment-stats dt { font-size: .84rem; color: var(--muted); }
.attachment-stats dd { margin: 0; font-weight: 650; }
.attachment-row > button { margin-block-start: .35rem; }
.benchmark { max-width:55rem; }
.benchmark h1 { font:400 clamp(2.7rem,7vw,5.2rem)/1 Georgia,serif; letter-spacing:-.04em; margin:0 0 1.1rem; }
.benchmark section > p { max-width:50ch; color:var(--muted); }
.benchmark .settings-list { max-width:34rem; margin:1rem 0; }
#bench-results, #bench-arrivals { margin-top:1.2rem; border-top:1px solid var(--line); padding-top:.8rem; }

#phrase-form { display: grid; gap: .55rem; }
#phrase-form > label { margin-top: .2rem; }
#phrase-select { justify-self: start; }
#phrase-status:empty { display: none; }
#phrase-form > .actions { margin-top: .2rem; }

#device-recovery { max-width: 41rem; }
#device-replacement { margin-top: 1rem; }
#device-replacement summary { cursor: pointer; }
#device-recovery-detail { color: var(--ink); }

.file-check-page { max-width: 48rem; padding-block: clamp(2rem, 6vw, 4rem); }
.file-check-page h1 { font-size: clamp(2.1rem, 8vw, 3.85rem); line-height: 1.05; letter-spacing: -.032em; }
.file-check-page .page-head p { max-width: 35rem; color: var(--muted); margin-block-end: 1rem; }
.file-check-panel { padding: clamp(1rem, 3.8vw, 1.65rem); background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; }
.file-check-panel h2, .file-check-next h2 { margin-top: 0; }
.file-check-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.file-check-inputs label { display: grid; min-width: 0; gap: .35rem; }
.file-check-inputs input { min-width: 0; width: 100%; }
.file-check-samples { margin-block-start: 1.25rem; padding-block-start: .85rem; border-block-start: 1px solid var(--line); }
.file-check-result .status { font-weight: 700; }
.file-check-result dl { margin-block: .5rem 0; }
.file-check-result dt { font-size: .875rem; color: var(--muted); }
.file-check-result dd { margin: .25rem 0 .7rem; font: .85rem/1.45 ui-monospace, monospace; overflow-wrap: anywhere; }
.file-check-next { padding-block: 1.5rem; }



.file-receipt-fields { margin: .75rem 0; }
.file-receipt-fields > div { margin-block: .5rem; }
.file-receipt-fields dt { font-size: .875rem; color: var(--muted); }
.file-receipt-fields dd { margin: .2rem 0 0; overflow-wrap: anywhere; }

.receipt-verifier { border-block-start: 1px solid var(--line); }
.receipt-verifier summary { font-weight: 760; cursor: pointer; }
.receipt-verifier .status { margin-block: 0; }
#file-version-request { margin-block: .5rem; }
#file-version-request p { margin-block: .25rem .65rem; }
