
:root{--ink:#231e37;--muted:#68637d;--accent:#5e43c4;--deep:#5033b8;--line:#ebe8f2;--rail:#f6f4fc;--wash:#faf9fd;--white:#fff;--shadow:0 20px 65px #21174926;font:15px/1.5 "Inter",system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--wash)}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button{border:0;background:none}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}[hidden]{display:none!important}
.app{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100dvh}.side{display:flex;flex-direction:column;background:var(--rail);border-right:1px solid var(--line);padding:30px 20px 21px;gap:28px}.brand{display:flex;align-items:center;gap:11px;padding:0 6px}.mark{width:41px;height:41px;display:grid;place-items:center;color:white;background:var(--accent);border-radius:13px}.mark svg{width:22px;height:22px}.wordmark{font-size:19px;font-weight:780;letter-spacing:-.6px;line-height:1.1}.subtitle{font-size:12px;color:var(--muted);font-weight:550;margin-top:4px}.primary{background:var(--accent);color:white;border-radius:11px;font-weight:690;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 16px}.primary:hover{background:var(--deep)}.compose-trigger{min-height:47px;box-shadow:0 5px 12px #5e43c42b}.side nav{display:grid;gap:5px}.nav{display:flex;gap:11px;align-items:center;text-align:left;width:100%;min-height:43px;padding:8px 11px;border-radius:9px;color:#55506a;font-weight:560}.nav:hover,.nav.active{background:#e9e2fa;color:var(--deep)}.nav.active{font-weight:730}.nav .count{margin-left:auto;font-size:12px;font-variant-numeric:tabular-nums}.account{margin-top:auto;display:flex;align-items:center;gap:9px;padding:14px 2px 0;border-top:1px solid #e5e0ef}.account strong,.account small{display:block}.account small{font-size:11px;color:var(--muted)}.account .avatar{width:33px;height:33px}
.work{min-width:0}.top{height:79px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:0 35px;background:#fff}.search{display:flex;align-items:center;gap:12px;height:43px;width:min(520px,100%);padding:0 13px;background:#f5f3fa;border:1px solid #eeebf6;border-radius:10px;color:var(--muted)}.search:focus-within{border-color:#bfb1f1}.search input{border:0;background:none;outline:none;min-width:0;width:100%;font-size:14px}.search input:focus-visible{outline:none}.demo{display:flex;align-items:center;gap:7px;white-space:nowrap;color:var(--muted);font-size:12px}.demo::before,.unread::before{content:"";display:block;width:7px;height:7px;background:#8a6de4;border-radius:50%;flex:none}.mobile-toggle{display:none!important}
.content{max-width:1280px;margin:auto;padding:35px 35px 45px}.heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:22px}h1{font-size:40px;letter-spacing:-1.9px;line-height:1.1;margin:0 0 8px}h2{line-height:1.2}.hint{margin:0;color:var(--muted);font-size:14px}.switch{display:flex;gap:3px;background:#f0edf7;border-radius:9px;padding:3px}.switch button{font-size:12px;font-weight:650;color:var(--muted);padding:6px 11px;border-radius:7px;white-space:nowrap}.switch button[aria-pressed="true"]{background:#fff;color:var(--deep);box-shadow:0 1px 3px #21174916}
.sheet{border:1px solid #e9e5f0;border-radius:15px;background:white;overflow:hidden;box-shadow:0 4px 22px #2c194606}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:0 17px}.tools{display:flex;align-items:center;gap:5px}.meta,.group{color:var(--muted);font-size:12px}.group{background:#f9f7fc;padding:8px 18px;border-block:1px solid var(--line);font-weight:700}.icon{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:8px;color:#615a77;padding:0;flex:none}.icon:hover,.secondary:hover{background:#eeebf8;color:var(--deep)}.icon.on{color:#956315}.icon.on svg{fill:#ffd880}
.row{display:grid;grid-template-columns:20px 34px minmax(0,1fr) 62px 72px;align-items:center;gap:9px;min-height:60px;padding:0 16px;border-bottom:1px solid var(--line);position:relative}.row:last-child{border-bottom:0}.row.unread{background:#fbf9ff}.row:hover,.row:focus-within{background:#f4f0fd}.row.unread::before{position:absolute;left:4px;width:5px;height:5px}.row input,.toolbar input{accent-color:var(--accent);width:15px;height:15px;cursor:pointer}.open-mail{display:grid;align-items:center;grid-template-columns:34px minmax(83px,145px) minmax(0,1fr);gap:10px;min-width:0;padding:7px 0;text-align:left}.avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;background:#ece4ff;color:#5939af;font-size:11px;font-weight:780;letter-spacing:.2px;flex:none}.mint{background:#ddf3eb;color:#23674f}.peach{background:#fae9db;color:#894a27}.sky{background:#e3ecfc;color:#385a94}.rose{background:#f7e4ed;color:#8b4262}.sender,.summary,.subject,.snippet{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sender,.subject{font-size:13px}.unread .sender,.unread .subject{font-weight:780}.snippet{font-size:12px;color:var(--muted);margin-left:7px}.date{font-size:11px;color:#625c77;text-align:right;white-space:nowrap}.row-actions{display:flex;justify-content:end}.row-actions .icon{width:32px}.row-actions svg{width:16px}.empty{padding:50px 20px;text-align:center;color:var(--muted)}
.reader{padding:24px 29px 35px}.reader-bar{display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--line);padding-bottom:13px;margin-bottom:25px}.reader h2{font-size:30px;letter-spacing:-.8px;margin:0 0 21px;overflow-wrap:anywhere}.sender-block{display:flex;gap:10px;align-items:center}.sender-block span small{display:block;color:var(--muted);overflow-wrap:anywhere}.sender-block time{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}.body{white-space:pre-wrap;overflow-wrap:anywhere;margin:24px 0 31px;max-width:75ch}.secondary{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #e1d9ef;border-radius:8px;padding:8px 11px;font-weight:630;font-size:13px}.secondary svg{width:16px}.reader-actions{display:flex;gap:8px;flex-wrap:wrap}
.composer{position:fixed;z-index:4;right:34px;bottom:0;width:min(510px,calc(100vw - 68px));background:#fff;border:1px solid #ddd3f2;border-radius:15px 15px 0 0;box-shadow:var(--shadow);overflow:hidden}.composer-head{background:#ede7fb;display:flex;align-items:center;justify-content:space-between;padding:7px 12px 7px 17px;color:#402b79}.composer-head h2{font-size:14px;margin:0}.fields{padding:0 17px}.field{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);font-size:13px}.field label{min-width:48px;color:var(--muted)}.field input{padding:11px 0;width:100%;border:0;background:none}.fields textarea{border:0;display:block;width:100%;height:clamp(105px,28vh,245px);resize:vertical;padding:13px 0}.compose-foot{padding:12px 16px;display:flex;align-items:center;gap:7px;border-top:1px solid var(--line)}.compose-foot .discard{margin-left:auto}.file-list{display:flex;flex-wrap:wrap;gap:5px;padding:0;margin:0}.file-list li{list-style:none;background:#f2eefb;color:#4d348f;border-radius:5px;padding:3px 7px;font-size:12px;word-break:break-all}.file-list:not(:empty){padding-bottom:8px}.toast{position:fixed;z-index:6;left:50%;bottom:20px;translate:-50% 0;border-radius:9px;background:#2b2145;color:white;padding:10px 16px;box-shadow:var(--shadow);max-width:calc(100% - 25px);font-size:13px}.compose-open .toast{bottom:auto;top:84px}.backdrop{display:none}
@media(max-width:960px){.app{grid-template-columns:195px minmax(0,1fr)}.content{padding-inline:22px}.top{padding-inline:22px}.open-mail{grid-template-columns:32px minmax(0,1fr)}.sender{grid-column:2}.open-mail .avatar{grid-row:span 2}.summary{grid-column:2}.open-mail{gap:0 8px}}
@media(max-width:680px){.app{display:block}.top{height:63px;padding:0 12px;gap:9px}.demo{font-size:0;gap:0}.demo::before{width:8px;height:8px}.mobile-toggle{display:inline-grid!important}.side{position:fixed;z-index:5;inset:0 auto 0 0;width:min(260px,85vw);visibility:hidden;transform:translateX(-110%);transition:transform .2s}.menu-open .side{visibility:visible;transform:none}.menu-open .backdrop{display:block;position:fixed;z-index:4;inset:0;background:#241a4055;width:100%}.content{padding:23px 10px 24px}.heading{margin-inline:5px;margin-bottom:15px}.heading h1{font-size:33px}.hint{font-size:12px}.row{grid-template-columns:25px minmax(0,1fr) 55px;gap:5px;padding:0 8px;min-height:68px}.row>input,.row-actions{display:none}.open-mail{padding:5px 0}.open-mail .avatar{width:29px;height:29px}.open-mail{grid-template-columns:29px minmax(0,1fr)}.snippet{display:block;margin-left:0}.reader{padding:14px 13px 23px}.reader h2{font-size:24px}.reader-bar{margin-bottom:17px}.reader-bar .icon{width:30px}.composer{inset:0;width:100%;height:100dvh;border-radius:0;display:flex;flex-direction:column}.composer form{display:flex;flex:1;flex-direction:column;min-height:0}.composer .fields{flex:1;display:flex;flex-direction:column;min-height:0}.composer textarea{flex:1;min-height:70px;resize:none}.compose-foot{padding-bottom:max(12px,env(safe-area-inset-bottom))}.mobile-compose{position:fixed;right:15px;bottom:16px;z-index:2;box-shadow:var(--shadow)}.content{padding-bottom:74px}}
@media(min-width:681px){.mobile-compose{display:none}}
.editor-tools{display:flex;flex-wrap:wrap;gap:3px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.format{height:32px;min-width:32px;padding:0 6px;border-radius:6px;color:#514767;font-size:14px;display:grid;place-items:center}
.format:hover,.format[aria-pressed="true"]{background:#ede7fb;color:var(--deep)}.format svg{width:17px;height:17px}
.tool-divider{height:19px;width:1px;background:var(--line);margin:0 3px}
.editor{width:100%;height:clamp(105px,25vh,245px);min-height:80px;overflow:auto;padding:12px 3px;overflow-wrap:anywhere;white-space:pre-wrap}
.editor:empty::before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.editor a,.body a{color:var(--deep);text-decoration:underline}
.link-editor{display:flex;gap:8px;align-items:center;padding:7px 0;border-bottom:1px solid var(--line)}
.link-editor input{flex:1;width:0;min-width:0;border:1px solid #ddd3f2;border-radius:7px;padding:6px 8px;font-size:13px}
.link-editor .secondary{white-space:nowrap}
.thread-count{display:inline-block;background:#efebfa;color:var(--deep);border-radius:5px;padding:0 5px;margin-left:5px;font-size:11px;font-weight:700;vertical-align:1px}
.thread-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px}.thread-heading h2{margin:0}
.thread-meta{font-size:12px;color:var(--muted);margin:0 0 15px}.thread-stack{display:grid;gap:10px}
.thread-card{border:1px solid var(--line);border-radius:11px;background:white}
.thread-card summary{list-style:none;display:grid;align-items:center;grid-template-columns:34px minmax(0,1fr) auto 18px;gap:10px;padding:12px;cursor:pointer}
.thread-card summary::-webkit-details-marker{display:none}.thread-card summary:hover{background:#f7f4fd;border-radius:10px}
.thread-card summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:10px}
.thread-card[open] summary{border-bottom:1px solid var(--line);border-radius:10px 10px 0 0}
.thread-card[open] .chevron{rotate:180deg}.thread-card[open] .thread-preview{display:none}.thread-card:not([open]) .thread-address{display:none}
.thread-preview,.thread-address{display:block;font-size:12px;color:var(--muted)}
.thread-preview{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.thread-address{overflow-wrap:anywhere}
.thread-card time{color:var(--muted);font-size:11px;white-space:nowrap}.chevron{color:var(--muted)}
.thread-content{padding:12px 16px 16px}.thread-content .body{margin:15px 0 21px}
@media(max-width:680px){.composer form{overflow-y:auto}.composer .editor{flex:1;height:auto}.thread-heading{align-items:start}.thread-heading button{font-size:11px;white-space:nowrap}.thread-card summary{gap:7px;padding:10px 8px}.thread-content{padding-inline:11px}.link-editor .secondary{padding-inline:6px}}
/* Settings and the two appearance options */
.settings-link{margin-top:-15px}.side{overflow-y:auto}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.settings-card{padding:20px 21px;display:flex;flex-direction:column;gap:11px}.settings-card h2{font-size:17px;letter-spacing:-.2px;margin:0;display:flex;gap:9px;align-items:center}
.settings-card h2 svg{color:var(--deep)}.settings-card p{margin:0;color:var(--muted);font-size:13px}
.settings-card form{display:grid;gap:10px}.settings-card form>button,.settings-card>button{justify-self:start;align-self:start}
.setting-field{display:grid;gap:4px;font-size:13px;font-weight:650}.setting-field input,.setting-field textarea{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:var(--wash);font-weight:400;min-width:0;width:100%}
.setting-field textarea{resize:vertical;min-height:90px}.setting-check{display:flex;align-items:center;gap:7px;font-size:13px}.setting-check input{accent-color:var(--accent)}
.appearance-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.theme-option{display:grid;gap:6px;justify-items:start;border:1px solid var(--line);border-radius:9px;padding:9px;text-align:left;font-size:13px;font-weight:650}
.theme-option[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.theme-sample{width:100%;height:38px;border:1px solid #ddd4ed;border-radius:5px;background:linear-gradient(90deg,#e9e2fa 29%,#faf8fd 29%);position:relative}
.theme-sample::after{content:"";position:absolute;inset:9px 8px 9px 37%;border:1px solid #eee7f8;border-radius:3px;background:white}
.theme-sample.dark{background:linear-gradient(90deg,#28203b 29%,#171321 29%);border-color:#463856}
.theme-sample.dark::after{background:#211a30;border-color:#463856}
[data-theme="dark"]{color-scheme:dark;--ink:#ede8f8;--muted:#b9afcc;--accent:#a58bf7;--deep:#c7b4ff;--line:#3c3250;--rail:#201a2e;--wash:#171321;--white:#241d33;--shadow:0 20px 65px #0a07149a}
[data-theme="dark"] .top,[data-theme="dark"] .sheet,[data-theme="dark"] .thread-card,[data-theme="dark"] .composer{background:var(--white);border-color:var(--line)}
[data-theme="dark"] .nav,[data-theme="dark"] .icon,[data-theme="dark"] .date,[data-theme="dark"] .format{color:var(--muted)}
[data-theme="dark"] .primary,[data-theme="dark"] .mark{background:#795bd0;color:white}
[data-theme="dark"] .primary:hover{background:#6b4cbf}
[data-theme="dark"] .nav:hover,[data-theme="dark"] .nav.active,[data-theme="dark"] .icon:hover,[data-theme="dark"] .secondary:hover,[data-theme="dark"] .format:hover,[data-theme="dark"] .format[aria-pressed="true"],[data-theme="dark"] .thread-card summary:hover{background:#3b2c55;color:var(--deep)}
[data-theme="dark"] .search,[data-theme="dark"] .switch,[data-theme="dark"] .group,[data-theme="dark"] .row.unread{background:#2a223b;border-color:var(--line)}
[data-theme="dark"] .row:hover,[data-theme="dark"] .row:focus-within,[data-theme="dark"] .switch button[aria-pressed="true"],[data-theme="dark"] .composer-head,[data-theme="dark"] .thread-count,[data-theme="dark"] .file-list li{background:#38294f;color:var(--deep)}
[data-theme="dark"] .secondary,[data-theme="dark"] .link-editor input,[data-theme="dark"] .account{border-color:var(--line)}
[data-theme="dark"] .icon.on{color:#ffc56b}
@media(max-width:800px){.settings-grid{grid-template-columns:1fr}}
@media(max-width:680px){.settings-card{padding:15px}.side{gap:21px}.settings-link{margin-top:-10px}}

.auth{min-height:100dvh;display:grid;place-items:center;padding:24px}
.login{width:min(440px,100%);padding:30px;display:grid;gap:16px}.login .brand{padding:0}.login h1{font-size:29px;margin:4px 0 0}
.login form{display:grid;gap:12px}.login .primary{justify-self:start}.login [role=status]{min-height:23px}
.top .pilot-label{font-size:13px;font-weight:650;color:var(--muted)}
.pilot-bar{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;gap:8px}
.pilot-row{display:grid;grid-template-columns:minmax(0,1fr) max-content;padding:0 14px;gap:8px}
.pilot-row .open-mail{min-height:58px}.pilot-row .date{overflow:hidden;text-overflow:ellipsis}
.pilot-reader .message-meta{overflow-wrap:anywhere;color:var(--muted);font-size:13px}
.links a{text-decoration:none;color:var(--deep);align-self:start}
@media(max-width:680px){.top .pilot-label{font-size:12px}.login{padding:22px}.pilot-row{grid-template-columns:minmax(0,1fr) auto}.pilot-row .date{max-width:81px}}
