/* Temp Mailer — TMaily-style, vanilla CSS, no dependencies. Mobile-first. */
*,*::before,*::after{box-sizing:border-box}
:root{
  --bg:#fbfbff; --card:#fff; --ink:#111827; --muted:#6b7280; --muted2:#9ca3af;
  --line:#e5e7eb; --line2:#eef2ff; --accent:#4f46e5; --accent2:#7c3aed;
  --orange:#f59e0b; --green:#16a34a; --green-bg:#dcfce7;
  --radius:12px; --shadow:0 1px 2px rgba(17,24,39,.05),0 1px 3px rgba(17,24,39,.04);
  --max:900px; --max-sm:640px;
}
[data-theme="dark"]{
  --bg:#0f1220; --card:#171b2e; --ink:#f3f4f6; --muted:#9ca3af; --muted2:#6b7280;
  --line:#2a2f45; --line2:#232842; --shadow:0 1px 3px rgba(0,0,0,.4);
}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ink); background:var(--bg);
  background-image:radial-gradient(circle,#d7d7f5 1px,transparent 1px);
  background-size:22px 22px; line-height:1.55; font-size:16px;
}
[data-theme="dark"] body{background-image:radial-gradient(circle,#232842 1px,transparent 1px)}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
h1{font-size:clamp(1.6rem,5vw,2rem); line-height:1.2; margin:.4rem 0 .5rem; letter-spacing:-.02em}
h2{font-size:1.15rem; margin:0 0 .6rem; letter-spacing:-.01em}
h3{font-size:.95rem; margin:0 0 .25rem}
p{margin:0 0 .8rem; color:var(--ink)}
.muted{color:var(--muted)}
.wrap{max-width:var(--max); margin:0 auto; padding:0 16px}
.wrap-sm{max-width:var(--max-sm); margin:0 auto; padding:0 16px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Header */
.site-header{position:sticky; top:0; z-index:20; background:var(--card); border-bottom:1px solid var(--line)}
.header-in{max-width:1100px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px}
.brand{display:flex; align-items:center; gap:8px; color:var(--ink); font-weight:800; font-size:1.05rem}
.brand:hover{text-decoration:none}
.brand img{width:28px; height:28px; border-radius:8px; display:block}
.header-nav{display:flex; align-items:center; gap:14px}
.header-nav a{color:var(--ink); font-weight:600; font-size:.95rem}
.icon-btn{background:var(--card); border:1px solid var(--line); border-radius:8px; width:34px; height:34px; cursor:pointer; font-size:1rem; line-height:1; color:var(--ink)}
.icon-btn:hover{border-color:var(--accent)}

/* Hero */
.hero{text-align:center; padding:36px 16px 8px}
.subtitle{color:var(--muted); margin:0 0 14px}
.pills{display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:0 0 22px}
.pill{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--card); border-radius:999px; padding:5px 12px; font-size:.85rem; font-weight:600; color:var(--ink)}
.pill svg{width:13px; height:13px}

/* Cards */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; margin:0 auto 14px}
.address-box{display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:12px; min-height:52px}
.address-box code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.95rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0}
.copy-icon{flex:none; background:none; border:0; cursor:pointer; font-size:1.05rem; color:var(--muted); padding:4px}
.copy-icon:hover{color:var(--accent)}
.btn-row{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:7px; border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:8px; padding:9px 10px; font:inherit; font-size:.92rem; font-weight:600; cursor:pointer}
.btn:hover{border-color:var(--accent); color:var(--accent)}
.btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.btn.primary:hover{background:#4338ca; color:#fff}
.btn:disabled{opacity:.5; cursor:not-allowed}
@media(min-width:640px){ .btn-row{grid-template-columns:repeat(4,1fr)} }

/* Demo banner */
.demo-banner{display:none; border:1px dashed #f59e0b; background:#fffbeb; color:#92400e; border-radius:8px; padding:8px 12px; font-size:.85rem; margin-bottom:12px}
[data-theme="dark"] .demo-banner{background:#451a03; color:#fde68a; border-color:#92400e}
.demo-banner.show{display:block}
.demo-banner strong{font-weight:800}

/* Messages */
.msg-head{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:2px 2px 12px; border-bottom:1px solid var(--line); margin-bottom:4px}
.msg-head h2{display:flex; align-items:center; gap:8px; margin:0; font-size:1rem}
.count-badge{background:var(--accent); color:#fff; border-radius:999px; min-width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; font-size:.8rem; padding:0 6px}
.live{display:flex; align-items:center; gap:10px; font-size:.85rem}
.live-dot{width:8px; height:8px; border-radius:50%; background:var(--green); display:inline-block; margin-right:5px}
.live-txt{color:var(--green); font-weight:700}
.msg-list{list-style:none; margin:0; padding:0}
.msg-row{display:flex; gap:12px; align-items:flex-start; padding:13px 2px; border-bottom:1px solid var(--line); cursor:pointer; background:none; border-left:0; border-right:0; border-top:0; width:100%; text-align:left; font:inherit; color:var(--ink)}
.msg-row:last-child{border-bottom:0}
.msg-row:hover{background:var(--line2)}
.avatar{flex:none; width:38px; height:38px; border-radius:9px; background:var(--orange); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1rem}
.msg-body{flex:1; min-width:0}
.msg-body strong{display:block; font-size:.93rem}
.msg-subject{font-size:.9rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.msg-preview{font-size:.85rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.msg-time{flex:none; font-size:.8rem; color:var(--muted2); text-align:right}
.msg-del{flex:none; background:none; border:0; cursor:pointer; color:var(--muted2); font-size:1rem; padding:2px}
.msg-del:hover{color:#dc2626}
.empty{padding:22px 8px; text-align:center; color:var(--muted)}

/* Sections */
.section{padding:14px 0}
.section h2.center,.section p.center{text-align:center}
.grid-3{display:grid; grid-template-columns:1fr; gap:14px}
@media(min-width:640px){ .grid-3{grid-template-columns:repeat(3,1fr)} }
.feature{padding:16px}
.feature .f-icon{width:36px; height:36px; border-radius:9px; background:#eef2ff; color:var(--accent); display:flex; align-items:center; justify-content:center; margin-bottom:10px}
[data-theme="dark"] .feature .f-icon{background:#232842}
.feature p{font-size:.88rem; color:var(--muted); margin:0}
.checks{list-style:none; margin:0; padding:0}
.checks li{padding:4px 0; font-size:.95rem}
.checks li::before{content:"✓ "; color:var(--accent); font-weight:800}
.uses{display:grid; grid-template-columns:1fr; gap:0}
@media(min-width:640px){ .uses{grid-template-columns:repeat(4,1fr)} }
.use{padding:14px; border-bottom:1px solid var(--line)}
@media(min-width:640px){ .use{border-bottom:0; border-right:1px solid var(--line)} .use:nth-child(4n){border-right:0} }
.use strong{display:block; font-size:.9rem}
.use span{font-size:.85rem; color:var(--muted)}
.steps{display:grid; grid-template-columns:1fr; gap:14px; text-align:center}
@media(min-width:640px){ .steps{grid-template-columns:repeat(3,1fr)} }
.step{padding:18px 14px; position:relative}
.step-num{position:absolute; top:-11px; left:50%; transform:translateX(-50%); width:22px; height:22px; border-radius:50%; background:var(--accent); color:#fff; font-size:.8rem; font-weight:800; display:flex; align-items:center; justify-content:center}
.step p{font-size:.88rem; color:var(--muted); margin:0}
.step .f-icon{margin:6px auto 10px}

/* FAQ */
.faq{border:1px solid var(--line); border-radius:var(--radius); background:var(--card); overflow:hidden; box-shadow:var(--shadow)}
.faq-item{border-bottom:1px solid var(--line)}
.faq-item:last-child{border-bottom:0}
.faq-q{width:100%; display:flex; justify-content:space-between; align-items:center; gap:12px; background:none; border:0; padding:14px 16px; font:inherit; font-size:.93rem; font-weight:700; color:var(--ink); cursor:pointer; text-align:left}
.faq-q span.chev{color:var(--muted2); flex:none}
.faq-a{display:none; padding:0 16px 14px; color:var(--muted); font-size:.92rem}
.faq-item.open .faq-a{display:block}
.faq-item.open .chev{transform:rotate(180deg)}

/* Dialog / message view */
dialog{border:1px solid var(--line); border-radius:14px; padding:20px; max-width:520px; width:calc(100vw - 32px); background:var(--card); color:var(--ink); box-shadow:0 20px 50px rgba(0,0,0,.2)}
dialog::backdrop{background:rgba(17,24,39,.45)}
dialog h2{margin-top:0}
.field{margin-bottom:12px}
.field label{display:block; font-size:.88rem; font-weight:700; margin-bottom:5px}
.field input,.field select{width:100%; border:1px solid var(--line); border-radius:8px; padding:10px 12px; font:inherit; background:var(--card); color:var(--ink)}
.field .hint{font-size:.8rem; color:var(--muted); margin-top:4px}
.dialog-actions{display:flex; gap:10px; justify-content:flex-end; margin-top:16px}
.msg-view-meta{font-size:.85rem; color:var(--muted); margin-bottom:10px}
.msg-view-body{white-space:pre-wrap; word-break:break-word; font-size:.93rem; border-top:1px solid var(--line); padding-top:12px}
.otp-box{display:flex; gap:10px; align-items:center; background:#eef2ff; border-radius:8px; padding:10px 12px; margin:10px 0}
[data-theme="dark"] .otp-box{background:#232842}
.otp-box code{font-size:1.2rem; font-weight:800; letter-spacing:.1em}
.toast{position:fixed; left:50%; bottom:20px; transform:translateX(-50%); background:#111827; color:#fff; border-radius:999px; padding:9px 16px; font-size:.88rem; opacity:0; pointer-events:none; transition:opacity .2s; z-index:50}
.toast.show{opacity:1}

/* Footer */
.site-footer{border-top:1px solid var(--line); background:var(--card); margin-top:26px}
.footer-in{max-width:1100px; margin:0 auto; padding:16px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; font-size:.88rem; color:var(--muted)}
.footer-in nav{display:flex; gap:14px; flex-wrap:wrap}
.footer-in a{color:var(--muted)}
.footer-brand{font-weight:800; color:var(--ink)}
