:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #18242f;
  --muted: #70808d;
  --line: #dbe2e8;
  --primary: #0b6e99;
  --primary-dark: #075875;
  --primary-soft: #e6f3f8;
  --danger: #c74a4a;
  --shadow: 0 18px 50px rgba(25, 54, 72, .08);
  --radius: 8px;
  --radius-lg: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
body { min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 760; letter-spacing: -.4px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; color: var(--primary); }
.brand-mark svg { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 19px; margin-left: 14px; font-size: 13px; color: #566673; }
.nav-links a { padding: 22px 0 19px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); border-bottom-color: var(--primary); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.lang-button, .theme-button { border: 1px solid var(--line); background: #fff; color: #5f6f7b; height: 34px; padding: 0 10px; border-radius: 7px; }
.theme-button { width: 34px; padding: 0; }

.page { display: none; flex: 1; }
.page.active { display: block; }

.hero-wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 70px 0 48px; }
.hero-copy { text-align: center; max-width: 820px; margin: 0 auto 30px; }
.eyebrow, .section-kicker { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 1.65px; }
h1 { margin: 9px 0 12px; font-size: clamp(35px, 5vw, 58px); line-height: 1.08; letter-spacing: -2.4px; }
.hero-copy h1 span { color: var(--primary); }
.hero-subtitle { max-width: 720px; margin: 0 auto; font-size: 16px; color: var(--muted); line-height: 1.7; }

.inbox-card { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius-lg); padding: 24px; }
.card-label { font-size: 13px; font-weight: 720; margin-bottom: 10px; color: #41515d; }
.address-row { display: flex; gap: 10px; }
.address-input-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.address-input-wrap input { width: 100%; height: 48px; border: 1px solid #cbd6de; border-radius: 8px; padding: 0 42px 0 42px; outline: none; font-size: 14px; color: #23313c; background: #fff; }
.address-input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,110,153,.10); }
.input-icon { position: absolute; left: 16px; font-weight: 800; color: var(--primary); z-index: 2; }
.clear-input { position: absolute; right: 11px; border: 0; background: transparent; color: #91a1ac; font-size: 22px; padding: 2px 5px; }
.primary-btn { height: 48px; background: var(--primary); color: #fff; border: 0; border-radius: 8px; padding: 0 20px; font-size: 14px; font-weight: 760; display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; box-shadow: 0 5px 16px rgba(11,110,153,.16); }
.primary-btn:hover { background: var(--primary-dark); }
.under-row { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.text-btn { border: 0; background: none; color: var(--primary); padding: 0; font-size: 12px; font-weight: 720; }
.muted-divider { color: #bac3ca; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; gap: 1px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--line); }
.feature-item { background: #fff; padding: 18px; display: flex; gap: 11px; align-items: flex-start; min-height: 78px; }
.feature-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 850; flex: 0 0 auto; }
.feature-item strong, .feature-item span { display: block; }
.feature-item strong { font-size: 12px; margin: 2px 0 4px; }
.feature-item span { font-size: 11px; line-height: 1.45; color: var(--muted); }

.home-content { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 46px 0 84px; }
.content-heading { display: flex; justify-content: space-between; gap: 34px; align-items: flex-end; margin-bottom: 22px; }
.content-heading h2 { margin: 5px 0 0; font-size: 27px; letter-spacing: -.8px; }
.content-heading p { color: var(--muted); max-width: 500px; margin: 0; line-height: 1.6; font-size: 13px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.step-number { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.step-card h3 { margin: 8px 0 7px; font-size: 16px; }
.step-card p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }

.mail-app { width: 100%; min-height: calc(100vh - 64px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.mail-sidebar { background: #fff; border-right: 1px solid var(--line); padding: 22px 16px; }
.mail-sidebar-title { color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: 1.7px; margin: 3px 8px 14px; }
.compose-btn { width: 100%; height: 40px; border: 1px solid #cbd7de; background: #fff; border-radius: 7px; color: #24333e; font-weight: 750; }
.compose-btn:hover { border-color: var(--primary); color: var(--primary); }
.sidebar-section { margin-top: 20px; }
.sidebar-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; height: 38px; border-radius: 7px; padding: 0 10px; color: #5b6a75; font-size: 12px; text-align: left; }
.sidebar-item b { margin-left: auto; font-size: 10px; color: #9eabb5; }
.sidebar-item.active, .sidebar-item:hover { background: var(--primary-soft); color: var(--primary); }
.domain-box { border-top: 1px solid var(--line); padding-top: 18px; }
.mini-title { font-size: 9px; font-weight: 850; letter-spacing: 1.1px; color: #99a5ae; }
.current-address { font-size: 11px; margin: 8px 0 12px; word-break: break-all; color: #344550; }
.outline-btn { width: 100%; height: 35px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: #5a6a76; font-size: 11px; margin-top: 6px; }
.outline-btn:hover { border-color: var(--primary); color: var(--primary); }

.mail-main { background: #f7f9fb; min-width: 0; }
.mail-toolbar { height: 68px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 7px; color: #62717c; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.danger:hover { border-color: #e1b8b8; color: var(--danger); }
.inbox-title-wrap h2 { margin: 0; font-size: 15px; }
.inbox-title-wrap span { color: #9aa7b0; font-size: 10px; }
.mail-layout { height: calc(100vh - 132px); display: grid; grid-template-columns: minmax(280px, 370px) minmax(0, 1fr); }
.message-list { overflow: auto; border-right: 1px solid var(--line); background: #fff; }
.message-row { padding: 14px 15px; border-bottom: 1px solid var(--line); cursor: pointer; }
.message-row:hover { background: #f8fbfc; }
.message-row.active { background: #eaf5f9; border-left: 3px solid var(--primary); padding-left: 12px; }
.message-topline { display: flex; justify-content: space-between; gap: 12px; }
.sender { font-size: 12px; font-weight: 760; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.time { color: #9ba6ae; font-size: 10px; white-space: nowrap; }
.subject { margin-top: 5px; font-size: 12px; font-weight: 700; }
.snippet { color: #85939e; font-size: 10px; line-height: 1.45; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; margin-right: 7px; }
.empty-list { height: 100%; display: grid; place-items: center; color: #91a0aa; text-align: center; padding: 30px; }
.message-preview { background: #fff; overflow: auto; }
.empty-preview { min-height: 100%; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; color: #8b99a3; }
.empty-illustration { width: 60px; height: 60px; border-radius: 50%; background: #eef5f7; display: grid; place-items: center; color: var(--primary); font-size: 22px; margin-bottom: 15px; }
.empty-preview h3 { color: #52626e; margin: 0 0 7px; }
.empty-preview p { margin: 0; max-width: 320px; line-height: 1.6; font-size: 12px; }
.message-detail { padding: 28px; }
.detail-header { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.detail-subject { font-size: 21px; margin: 0 0 12px; letter-spacing: -.7px; }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #73818b; }
.sender-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 850; }
.detail-body { font-size: 13px; line-height: 1.75; color: #40515d; white-space: pre-wrap; padding: 24px 3px; }
.detail-actions { display: flex; gap: 8px; }
.small-outline { height: 31px; padding: 0 11px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: #62727d; font-size: 10px; }

.simple-page { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 64px 0 90px; }
.simple-card { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; padding: 30px; }
.simple-card.narrow { max-width: 640px; }
.simple-card h1 { font-size: 39px; letter-spacing: -1.8px; margin: 8px 0 10px; }
.simple-card > p { color: var(--muted); line-height: 1.7; font-size: 14px; }
.domain-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
.domain-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 12px; }
.domain-row code { color: var(--primary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.domain-note { margin-top: 16px; padding: 13px; border-left: 3px solid var(--primary); background: #f4fafc; font-size: 11px; color: #6d7e89; line-height: 1.55; }
.small-note { color: #8996a0; font-size: 11px; line-height: 1.55; }

.site-footer { width: min(var(--max), calc(100% - 32px)); margin: auto auto 0; padding: 22px 0 26px; color: #94a1aa; font-size: 10px; display: flex; justify-content: space-between; gap: 12px; }

.modal { position: fixed; inset: 0; display: none; z-index: 80; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 26, 36, .42); }
.compose-dialog { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100% - 28px)); background: #fff; border-radius: 12px; box-shadow: 0 26px 70px rgba(0,0,0,.23); padding: 22px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.dialog-header h3 { margin: 4px 0 0; font-size: 20px; }
.compose-dialog label { display: block; font-size: 11px; font-weight: 760; color: #596a75; margin-top: 12px; }
.compose-dialog input, .compose-dialog textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px; outline: none; resize: vertical; }
.compose-dialog input:focus, .compose-dialog textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,110,153,.08); }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; }
.dialog-footer .primary-btn { height: 40px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 18px); padding: 9px 14px; background: #22313b; color: #fff; border-radius: 8px; font-size: 11px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.dark { --bg: #11171c; --panel: #182128; --panel-2: #151e24; --text: #e8edf1; --muted: #9aa7b0; --line: #293640; --primary-soft: #173844; --shadow: 0 18px 50px rgba(0,0,0,.25); }
.dark .topbar, .dark .inbox-card, .dark .feature-item, .dark .step-card, .dark .simple-card, .dark .mail-sidebar, .dark .mail-toolbar, .dark .message-list, .dark .message-preview, .dark .compose-dialog, .dark .address-input-wrap input, .dark .icon-btn, .dark .outline-btn, .dark .compose-btn, .dark .lang-button, .dark .theme-button, .dark .domain-row { background: var(--panel); color: var(--text); }
.dark .mail-main { background: #141d23; }
.dark .address-input-wrap input, .dark .compose-dialog input, .dark .compose-dialog textarea { color: var(--text); border-color: var(--line); }
.dark .message-row:hover { background: #1d2931; }
.dark .message-row.active { background: #183540; }
.dark .simple-card > p, .dark .hero-subtitle, .dark .content-heading p { color: var(--muted); }
.dark .nav-links { color: #9aa7b0; }
.dark .lang-button, .dark .theme-button { border-color: var(--line); }

@media (max-width: 900px) {
  .nav-links { gap: 12px; margin-left: 0; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .content-heading { align-items: flex-start; flex-direction: column; }
  .mail-app { grid-template-columns: 1fr; }
  .mail-sidebar { display: none; }
}

@media (max-width: 700px) {
  .topbar-inner { gap: 12px; }
  .nav-links { display: none; }
  .hero-wrap { padding-top: 48px; }
  .address-row { flex-direction: column; }
  .feature-grid, .steps-grid, .domain-list { grid-template-columns: 1fr; }
  .mail-layout { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 132px); }
  .message-list { max-height: 340px; border-right: 0; border-bottom: 1px solid var(--line); }
  .message-preview { min-height: 420px; }
  .mail-toolbar { padding: 0 10px; }
  .toolbar-right { gap: 5px; }
  .detail-header { padding-bottom: 14px; }
  .message-detail { padding: 20px 16px; }
  .site-footer { flex-direction: column; }
  .simple-card h1 { font-size: 31px; }
}

/* SlankMail brand theme */
:root { --primary: #d32f2f; --primary-dark: #a51f1f; --primary-soft: #fdeaea; --bg: #f5f5f4; --text: #191919; }
.address-input-wrap input:focus { box-shadow: 0 0 0 3px rgba(211,47,47,.11); }
.compose-dialog input:focus, .compose-dialog textarea:focus { box-shadow: 0 0 0 3px rgba(211,47,47,.11); }
.brand-text { letter-spacing: -.55px; }
.hero-copy h1 span { color: var(--primary); }
.topbar{box-shadow:0 1px 0 rgba(0,0,0,.03)} .primary-btn{border-radius:6px;text-transform:uppercase;letter-spacing:.3px}.inbox-card,.step-card,.simple-card{border-radius:7px}.feature-icon{border-radius:6px}
