:root {
  --bg: #09090b;
  --bg-2: #101013;
  --panel: #131318;
  --panel-2: #1a1a20;
  --border: #25252d;
  --border-2: #34343e;
  --text: #f5f3ec;
  --text-2: #c9c4b8;
  --text-3: #8a8694;
  --muted: #6c6878;
  --accent: #ffd56b;
  --accent-2: #ffb547;
  --accent-soft: rgba(255, 213, 107, 0.14);
  --danger: #ff6b7a;
  --good: #7fe6c2;
  --info: #8bb9ff;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --display: "Inter", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow-lg: 0 40px 80px -40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02);
  --shadow-md: 0 18px 40px -18px rgba(0,0,0,0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

html[data-theme="light"] {
  --bg: #f6f2e7;
  --bg-2: #ece6d4;
  --panel: #fbf8ee;
  --panel-2: #f0ebda;
  --border: #d9d2bd;
  --border-2: #c6bda4;
  --text: #18181a;
  --text-2: #2a2a30;
  --text-3: #51505a;
  --muted: #807a6c;
  --accent: #b58418;
  --accent-2: #95680b;
  --accent-soft: rgba(181, 132, 24, 0.12);
  --danger: #c1453f;
  --good: #2e8a6a;
  --info: #3863b3;
  --shadow-lg: 0 40px 80px -40px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.02);
  --shadow-md: 0 18px 40px -18px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}

/* aurora gradient backdrop */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}
.aurora-1 {
  width: 620px; height: 620px;
  left: 60%; top: -180px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  animation: floatA 22s ease-in-out infinite;
}
.aurora-2 {
  width: 480px; height: 480px;
  left: -120px; top: 40%;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 65%);
  opacity: 0.35;
  animation: floatB 28s ease-in-out infinite;
}
html[data-theme="light"] .aurora span { opacity: 0.35; }

@keyframes floatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-40px, 60px, 0) scale(1.05); }
}
@keyframes floatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(60px, -40px, 0) scale(1.1); }
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

header, main, footer { position: relative; z-index: 2; }

/* ─── HEADER ─── */
header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 17px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #18181a;
  box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255,255,255,0.4);
}
.brand.small .brand-mark { width: 24px; height: 24px; border-radius: 7px; }

.brand-meta {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-link {
  color: var(--text-3);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}
.nav-link:hover { color: var(--text); }

.nav-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  padding: 7px 12px;
  border-radius: 999px;
  transition: transform 0.12s var(--ease), box-shadow 0.18s var(--ease), filter 0.15s var(--ease);
  box-shadow: 0 6px 16px -8px rgba(42, 171, 238, 0.6);
}
.nav-tg:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 22px -10px rgba(42, 171, 238, 0.75); }
.nav-tg svg { flex-shrink: 0; }

.footer-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  color: #2aabee;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, #2aabee 35%, var(--border));
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.footer-tg:hover {
  background: color-mix(in oklab, #2aabee 12%, transparent);
  border-color: #2aabee;
  color: #2aabee;
}

@media (max-width: 640px) {
  .nav-link { display: none; }
  .nav-tg span { display: none; }
  .nav-tg { padding: 7px 9px; }
}

/* ─── MAIN LAYOUT ─── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 28px 80px;
  display: flex;
  flex-direction: column;
  gap: 90px;
}

/* ─── HERO ─── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 60px;
  padding-top: 30px;
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 12px; }
  .hero-art { order: -1; min-height: 240px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 12px 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: color-mix(in oklab, var(--text) 5%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 60%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--good) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 0%, transparent); }
}

h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}

.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: 17px;
  color: var(--text-3);
  max-width: 480px;
  margin: 0 0 32px;
  text-wrap: pretty;
}

/* ─── COMPOSER ─── */
.composer {
  position: relative;
  z-index: 5;
  background: color-mix(in oklab, var(--panel) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.composer-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.composer-row {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 4px 4px 18px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.composer-row:focus-within {
  border-color: color-mix(in oklab, var(--accent) 65%, var(--border));
  background: color-mix(in oklab, var(--accent) 5%, var(--bg-2));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 14%, transparent);
}

#username {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  padding: 14px 0;
  letter-spacing: -0.005em;
}
#username::placeholder { color: var(--text-3); }

.domain-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 14px;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.domain-btn:hover { background: color-mix(in oklab, var(--text) 6%, transparent); color: var(--text); }
.domain-btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--text); }
.domain-btn svg { opacity: 0.6; transition: transform 0.2s var(--ease); }
.domain-btn[aria-expanded="true"] svg { transform: rotate(180deg); opacity: 1; }

