:root {
    --ink: #201d35;
    --ink-soft: #625e75;
    --muted: #89859a;
    --paper: #ffffff;
    --surface: #f7f6fc;
    --surface-strong: #efedf9;
    --line: #e6e3ef;
    --purple: #6757d9;
    --purple-dark: #5040be;
    --purple-soft: #eeebff;
    --green: #1f9d78;
    --red: #d64d63;
    --shadow: 0 22px 60px rgba(40, 31, 93, .12);
    --shadow-small: 0 10px 30px rgba(40, 31, 93, .08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.container {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    color: #fff;
    background: var(--ink);
    border-radius: 10px;
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(230, 227, 239, .8);
    background: rgba(247, 246, 252, .88);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1.34rem;
    font-weight: 800;
    letter-spacing: -.04em;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #7869e8, #5645c6);
    border-radius: 11px;
    box-shadow: 0 7px 18px rgba(103, 87, 217, .28);
}

.brand-mark svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { color: var(--ink-soft); font-size: .92rem; font-weight: 650; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--purple); }

.site-nav .nav-pill {
    padding: 10px 16px;
    color: #fff;
    background: var(--ink);
    border-radius: 11px;
}

.site-nav .nav-pill:hover, .site-nav .nav-pill:focus-visible { color: #fff; background: var(--purple); }

.landing {
    min-height: calc(100vh - 76px);
    overflow: hidden;
    padding: 78px 0 54px;
    background:
        radial-gradient(circle at 5% 20%, rgba(112, 91, 224, .11), transparent 27rem),
        radial-gradient(circle at 95% 12%, rgba(52, 197, 164, .09), transparent 24rem),
        var(--surface);
}

.landing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .8fr);
    align-items: center;
    gap: clamp(56px, 8vw, 112px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--purple-dark);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.status-spark {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(31, 157, 120, .11);
}

.hero-copy h1, .inbox-heading h1 {
    margin: 0;
    max-width: 650px;
    font-size: clamp(3.45rem, 6vw, 5.8rem);
    line-height: .98;
    letter-spacing: -.07em;
}

.hero-copy h1 span { color: var(--purple); }

.hero-lede {
    max-width: 610px;
    margin: 28px 0 34px;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 1.6vw, 1.23rem);
    line-height: 1.7;
}

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.feature-row div { display: flex; flex-direction: column; gap: 3px; padding-right: 18px; }
.feature-row strong { font-size: .93rem; }
.feature-row span { color: var(--muted); font-size: .78rem; }

.create-card {
    position: relative;
    padding: 34px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.create-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -13px;
    border: 1px solid rgba(103, 87, 217, .09);
    border-radius: 36px;
}

.card-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 28px; }
.card-heading h2 { margin: 0 0 4px; font-size: 1.35rem; letter-spacing: -.03em; }
.card-heading p { margin: 0; color: var(--muted); font-size: .88rem; }

.mini-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--purple);
    background: var(--purple-soft);
    border-radius: 13px;
}

.mini-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.create-card label { display: block; margin-bottom: 8px; font-size: .81rem; font-weight: 750; }

.address-builder { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(150px, .8fr); align-items: center; gap: 10px; }
.alias-wrap { position: relative; min-width: 0; }

.address-builder input, .address-builder select {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.address-builder input { padding-right: 50px; }
.address-builder input:focus, .address-builder select:focus { background: #fff; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(103, 87, 217, .1); }
.address-builder select:disabled { color: var(--muted); cursor: wait; }
.at-sign { color: var(--muted); font-weight: 700; }

.access-password-wrap {
    margin-top: 18px;
    padding: 14px;
    background: var(--purple-soft);
    border: 1px solid rgba(103, 87, 217, .14);
    border-radius: 14px;
}

.access-password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.access-password-row input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
}

.access-password-row input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(103, 87, 217, .1);
}

.lifetime-wrap {
    margin-top: 18px;
}

.lifetime-wrap select {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    padding: 0 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
}

