:root{color-scheme:dark;--bg:#090e1b;--panel:#121a2b;--panel2:#172239;--line:#26354d;--text:#f3f6fb;--muted:#9caec5;--teal:#73f0d0;--gold:#f5c96b;--danger:#ff9c9c;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% -20%,#17374b 0,transparent 50%),var(--bg);color:var(--text)}button,input,textarea,select{font:inherit}.topbar,main,footer{width:min(1040px,calc(100% - 36px));margin-inline:auto}.topbar{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #ffffff12}.topbar-actions{display:flex;align-items:center;gap:18px}.language-picker{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.78rem}.language-picker select{max-width:150px;min-height:38px;padding:0 30px 0 10px;border:1px solid var(--line);border-radius:10px;background:#10192a;color:var(--text)}.brand{display:flex;align-items:center;gap:11px;color:var(--text);text-decoration:none;font-weight:850;letter-spacing:.1em;font-size:.93rem}.brand-light{font-weight:400;color:#bac6d7}.brand-mark{width:38px;height:38px;display:block;border-radius:12px}.secure-label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.7rem;letter-spacing:.13em}.secure-dot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--teal);box-shadow:0 0 12px #73f0d0}.intro{padding:68px 0 30px;text-align:center}.eyebrow{color:var(--teal);font-size:.72rem;letter-spacing:.2em;font-weight:750}.intro h1{font-size:clamp(2.55rem,8vw,5.2rem);line-height:.99;letter-spacing:-.055em;margin:20px 0}.intro h1 span{color:var(--gold)}.lead{max-width:590px;margin:0 auto;color:var(--muted);font-size:1.08rem;line-height:1.7}.workspace{max-width:720px;margin:14px auto 58px;background:linear-gradient(145deg,#151e30,#0f1727);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 90px #0006;overflow:hidden}.tabs{display:flex;padding:9px;border-bottom:1px solid var(--line);gap:8px}.tab{min-height:44px;flex:1;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--muted);font-weight:700;cursor:pointer}.tab.is-active{background:#73f0d016;color:var(--teal);border-color:#73f0d033}.panel{padding:26px;display:grid;gap:12px}.panel[hidden]{display:none}label{font-size:.88rem;font-weight:700}.muted{color:var(--muted);font-size:.82rem;font-weight:450}textarea,input[type=password],#package-file{width:100%;max-width:100%;background:#0a1120;border:1px solid #30405b;color:var(--text);border-radius:13px;padding:15px;outline:none}textarea{min-height:180px;resize:vertical;line-height:1.55}textarea:focus-visible,input:focus-visible,select:focus-visible,button:focus-visible,.file-picker:focus-visible{outline:3px solid var(--teal);outline-offset:3px}textarea:focus,input:focus{border-color:var(--teal);box-shadow:0 0 0 3px #73f0d01a}#package-file{min-width:0;font-size:.88rem}.attachment-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:46px}.attachment-row input[type=file]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}#attachment:focus-visible+.file-picker{outline:3px solid var(--teal);outline-offset:3px}.file-picker{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px 13px;color:#dce7f3;cursor:pointer}.file-picker span{font-size:1.3rem;color:var(--teal)}.primary,.secondary,.copy-button,.share-button{border:0;border-radius:12px;min-height:48px;padding:0 18px;font-weight:800;cursor:pointer}.primary{margin-top:6px;background:linear-gradient(100deg,var(--teal),#9cfae4);color:#09121b}.secondary,.copy-button,.share-button{background:#1d2a41;color:var(--text);border:1px solid #33455f}.primary:disabled,.secondary:disabled{opacity:.55;cursor:not-allowed}.result{border:1px solid var(--line);background:#0b1221;border-radius:14px;padding:15px;overflow-wrap:anywhere;line-height:1.5}.result[hidden]{display:none}.result p:first-child{margin-top:0}.key-box{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#ffd879;display:block;padding:12px;background:#1a1a24;border-radius:9px;word-break:break-all;margin:8px 0}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.actions button{flex:1;min-width:160px}.opened-text{white-space:pre-wrap;color:#e9f2ff;padding:12px;background:#121c2d;border-radius:10px;max-height:40vh;overflow:auto}.error{color:var(--danger)}.trust-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px auto 24px}.trust-grid article{padding:20px;background:#111a2a;border:1px solid #202e44;border-radius:17px}.step{font-size:.73rem;letter-spacing:.15em;color:var(--teal);font-weight:800}.trust-grid h2{font-size:1.02rem;margin:13px 0 7px}.trust-grid p{font-size:.88rem;color:var(--muted);line-height:1.55;margin:0}.disclaimer{max-width:720px;margin:0 auto 48px;text-align:center;color:#8090a5;font-size:.79rem;line-height:1.6}footer{display:flex;justify-content:space-between;gap:16px;padding:22px 0 30px;border-top:1px solid #ffffff12;color:#8798ae;font-size:.75rem}footer span:first-child{letter-spacing:.14em;color:#cbd6e4;font-weight:800}html[dir=rtl] .secure-label{letter-spacing:0}@media(max-width:640px){.topbar,main,footer{width:min(100% - 24px,1040px)}.topbar{min-height:64px}.topbar-actions{gap:8px}.language-picker{gap:5px;font-size:.68rem}.language-picker select{max-width:120px}.brand{font-size:.77rem;gap:7px}.brand-mark{width:33px;height:33px}.secure-label{font-size:.55rem;letter-spacing:.04em}.intro{padding:46px 8px 22px}.lead{font-size:.96rem}.workspace{border-radius:17px;margin-bottom:42px}.panel{padding:18px}.trust-grid{grid-template-columns:1fr;gap:9px}.trust-grid article{padding:16px}.trust-grid h2{margin:8px 0 5px}footer{flex-direction:column;align-items:center;text-align:center}}@media(max-width:430px){.secure-label>span:last-child{display:none}.topbar{gap:8px}.topbar-actions{gap:10px}.language-picker>span{display:none}.language-picker select{max-width:112px}.intro h1{font-size:clamp(2.35rem,11vw,3.3rem)}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.offline-status{max-width:720px;margin:0 auto 18px;padding:12px 15px;border:1px solid #5a4a24;border-radius:12px;background:#221c10;color:#f2d491;font-size:.84rem;line-height:1.5}
.offline-status[hidden]{display:none}

/* Bidi isolation: keys, URLs and the key field are machine strings. They must
   never be reordered by an RTL document, even when they begin or end with
   "-", "_" or digits. Message prose keeps its own direction (see .opened-text). */
.key-box{direction:ltr;unicode-bidi:isolate;text-align:left}
#secret-key{direction:ltr;unicode-bidi:isolate;text-align:left}
#file-name{unicode-bidi:plaintext}
.opened-text{unicode-bidi:plaintext;text-align:start}

/* Account and receiver authentication UI. The section stays hidden until the
   local /api/health probe succeeds, so the static-only build is unchanged. */
.account{max-width:720px;margin:14px auto 58px;padding:22px;background:linear-gradient(145deg,#151e30,#0f1727);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 90px #0006}
.account h2{font-size:clamp(1.45rem,4vw,2rem);line-height:1.15;margin:10px 0 8px}
.account h3{font-size:1.05rem;margin:0 0 8px}
.account>[hidden],.account-card[hidden],#account-logged-out[hidden]{display:none}
.account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin-top:16px}
.account-card{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#0b1221}
.account-card label{display:block;margin-top:12px;color:var(--muted);font-size:.85rem}
.account-card input{width:100%;min-height:42px;margin-top:5px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:#0f1727;color:var(--text)}
.account-card input:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.account-card .primary,.account-card .secondary{margin-top:12px}
.account-status{margin:14px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#10192a;color:var(--muted);line-height:1.45}
.account-status.error{border-color:#6b2a2a;color:var(--danger)}
.totp-grid{display:grid;grid-template-columns:auto 1fr;gap:18px;align-items:start;margin-top:14px}
.totp-qr{width:220px;height:220px;padding:8px;border-radius:12px;background:#fff}
.recovery-codes{white-space:pre-wrap;direction:ltr;text-align:left;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#ffd879;background:#0f1727;border:1px solid var(--line);border-radius:9px;padding:10px;margin:6px 0;overflow-wrap:anywhere}
.fingerprint{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#ffd879;overflow-wrap:anywhere}
.inbox{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:10px}
.inbox li{padding:12px;border:1px solid var(--line);border-radius:12px;background:#0f1727}
.inbox .message-meta{display:flex;flex-wrap:wrap;gap:8px 14px;color:var(--muted);font-size:.82rem;margin-bottom:6px}
.inbox .message-from{color:var(--text);font-weight:700;overflow-wrap:anywhere}
.inbox .message-fingerprint{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#ffd879}
.send-form{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.send-form label{display:block;color:var(--muted);font-size:.85rem}
.send-form input{width:100%;min-height:40px;margin-top:4px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#0f1727;color:var(--text)}
.send-form .muted{margin:8px 0 0}
@media(max-width:560px){.totp-grid{grid-template-columns:1fr}.totp-qr{width:180px;height:180px}.account{padding:16px}}

/* Account e-mail fields are machine identifiers, not prose. */
.account-card input[type=email]{direction:ltr;unicode-bidi:isolate;text-align:left}