.domain-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  min-width: 260px;
  max-width: min(340px, calc(100vw - 32px));
  max-height: min(60vh, 380px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
  transform-origin: top right;
  animation: popIn 0.16s var(--ease);
  overflow: hidden;
}
.domain-menu[hidden] { display: none; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.domain-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.domain-items::-webkit-scrollbar { width: 6px; }
.domain-items::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.domain-menu li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.domain-menu li:hover { background: var(--bg-2); color: var(--text); }
.domain-menu li[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.domain-menu li[aria-selected="true"]::after { content: "✓"; color: var(--accent); }

.domain-menu .domain-filter {
  padding: 2px 2px 6px;
  cursor: default;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.domain-menu .domain-filter:hover { background: transparent; color: var(--text-2); }
.domain-menu .domain-filter input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  outline: 0;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.domain-menu .domain-filter input::placeholder { color: var(--text-3); }
.domain-menu .domain-filter input:focus {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}
.domain-menu .domain-empty {
  cursor: default;
  color: var(--text-3);
  font-style: italic;
  justify-content: center;
}
.domain-menu .domain-empty:hover { background: transparent; color: var(--text-3); }

.composer-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
}

button {
  font: 500 14px/1 var(--display);
  border: 0;
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.08s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
  letter-spacing: -0.005em;
}
button:active { transform: translateY(1px); }

.primary {
  background: var(--accent);
  color: #18181a;
  font-weight: 600;
  box-shadow: 0 8px 24px -10px color-mix(in oklab, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,0.5);
}
.primary:hover { background: var(--accent-2); box-shadow: 0 12px 28px -10px color-mix(in oklab, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,0.5); }

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.ghost:hover { border-color: var(--border-2); background: color-mix(in oklab, var(--text) 4%, transparent); }

.icon-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  position: relative;
}
.icon-btn:hover { border-color: var(--border-2); background: var(--panel); }

#themeBtn .sun, #themeBtn .moon { transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
html[data-theme="dark"] #themeBtn .sun { transform: rotate(-45deg) scale(0.5); opacity: 0; position: absolute; }
html[data-theme="dark"] #themeBtn .moon { transform: rotate(0) scale(1); opacity: 1; }
html[data-theme="light"] #themeBtn .sun { transform: rotate(0) scale(1); opacity: 1; }
html[data-theme="light"] #themeBtn .moon { transform: rotate(45deg) scale(0.5); opacity: 0; position: absolute; }

.danger { color: var(--danger); }
.danger.ghost { border-color: color-mix(in oklab, var(--danger) 35%, var(--border)); }
.danger.ghost:hover { background: color-mix(in oklab, var(--danger) 10%, transparent); border-color: var(--danger); }

.status {
  min-height: 1.2em;
  margin: 0 0 0 auto;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
}
.status.good { color: var(--good); }
.status.warn { color: var(--accent); }

/* ─── HERO ART (animated envelope stack) ─── */
.hero-art {
  position: relative;
  height: 380px;
  display: grid;
  place-items: center;
}
.envelope-stack {
  position: relative;
  width: 340px;
  height: 100%;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.env-card {
  position: absolute;
  left: 50%;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border-2);
  box-shadow: 0 28px 60px -28px rgba(0,0,0,0.6);
  padding: 18px 20px;
  font-family: var(--mono);
}
.env-back {
  top: 50px;
  width: 240px;
  height: 100px;
  transform: translateX(-50%) translateX(-40px) rotate(-12deg);
  opacity: 0.45;
  animation: floatBack 7s ease-in-out infinite;
}
.env-mid {
  top: 30px;
  width: 260px;
  height: 120px;
  transform: translateX(-50%) translateX(20px) rotate(6deg);
  opacity: 0.75;
  animation: floatMid 6s ease-in-out infinite;
}
.env-front {
  top: 90px;
  width: 300px;
  transform: translateX(-50%) rotate(-2deg);
  animation: floatFront 5.5s ease-in-out infinite;
  z-index: 2;
}
@keyframes floatBack {
  0%, 100% { transform: translateX(-50%) translateX(-40px) translateY(0) rotate(-12deg); }
  50% { transform: translateX(-50%) translateX(-42px) translateY(-10px) rotate(-13deg); }
}
@keyframes floatMid {
  0%, 100% { transform: translateX(-50%) translateX(20px) translateY(0) rotate(6deg); }
  50% { transform: translateX(-50%) translateX(22px) translateY(-14px) rotate(7deg); }
}
@keyframes floatFront {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
  50% { transform: translateX(-50%) translateY(-8px) rotate(-1deg); }
}

.env-line {
  height: 8px;
  border-radius: 4px;
  background: var(--border-2);
  margin-bottom: 8px;
}
.env-line.short { width: 60%; }

.env-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.env-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff6b7a, #ffb547);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}
.env-from {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.env-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
}
.env-subject {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.env-code {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
}
.env-code span {
  width: 26px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}
.env-code span.dot {
  width: 6px;
  background: transparent;
  border: 0;
  color: var(--text-3);
}

.env-glow {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  filter: blur(40px);
  z-index: -1;
}

/* ─── INBOX ─── */
.inbox-section {
  position: relative;
  z-index: 1;
  background: color-mix(in oklab, var(--panel) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}

.inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.inbox-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inbox-title h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}
.count {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.inbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.auto-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--good);
  animation: pulse 1.8s ease-in-out infinite;
}

.emails {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emails li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.06s var(--ease);
  position: relative;
  animation: slideIn 0.32s var(--ease);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.emails li:hover { border-color: var(--border-2); background: var(--panel-2); }
.emails li:active { transform: translateY(1px); }
.emails li.new::after {
  content: "new";
  position: absolute;
  right: 16px;
  top: 14px;
  background: var(--accent);
  color: #18181a;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.row-main { min-width: 0; }
.emails .from {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emails .subject {
  color: var(--text-3);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.emails .when {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
  align-self: start;
  padding-top: 4px;
}

/* ─── EMPTY STATE ─── */
.empty {
  text-align: center;
  padding: 48px 14px 32px;
  color: var(--text-3);
}
.empty-art {
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}
.radar {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent-soft) 0%, transparent 70%);
  display: grid;
  place-items: center;
}
.radar span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  animation: radarPulse 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  opacity: 0;
}
.radar span:nth-child(2) { animation-delay: 0.8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
@keyframes radarPulse {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.empty-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.xs { font-size: 11px; }

/* ─── SECTIONS ─── */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 14px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 32px;
  max-width: 600px;
}

.how-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.how-grid li {
  background: color-mix(in oklab, var(--panel) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.how-grid li:hover { border-color: var(--border-2); transform: translateY(-2px); }
.how-grid .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.how-grid h4 {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--text);
}
.how-grid p {
  color: var(--text-3);
  font-size: 14px;
  margin: 0;
  line-height: 1.55;
}

/* ─── FAQ ─── */
.faq-grid {
  display: grid;
  gap: 8px;
}
.faq details {
  background: color-mix(in oklab, var(--panel) 90%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s var(--ease);
}
.faq details[open] { border-color: var(--border-2); }
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-3);
  transition: transform 0.2s var(--ease);
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── DIALOG (email viewer) ─── */
dialog#viewer {
  position: fixed;
  inset: 0;
  width: min(720px, 100% - 24px);
  max-height: calc(100% - 24px);
  margin: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  padding: 26px;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}
dialog#viewer::backdrop {
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(10px);
}
.viewer-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}
dialog h3 {
  font-family: var(--display);
  margin: 6px 0 14px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}
dialog .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.meta-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-stack #vFrom { font-size: 13px; color: var(--text); }
dialog .body {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  max-height: 60vh;
  overflow: auto;
  color: var(--text-2);
}

/* ─── FOOTER ─── */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 28px 36px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── TOASTS ─── */
.toast-wrap {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-md);
  min-width: 260px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.28s var(--ease);
}
.toast .t-from { font-weight: 600; font-size: 12px; color: var(--text); }
.toast .t-subject { color: var(--text-3); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.leaving { animation: toastOut 0.24s var(--ease) forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

@media (max-width: 520px) {
  header { padding: 16px 18px; }
  main { padding: 12px 18px 60px; gap: 56px; }
  footer { padding: 24px 18px; }
  h1 { font-size: 38px; }
  .lede { font-size: 15px; }
  .composer-actions button { flex: 1; justify-content: center; }
  .toast-wrap { top: 70px; right: 12px; left: 12px; }
  .toast { min-width: 0; max-width: none; }
}