.lifetime-wrap select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(103, 87, 217, .1);
}

.lifetime-wrap select:disabled {
    color: var(--muted);
    cursor: wait;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.icon-button:hover, .icon-button:focus-visible { color: var(--purple); background: var(--purple-soft); outline: none; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.random-button { position: absolute; top: 7px; right: 7px; }

.field-help, .form-note { margin: 8px 0 0; color: var(--muted); font-size: .73rem; }
.form-note { text-align: center; line-height: 1.6; }
.form-note a { color: var(--purple-dark); }
.form-error { margin: 10px 0 -3px; padding: 10px 12px; color: #a92f45; background: #fff0f3; border-radius: 10px; font-size: .8rem; }

.primary-button, .secondary-button, .refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    cursor: pointer;
    transition: transform .18s, background .18s, box-shadow .18s, opacity .18s;
}

.primary-button {
    width: 100%;
    min-height: 54px;
    margin-top: 24px;
    padding: 12px 18px;
    color: #fff;
    background: linear-gradient(135deg, #7565e5, #5746c8);
    border-radius: 13px;
    box-shadow: 0 11px 22px rgba(103, 87, 217, .24);
    font-weight: 750;
}

.primary-button svg, .secondary-button svg, .refresh-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(103, 87, 217, .3); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.primary-button.is-busy svg { animation: spin .8s linear infinite; }

.use-note {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 72px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .81rem;
}

.use-note > span { color: var(--purple); font-size: 1.15rem; }
.use-note p { margin: 0; }
.use-note strong { color: var(--ink-soft); }

.inbox-view { min-height: calc(100vh - 76px); padding: 52px 0 74px; }
.inbox-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 34px; }
.inbox-heading .eyebrow { margin-bottom: 12px; }
.inbox-heading h1 { font-size: clamp(2rem, 4vw, 3.55rem); }

.secondary-button {
    flex: 0 0 auto;
    padding: 12px 17px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    border-radius: 12px;
    font-size: .86rem;
    font-weight: 750;
}
.secondary-button:hover { background: #e4e0ff; transform: translateY(-1px); }
.compact-button { min-height: 48px; padding-inline: 14px; white-space: nowrap; }

.dashboard {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 590px;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-small);
}

.inbox-sidebar { padding: 25px; background: #faf9fd; border-right: 1px solid var(--line); }
.address-card, .expiry-card { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.address-card { margin-bottom: 13px; }
.card-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.current-address-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.current-address-row strong { min-width: 0; overflow-wrap: anywhere; color: var(--purple-dark); font-size: .88rem; }
.current-address-row .icon-button { flex: 0 0 auto; width: 34px; height: 34px; }

.inbox-switcher { margin: 0 0 13px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.switcher-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.switcher-heading .card-label { margin: 0; }
.mini-add-button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--purple-dark); background: var(--purple-soft); border: 0; border-radius: 9px; cursor: pointer; }
.mini-add-button:hover { background: #e3dfff; }
.mini-add-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inbox-list { display: grid; gap: 7px; max-height: 230px; overflow: auto; padding-right: 2px; }
.inbox-list-empty { margin: 2px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.saved-inbox-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 5px; background: var(--surface); border: 1px solid transparent; border-radius: 11px; }
.saved-inbox-item.all-inboxes-item { grid-template-columns: 1fr; background: #f2efff; }
.saved-inbox-item.active { background: var(--purple-soft); border-color: #dad4ff; }
.saved-inbox-button { min-width: 0; padding: 7px 8px; color: var(--ink-soft); background: transparent; border: 0; text-align: left; cursor: pointer; }
.saved-inbox-button span, .saved-inbox-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-inbox-button span { color: var(--ink); font-size: .76rem; font-weight: 750; }
.saved-inbox-button small { margin-top: 1px; color: var(--muted); font-size: .65rem; }
.saved-inbox-delete { width: 30px; height: 30px; display: grid; place-items: center; color: var(--red); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.saved-inbox-delete:hover { background: #fff1f3; }
.saved-inbox-delete svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.expiry-top { display: flex; align-items: center; justify-content: space-between; }
.expiry-top strong { display: block; font-size: 1.65rem; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.clock-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--purple); background: var(--purple-soft); border-radius: 12px; }
.clock-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.expiry-card progress { width: 100%; height: 6px; margin: 19px 0 8px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; }
.expiry-card progress::-webkit-progress-bar { background: var(--surface-strong); }
.expiry-card progress::-webkit-progress-value { background: linear-gradient(90deg, #7869e8, #4fbea2); border-radius: 99px; }
.expiry-card progress::-moz-progress-bar { background: linear-gradient(90deg, #7869e8, #4fbea2); border-radius: 99px; }
.expiry-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }

.privacy-tip { display: flex; gap: 11px; margin: 20px 3px; color: var(--ink-soft); }
.privacy-tip svg { flex: 0 0 auto; width: 20px; color: var(--green); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.privacy-tip div { display: flex; flex-direction: column; }
.privacy-tip strong { font-size: .77rem; }
.privacy-tip span { color: var(--muted); font-size: .7rem; }

.danger-text-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    color: var(--red);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 700;
}
.danger-text-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.danger-text-button:hover { text-decoration: underline; }

.message-panel { min-width: 0; background: #fff; }
.message-toolbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 27px; border-bottom: 1px solid var(--line); }
.message-toolbar h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 5px; font-size: 1.13rem; letter-spacing: -.02em; }
.count-badge { min-width: 22px; padding: 2px 7px; color: var(--purple-dark); background: var(--purple-soft); border-radius: 99px; font-size: .69rem; text-align: center; }
.connection-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .7rem; }
.connection-dot { width: 7px; height: 7px; background: var(--green); border-radius: 99px; }
.connection-status[data-state="checking"] .connection-dot { background: var(--purple); animation: pulse 1s ease-in-out infinite; }
.connection-status[data-state="paused"] .connection-dot { background: #d39828; }
.connection-status[data-state="error"] .connection-dot { background: var(--red); }

.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.refresh-button { padding: 9px 13px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .75rem; font-weight: 700; }
.refresh-button:hover:not(:disabled) { color: var(--purple); background: var(--purple-soft); border-color: #dbd5ff; }
.refresh-button:disabled { opacity: .55; cursor: wait; }
.refresh-button.is-spinning svg { animation: spin .8s linear infinite; }
.danger-small-button { padding: 9px 13px; color: var(--red); background: #fff1f3; border: 1px solid #f7d8df; border-radius: 10px; font-size: .75rem; font-weight: 750; cursor: pointer; }
.danger-small-button:hover:not(:disabled) { background: #ffe5ea; }
.danger-small-button:disabled { opacity: .45; cursor: default; }

.message-list { display: block; }
.message-row {
    position: relative;
    width: 100%;
    min-height: 79px;
    display: grid;
    grid-template-columns: auto minmax(135px, .75fr) minmax(210px, 1.7fr) auto;
    align-items: center;
    gap: 16px;
    padding: 15px 27px;
    color: var(--ink-soft);
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.message-row:hover, .message-row:focus-visible { background: #faf9ff; outline: none; }
.message-row[data-selected="true"] { background: #f4f1ff; }
.message-row.unread { color: var(--ink); background: #fdfcff; }
.message-row.unread[data-selected="true"] { background: #f1edff; }
.message-row.unread::before { content: ""; position: absolute; }
.message-check { width: 17px; height: 17px; accent-color: var(--purple); cursor: pointer; }
.message-sender, .message-summary { min-width: 0; }
.message-sender { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; }
.unread-mark { flex: 0 0 auto; width: 7px; height: 7px; background: var(--purple); border-radius: 99px; }
.message-row:not(.unread) .unread-mark { background: transparent; }
.message-sender span:last-child, .message-subject, .message-preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-subject { margin-bottom: 3px; font-size: .84rem; font-weight: 750; }
.message-preview { color: var(--muted); font-size: .75rem; }
.message-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.paperclip { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.empty-inbox { min-height: 470px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 25px; text-align: center; }
.empty-art { width: 128px; height: 108px; margin-bottom: 16px; }
.empty-art svg { width: 100%; }
.empty-art .tray { fill: #eeebff; stroke: #7a6be1; stroke-width: 2; stroke-linejoin: round; }
.empty-art .letter { fill: #fff; stroke: #aaa3cc; stroke-width: 2; }
.empty-art .line, .empty-art .arrow { fill: none; stroke: #7a6be1; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty-inbox h3 { margin: 0 0 8px; font-size: 1.08rem; }
.empty-inbox p { max-width: 390px; margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.65; }
.empty-inbox > span { margin-top: 18px; padding: 6px 11px; color: var(--green); background: #ebf8f4; border-radius: 99px; font-size: .67rem; font-weight: 750; }

.inbox-error { margin: 24px; padding: 16px; color: #9b3043; background: #fff1f3; border: 1px solid #f8d8df; border-radius: 13px; font-size: .8rem; }
.inbox-error strong, .inbox-error span { display: block; }
.inbox-error span { margin-top: 3px; color: #b25363; }
.inbox-error button { margin-top: 10px; padding: 0; color: #9b3043; background: none; border: 0; font-weight: 750; text-decoration: underline; cursor: pointer; }

.message-dialog {
    width: min(850px, calc(100% - 32px));
    max-height: min(90vh, 880px);
    padding: 0;
    color: var(--ink);
    background: #fff;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(24, 18, 56, .3);
}
.message-dialog::backdrop { background: rgba(28, 24, 47, .58); backdrop-filter: blur(5px); }
.dialog-shell { max-height: min(90vh, 880px); overflow: auto; }
.dialog-header, .dialog-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 25px; }
.dialog-header { position: sticky; z-index: 2; top: 0; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.dialog-sender { min-width: 0; display: flex; align-items: center; gap: 12px; }
.sender-avatar { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; color: var(--purple-dark); background: var(--purple-soft); border-radius: 12px; font-weight: 800; }
.dialog-sender div { min-width: 0; display: flex; flex-direction: column; }
.dialog-sender strong, .dialog-sender span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-sender strong { font-size: .84rem; }
.dialog-sender span { color: var(--muted); font-size: .72rem; }
.dialog-title-row { align-items: flex-start; padding-bottom: 14px; }
.dialog-title-row h2 { margin: 0 0 4px; font-size: 1.42rem; line-height: 1.3; letter-spacing: -.03em; overflow-wrap: anywhere; }
.dialog-title-row time { color: var(--muted); font-size: .72rem; }
.danger-icon-button { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; color: var(--red); background: #fff1f3; border: 0; border-radius: 10px; cursor: pointer; }
.danger-icon-button:hover { background: #ffe2e7; }
.danger-icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.body-tabs { display: flex; gap: 4px; margin: 0 25px 13px; padding: 4px; width: max-content; background: var(--surface); border-radius: 10px; }
.body-tabs button { padding: 6px 11px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: .72rem; font-weight: 700; }
.body-tabs button[aria-selected="true"] { color: var(--purple-dark); background: #fff; box-shadow: 0 3px 9px rgba(40,31,93,.08); }
.message-loading { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
.message-content { margin: 0 25px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.remote-notice { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: #7e6332; background: #fff8e8; border-bottom: 1px solid #f3e4bb; font-size: .7rem; }
.remote-notice svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.html-message-body { width: 100%; min-height: 340px; display: block; background: #fff; border: 0; }
.text-message-body { min-height: 260px; margin: 0; padding: 22px; overflow: auto; color: var(--ink); background: #fff; font: .84rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment-section { margin: 20px 25px 27px; }
.attachment-section h3 { margin: 0 0 10px; font-size: .82rem; }
.attachment-list { display: grid; gap: 8px; }
.attachment-button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-align: left; cursor: pointer; }
.attachment-button:hover { color: var(--purple-dark); border-color: #d5cff8; }
.attachment-button svg { flex: 0 0 auto; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.attachment-button div { min-width: 0; display: flex; flex-direction: column; }
.attachment-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.attachment-button span { color: var(--muted); font-size: .66rem; }
.attachment-button.is-loading { opacity: .6; cursor: wait; }
.dialog-error { margin: 10px 25px 25px; padding: 14px; color: #a92f45; background: #fff0f3; border-radius: 10px; font-size: .8rem; }

.new-inbox-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: min(92vh, 760px);
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
}
.new-inbox-dialog::backdrop { background: rgba(28, 24, 47, .52); backdrop-filter: blur(5px); }
.new-inbox-shell { overflow: auto; max-height: min(92vh, 760px); background: #fff; border-radius: 22px; box-shadow: 0 28px 80px rgba(24,18,56,.28); }
.new-inbox-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 0; }
.new-inbox-header h2 { margin: 0; font-size: 1.24rem; letter-spacing: -.03em; }
.new-inbox-header .icon-button { flex: 0 0 auto; }
.dialog-create-mount { padding: 18px 22px 22px; }
.dialog-create-mount .create-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.dialog-create-mount .create-card::before { display: none; }
.dialog-create-mount .card-heading { display: none; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translateX(-50%); padding: 11px 17px; color: #fff; background: var(--ink); border-radius: 11px; box-shadow: var(--shadow-small); font-size: .78rem; font-weight: 700; }

.site-footer { padding: 28px 0; color: var(--muted); background: #fff; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 28px; }
.footer-brand { font-size: 1.05rem; }
.footer-brand .brand-mark { width: 29px; height: 29px; border-radius: 9px; }
.footer-brand .brand-mark svg { width: 18px; }
.footer-inner p { margin: 0 auto 0 0; font-size: .75rem; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a { font-size: .72rem; text-decoration: none; }
.footer-inner nav a:hover { color: var(--purple); }

.legal-main { min-height: calc(100vh - 76px); padding: 66px 0 88px; background: radial-gradient(circle at 15% 5%, rgba(103,87,217,.09), transparent 28rem), var(--surface); }
.legal-wrap { width: min(820px, calc(100% - 40px)); margin-inline: auto; }
.legal-kicker { margin: 0 0 12px; color: var(--purple); font-size: .76rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.legal-main h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.3rem); line-height: 1.05; letter-spacing: -.06em; }
.legal-intro { max-width: 690px; margin: 20px 0 34px; color: var(--ink-soft); font-size: 1.06rem; line-height: 1.7; }
.legal-card { padding: clamp(25px, 5vw, 48px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-small); }
.legal-card h2 { margin: 32px 0 9px; font-size: 1.12rem; letter-spacing: -.02em; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card li { color: var(--ink-soft); font-size: .9rem; line-height: 1.75; }
.legal-card ul, .legal-card ol { padding-left: 22px; }
.legal-card a { color: var(--purple-dark); }
.legal-updated { margin-top: 28px !important; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted) !important; font-size: .76rem !important; }
.steps { display: grid; gap: 13px; margin: 25px 0; padding: 0 !important; list-style: none; counter-reset: steps; }
.steps li { position: relative; padding: 18px 18px 18px 59px; background: var(--surface); border-radius: 13px; counter-increment: steps; }
.steps li::before { content: counter(steps); position: absolute; top: 17px; left: 17px; width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: var(--purple); border-radius: 9px; font-size: .75rem; font-weight: 800; }
.steps strong { display: block; color: var(--ink); }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 18px; background: var(--purple-soft); border-radius: 13px; }
.contact-card p { margin: 0; }
.contact-card a { flex: 0 0 auto; padding: 10px 14px; color: #fff; background: var(--purple); border-radius: 10px; font-size: .79rem; font-weight: 750; text-decoration: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

@media (max-width: 900px) {
    .landing { padding-top: 55px; }
    .landing-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-copy { text-align: center; }
    .hero-copy h1, .hero-lede, .feature-row { margin-left: auto; margin-right: auto; }
    .eyebrow { justify-content: center; }
    .create-card { width: min(520px, 100%); margin-inline: auto; }
    .dashboard { grid-template-columns: 255px minmax(0, 1fr); }
    .message-row { grid-template-columns: auto minmax(120px, .7fr) minmax(170px, 1.5fr) auto; gap: 13px; padding-inline: 20px; }
}

@media (max-width: 720px) {
    .container { width: min(100% - 28px, 1160px); }
    .header-inner { min-height: 66px; }
    .site-nav > a:not(.nav-pill) { display: none; }
    .site-nav .nav-pill { padding: 9px 13px; font-size: .78rem; }
    .landing { min-height: calc(100vh - 66px); padding: 45px 0 38px; }
    .hero-copy h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
    .feature-row { gap: 9px; }
    .feature-row div { padding: 0; }
    .create-card { padding: 24px 20px; border-radius: 22px; }
    .address-builder { grid-template-columns: 1fr; gap: 8px; }
    .access-password-row { grid-template-columns: 1fr; }
    .at-sign { display: none; }
    .use-note { align-items: flex-start; margin-top: 45px; }
    .inbox-view { padding: 35px 0 55px; }
    .inbox-heading { align-items: flex-end; }
    .inbox-heading .eyebrow { justify-content: flex-start; }
    .inbox-heading h1 { font-size: 2.2rem; }
    .secondary-button { padding: 10px 12px; }
    .secondary-button svg { width: 17px; }
    .dashboard { display: block; border-radius: 20px; }
    .inbox-sidebar { padding: 17px; border-right: 0; border-bottom: 1px solid var(--line); }
    .address-card, .expiry-card, .inbox-switcher { display: block; width: 100%; }
    .address-card { min-height: 0; margin: 0 0 10px; }
    .inbox-switcher { margin-bottom: 10px; }
    .privacy-tip { display: none; }
    .danger-text-button { margin-top: 12px; }
    .message-toolbar { min-height: 76px; align-items: flex-start; flex-direction: column; padding: 16px 18px; }
    .toolbar-actions { justify-content: flex-start; }
    .message-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 14px 18px; }
    .message-check { grid-column: 1; grid-row: 1 / span 2; }
    .message-sender { grid-column: 2; }
    .message-summary { grid-column: 2; }
    .message-meta { grid-column: 3; grid-row: 1 / span 2; }
    .empty-inbox { min-height: 400px; }
    .footer-inner { flex-wrap: wrap; gap: 15px; }
    .footer-inner p { order: 3; width: 100%; }
    .footer-inner nav { margin-left: auto; gap: 13px; }
    .legal-main { min-height: calc(100vh - 66px); padding: 44px 0 65px; }
    .contact-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
    .feature-row span { display: none; }
    .feature-row strong { font-size: .8rem; }
    .inbox-heading { align-items: flex-start; }
    .inbox-heading h1 { max-width: 250px; }
    .secondary-button span { display: none; }
    .address-card, .expiry-card { width: 100%; }
    .address-card { min-height: 0; margin: 0 0 10px; }
    .message-row { gap: 8px; }
    .message-meta time { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
    .message-dialog { width: 100%; max-height: 94vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
    .message-dialog::backdrop { background: rgba(28, 24, 47, .55); }
    .dialog-shell { max-height: 94vh; }
    .dialog-header, .dialog-title-row { padding-inline: 17px; }
    .message-content, .body-tabs, .attachment-section { margin-left: 17px; margin-right: 17px; }
    .new-inbox-dialog { width: 100%; max-height: 94vh; margin: auto 0 0; }
    .new-inbox-shell { max-height: 94vh; border-radius: 20px 20px 0 0; }
    .footer-inner nav { width: 100%; margin: 0; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
