/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:             #060912;
  --bg-2:           #0b1026;
  --bg-3:           #111830;
  --bg-4:           #192038;
  --bg-5:           #1f2844;
  --border:         #1e2a48;
  --border-2:       #27355a;
  --accent:         #7c3aed;
  --accent-2:       #a78bfa;
  --accent-cyan:    #06b6d4;
  --accent-dim:     rgba(124,58,237,0.14);
  --brand-gradient: linear-gradient(135deg, #06b6d4 0%, #7c3aed 100%);
  --text:           #eaf0ff;
  --text-2:         #7b8dc4;
  --text-3:         #3d4e82;
  --success:        #10b981;
  --success-dim:    rgba(16,185,129,0.12);
  --danger:         #f43f5e;
  --danger-dim:     rgba(244,63,94,0.1);
  --sidebar-w:      200px;
  --header-h:       56px;
  --radius:         10px;
  --dot-color:      rgba(6,182,212,0.05);
  --nav-bg:         rgba(6,9,18,0.88);
}

/* ── Themes ─────────────────────────────────────────────────────────────────── */
[data-theme="midnight"] {
  --bg:         #060912;
  --bg-2:       #0a0f1e;
  --bg-3:       #0f1628;
  --bg-4:       #162035;
  --bg-5:       #1c2a42;
  --border:     #1a2540;
  --border-2:   #223050;
  --accent:     #3b82f6;
  --accent-2:   #60a5fa;
  --accent-dim: rgba(59,130,246,0.14);
  --text:       #e8eef8;
  --text-2:     #7a9ab8;
  --text-3:     #3a5878;
  --dot-color:  rgba(59,130,246,0.04);
  --nav-bg:     rgba(6,9,18,0.88);
}

[data-theme="forest"] {
  --bg:         #070e09;
  --bg-2:       #0b1510;
  --bg-3:       #111e15;
  --bg-4:       #18271b;
  --bg-5:       #1f3022;
  --border:     #1a2e1c;
  --border-2:   #223825;
  --accent:     #10b981;
  --accent-2:   #34d399;
  --accent-dim: rgba(16,185,129,0.14);
  --text:       #e2f0e6;
  --text-2:     #7aaa84;
  --text-3:     #3a6044;
  --dot-color:  rgba(16,185,129,0.04);
  --nav-bg:     rgba(7,14,9,0.88);
}

[data-theme="sunset"] {
  --bg:         #0f0a04;
  --bg-2:       #1a1208;
  --bg-3:       #231a0d;
  --bg-4:       #2e2212;
  --bg-5:       #382b18;
  --border:     #2e2015;
  --border-2:   #3a2a1c;
  --accent:     #f59e0b;
  --accent-2:   #fbbf24;
  --accent-dim: rgba(245,158,11,0.14);
  --text:       #f4ede0;
  --text-2:     #a08060;
  --text-3:     #604830;
  --dot-color:  rgba(245,158,11,0.04);
  --nav-bg:     rgba(15,10,4,0.88);
}

[data-theme="light"] {
  --bg:         #f2f2f7;
  --bg-2:       #ffffff;
  --bg-3:       #eaeaf2;
  --bg-4:       #dddde8;
  --bg-5:       #d0d0de;
  --border:     #e0e0ea;
  --border-2:   #cacad8;
  --accent:     #7c3aed;
  --accent-2:   #6246e5;
  --accent-dim: rgba(124,92,248,0.1);
  --text:       #1a1a2e;
  --text-2:     #55556a;
  --text-3:     #9090a8;
  --success-dim: rgba(16,185,129,0.1);
  --danger-dim:  rgba(244,63,94,0.08);
  --dot-color:  rgba(0,0,0,0.055);
  --nav-bg:     rgba(242,242,247,0.9);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, textarea, button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 { font-size: 2.8rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem;  font-weight: 600; }
p  { color: var(--text-2); }
.label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; color: var(--text-3); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border: none; border-radius: 7px;
  font-size: 0.88rem; font-weight: 500; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover:not(:disabled)   { opacity: 0.88; }
.btn:active:not(:disabled)  { transform: scale(0.98); }
.btn:disabled               { opacity: 0.4; cursor: not-allowed; }
.btn-primary  { background: var(--brand-gradient); color: #fff; }
.btn-ghost    { background: transparent; color: var(--text-2); border: 1px solid var(--border-2); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-4); opacity: 1; color: var(--text); }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-sm       { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg       { padding: 0.9rem 2.2rem; font-size: 1.08rem; font-weight: 600; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.82rem; font-weight: 500; color: var(--text-2); }
.input {
  background: var(--bg-3); border: 1px solid var(--border-2);
  color: var(--text); border-radius: 7px;
  padding: 0.6rem 0.85rem; font-size: 0.9rem; width: 100%; outline: none;
  transition: border-color 0.15s;
}
.input:focus  { border-color: var(--accent); }
.input::placeholder { color: var(--text-3); }
textarea.input { resize: vertical; line-height: 1.5; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.card-sm { padding: 0.9rem 1rem; }
.card + .card { margin-top: 0.75rem; }

/* ── Badges / status ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.18rem 0.6rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-muted   { background: var(--bg-4); color: var(--text-2); }
.badge-accent  { background: var(--accent-dim); color: var(--accent-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ── Status line ───────────────────────────────────────────────────────────── */
.status-msg { font-size: 0.8rem; min-height: 1.1em; margin-top: 0.4rem; }
.status-msg.ok  { color: var(--success); }
.status-msg.err { color: var(--danger); }
.status-msg a   { color: var(--accent-2); }

/* ── Divider ───────────────────────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm   { gap: 0.5rem; }
.gap-md   { gap: 0.85rem; }
.gap-lg   { gap: 1.25rem; }
.mt-sm    { margin-top: 0.5rem; }
.mt-md    { margin-top: 0.85rem; }
.muted    { color: var(--text-2); }
.small    { font-size: 0.82rem; }


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════════════════════════════════════ */

/* Nav */
.land-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 60px;
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.land-nav-logo { font-size: 1.05rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.45rem; }
.land-nav-logo span { color: var(--accent); }
.land-nav-links { display: flex; align-items: center; gap: 0.5rem; }

/* Hero */
.land-hero {
  padding: 8rem 1.5rem 5rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 700px; margin: 0 auto;
}
.land-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--accent-dim); color: var(--accent-2);
  border: 1px solid rgba(124,92,248,0.25);
  padding: 0.25rem 0.85rem; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600; margin-bottom: 1.5rem;
}
.land-hero h1 { margin-bottom: 1.2rem; }
.land-hero h1 .gradient {
  background: linear-gradient(135deg, #06b6d4 0%, #7c3aed 60%, #a78bfa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.land-hero p { font-size: 1.08rem; max-width: 520px; margin-bottom: 2rem; }
.land-hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* Features */
.land-section { padding: 4rem 1.5rem; max-width: 1000px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.land-section-title { text-align: center; margin-bottom: 2.5rem; }
.land-section-title p { margin-top: 0.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 720px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-2); }
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-dim); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.2rem;
}
.feature-card h3 { margin-bottom: 0.4rem; font-size: 1rem; }
.feature-card p  { font-size: 0.88rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 640px; margin: 0 auto; }
@media (max-width: 600px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.pricing-card.featured { border-color: var(--accent); background: linear-gradient(145deg, var(--bg-2), var(--accent-dim)); }
.pricing-card .plan-name  { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin-bottom: 0.4rem; }
.pricing-card .plan-price { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 0.2rem; }
.pricing-card .plan-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-2); }
.pricing-card p { font-size: 0.85rem; margin-bottom: 1.25rem; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.5rem; }
.plan-features li { font-size: 0.86rem; color: var(--text-2); display: flex; align-items: center; gap: 0.5rem; }
.plan-features li svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--success); stroke: var(--success); }
.plan-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-2);
  background: var(--accent-dim); border: 1px solid rgba(124,92,248,0.3);
  border-radius: 20px; padding: 0.2rem 0.65rem; margin-bottom: 0.65rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — DEMO WIDGET
══════════════════════════════════════════════════════════════════════════════ */
.demo-section {
  padding: 0 1.25rem 1rem;
  max-width: 660px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.demo-widget {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 28px 70px rgba(0,0,0,0.5);
}
.demo-widget-header {
  padding: 0.7rem 1.1rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.demo-label-pill {
  font-size: 0.73rem; font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.demo-textarea {
  width: 100%; min-height: 120px;
  background: var(--bg-2);
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 0.93rem; line-height: 1.65;
  padding: 1rem 1.1rem; resize: none;
  font-family: inherit; outline: none; box-sizing: border-box;
  display: block;
}
.demo-textarea::placeholder { color: var(--text-3); }
.demo-textarea:focus { background: rgba(124,92,248,0.025); }
.demo-generate-btn {
  width: 100%; border-radius: 0; border: none;
  padding: 0.9rem 1.1rem; font-size: 1rem; font-weight: 600;
  background: var(--accent); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: opacity 0.15s;
}
.demo-generate-btn:hover:not(:disabled) { opacity: 0.88; }
.demo-generate-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.demo-output {
  border-top: 1px solid var(--border);
  padding: 1.1rem;
  background: var(--bg-3);
}
.demo-output-header {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--success); margin-bottom: 0.75rem;
}
.demo-reply {
  font-size: 0.9rem; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; min-height: 2.5rem; margin-bottom: 1.1rem;
}
.demo-signup-btn {
  width: 100%; justify-content: center;
  font-size: 1rem; padding: 0.8rem 1.25rem;
}
.demo-note {
  text-align: center; font-size: 0.72rem; color: var(--text-3); margin: 0.5rem 0 0;
}
.demo-share {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap;
}
.demo-share-label { font-size: 0.72rem; color: var(--text-3); }
.btn-share {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.72rem; font-weight: 500;
  text-decoration: none; transition: opacity .15s, transform .1s;
  border: 1px solid var(--border);
}
.btn-share:hover { opacity: 0.8; transform: translateY(-1px); }
.btn-share-x  { color: #e7e7e7; background: #1a1a24; }
.btn-share-li { color: #a0bdd8; background: #1a1a24; }
@keyframes demo-spin { to { transform: rotate(360deg); } }
.demo-spin { animation: demo-spin 0.9s linear infinite; display: inline-block; }
@keyframes demo-shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}
.demo-shake { animation: demo-shake 0.4s ease; }

/* Scripted inbox-triage demo */
.demo-intro { padding: 0.9rem 1.1rem 0; font-size: 0.85rem; color: var(--text-3); margin: 0; }
.demo-inbox-list { padding: 0.9rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.demo-row {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.65rem 0.85rem;
}
.demo-row-main { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.demo-row-from { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.demo-row-subject {
  font-size: 0.83rem; color: var(--text-2); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-row-badge {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.14rem 0.5rem; border-radius: 20px; flex-shrink: 0;
  opacity: 0; transform: scale(0.85); transition: opacity 0.3s, transform 0.3s;
}
.demo-row-badge.shown { opacity: 1; transform: scale(1); }
.demo-row-badge.urgent    { background: rgba(239,68,68,0.14);  color: #ef4444; }
.demo-row-badge.important { background: rgba(124,92,248,0.14); color: #9d82ff; }
.demo-row-badge.fyi       { background: rgba(107,114,128,0.18); color: #9aa0ab; }
.demo-row-cat { font-size: 0.7rem; color: var(--text-3); flex-shrink: 0; opacity: 0; transition: opacity 0.3s; }
.demo-row-cat.shown { opacity: 1; }
.demo-row-draft {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
}
.demo-row-draft.shown { max-height: 220px; opacity: 1; margin-top: 0.65rem; }
.demo-row-draft-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--success); margin-bottom: 0.35rem;
}
.demo-row-draft-text {
  font-size: 0.83rem; line-height: 1.6; color: var(--text-2); white-space: pre-wrap;
  background: var(--bg-2); border-radius: 8px; padding: 0.6rem 0.75rem; min-height: 1.6rem;
}
.demo-row-note { font-size: 0.76rem; color: var(--text-3); opacity: 0; transition: opacity 0.3s; margin-top: 0.4rem; }
.demo-row-note.shown { opacity: 1; }
.demo-status { padding: 0 1.1rem 1.1rem; }
.demo-summary { border-top: 1px solid var(--border); padding: 1.1rem; background: var(--bg-3); }
.demo-summary-stat { font-size: 0.88rem; color: var(--text); text-align: center; margin-bottom: 1rem; line-height: 1.6; }
.demo-summary-stat strong { color: var(--accent-2); }
.demo-replay-btn {
  display: block; margin: 0.75rem auto 0; background: none; border: none;
  color: var(--text-3); font-size: 0.78rem; cursor: pointer; text-decoration: underline;
}

/* Trust strip */
.trust-strip {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 0.3rem 0.7rem;
  padding: 0.9rem 1.5rem 2rem;
  font-size: 0.77rem; color: var(--text-3);
}
.trust-item { display: flex; align-items: center; gap: 0.28rem; }
.trust-dot  { opacity: 0.4; }
@media (max-width: 480px) {
  .trust-dot { display: none; }
  .trust-strip { flex-direction: column; align-items: center; gap: 0.4rem; }
  .demo-generate-btn { font-size: 0.95rem; }
  .demo-section { padding: 0 0.75rem 0.75rem; }
}

/* Pricing list (landing) */
.plan-list {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: flex; flex-direction: column; gap: 0.45rem; flex: 1;
}
.plan-list li {
  font-size: 0.84rem; color: var(--text-2);
  display: flex; align-items: center; gap: 0.45rem;
}
.plan-list li::before {
  content: "✓"; color: var(--success);
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}

/* ── How it works ─────────────────────────────────────────────────────────── */
.how-section { padding-bottom: 3rem; }
.how-steps {
  display: flex; align-items: flex-start; gap: 0;
  max-width: 720px; margin: 0 auto;
}
.how-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 1.25rem;
}
.how-step-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-dim); border: 1px solid rgba(124,92,248,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2); margin-bottom: 1rem;
}
.how-step-icon svg { width: 30px; height: 30px; }
.how-step-num {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--accent-2); text-transform: uppercase; margin-bottom: 0.5rem;
}
.how-step h3 { font-size: 0.97rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.how-step p  { font-size: 0.82rem; color: var(--text-3); line-height: 1.65; margin: 0; }
.how-step-arrow {
  font-size: 1.25rem; color: var(--border-2); padding-top: 1.1rem;
  flex-shrink: 0; align-self: flex-start; margin-top: 14px;
}
@media (max-width: 640px) {
  .how-steps { flex-direction: column; gap: 1.5rem; align-items: stretch; }
  .how-step { flex-direction: row; text-align: left; padding: 0; gap: 1rem; }
  .how-step-icon { flex-shrink: 0; margin-bottom: 0; }
  .how-step-arrow { display: none; }
  .how-step > div, .how-step > h3, .how-step > p { display: block; }
}

/* ── Testimonials ──────────────────────────────────────────────────────────── */
.testimonials-section { padding-bottom: 2rem; }
.testimonials-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem;
  max-width: 860px; margin: 0 auto;
}
.testimonial-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.testimonial-stars { color: #f59e0b; font-size: 0.85rem; letter-spacing: 0.05em; }
.testimonial-quote {
  font-size: 0.9rem; color: var(--text); line-height: 1.65;
  margin: 0; flex: 1; font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 0.65rem; }
@media (max-width: 700px) { .testimonials-grid { grid-template-columns: 1fr; } }
@media (min-width: 701px) and (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }

/* ── FAQ ───────────────────────────────────────────────────────────────────── */
.faq-section { padding-bottom: 4rem; }
.faq-list { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq-q {
  width: 100%; background: var(--bg-2); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; text-align: left;
  font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.4;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--bg-3); }
.faq-chevron { flex-shrink: 0; color: var(--text-3); transition: transform 0.2s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  font-size: 0.85rem; color: var(--text-2); line-height: 1.7;
  transition: max-height 0.25s ease, padding 0.2s;
  padding: 0 1.25rem;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 1.25rem 1rem; }

/* Footer */
.land-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem; text-align: center;
  font-size: 0.82rem; color: var(--text-3);
}
.land-footer a { color: var(--text-2); }
.land-footer a:hover { color: var(--text); }


/* ══════════════════════════════════════════════════════════════════════════════
   ONBOARDING
══════════════════════════════════════════════════════════════════════════════ */
.ob-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 2rem;
  background: var(--bg);
}
.ob-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 540px;
}
.ob-progress { display: flex; gap: 0.35rem; margin-bottom: 2.25rem; }
.ob-dot {
  height: 4px; border-radius: 2px; flex: 1;
  background: var(--bg-5); transition: background 0.3s;
}
.ob-dot.active { background: var(--accent); }
.ob-dot.done   { background: var(--success); }

.ob-step { animation: ob-fade 0.2s ease; }
@keyframes ob-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ob-step h2   { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.ob-step > p  { font-size: 0.9rem; color: var(--text-2); margin-bottom: 1.75rem; line-height: 1.6; }

/* Choice cards (tone / length) */
.ob-choices { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.ob-choice {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 0.85rem 1rem; border-radius: 9px;
  border: 1.5px solid var(--border-2); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-3);
}
.ob-choice:hover { border-color: var(--accent-2); background: var(--bg-4); }
.ob-choice.selected { border-color: var(--accent); background: var(--accent-dim); }
.ob-choice-radio {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--border-2); transition: border-color 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.ob-choice.selected .ob-choice-radio { border-color: var(--accent); }
.ob-choice.selected .ob-choice-radio::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.ob-choice-body { flex: 1; }
.ob-choice-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.15rem; }
.ob-choice-desc  { font-size: 0.78rem; color: var(--text-3); font-style: italic; }

.ob-choice-section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-3); margin: 1.25rem 0 0.6rem;
}

/* Email provider cards */
.ob-providers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; margin-bottom: 1.5rem; }
.ob-provider {
  border: 1.5px solid var(--border-2); border-radius: 10px;
  padding: 1rem 0.75rem; text-align: center; cursor: pointer;
  background: var(--bg-3); transition: border-color 0.15s, background 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.ob-provider:hover { border-color: var(--accent-2); background: var(--bg-4); }
.ob-provider.connected { border-color: var(--success); background: rgba(16,185,129,0.06); cursor: default; }
.ob-provider-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.ob-provider-name  { font-size: 0.8rem; font-weight: 600; }
.ob-provider-badge { font-size: 0.68rem; font-weight: 600; }

/* Nav buttons row */
.ob-nav { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.75rem; }
.ob-nav-spacer { flex: 1; }

/* Done step */
.ob-done-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--success-dim); border: 2px solid var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 1.5rem;
}
.ob-done-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 2rem; }
.ob-done-list li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.88rem; color: var(--text-2); }
.ob-done-list li::before { content: "→"; color: var(--accent-2); flex-shrink: 0; font-weight: 700; }


/* ══════════════════════════════════════════════════════════════════════════════
   AUTH PAGES (login / signup)
══════════════════════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 2rem;
}
.auth-logo {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 2rem;
  color: var(--text); display: flex; align-items: center; gap: 0.4rem;
}
.auth-logo span { color: var(--accent); }
.auth-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 2rem; width: 100%; max-width: 380px;
}
.auth-card h2 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.auth-card > p { font-size: 0.85rem; margin-bottom: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-footer { margin-top: 1.25rem; text-align: center; font-size: 0.83rem; color: var(--text-2); }
.auth-footer a { color: var(--accent-2); }
.auth-error   { background: var(--danger-dim);  color: var(--danger);  border-radius: 7px; padding: 0.6rem 0.85rem; font-size: 0.83rem; margin-top: 0.5rem; }
.auth-success { background: var(--success-dim); color: var(--success); border-radius: 7px; padding: 0.6rem 0.85rem; font-size: 0.83rem; margin-top: 0.5rem; }

/* Social sign-in buttons */
.auth-social { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  width: 100%; padding: 0.6rem 1rem; border-radius: 8px; font-size: 0.88rem;
  font-weight: 500; cursor: pointer; transition: opacity 0.15s, background 0.15s;
  border: 1px solid var(--border-2); background: var(--bg-3); color: var(--text);
}
.btn-social:hover:not(:disabled) { background: var(--bg-4); }
.btn-social:disabled { opacity: 0.4; cursor: not-allowed; }
.auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.25rem 0 1.25rem; color: var(--text-3); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}


/* ══════════════════════════════════════════════════════════════════════════════
   APP LAYOUT (dashboard / integrations / billing)
══════════════════════════════════════════════════════════════════════════════ */
.app-layout {
  display: flex; height: 100vh; overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 1.25rem 0.75rem;
}
.sidebar-logo {
  font-size: 1rem; font-weight: 700; padding: 0.25rem 0.5rem;
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.sidebar-logo:hover { opacity: 0.85; }
.sidebar-logo .rt-wordmark { font-weight: 700; letter-spacing: -0.02em; }
.sidebar-logo .rt-wordmark .rt-task { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 0.75rem; border-radius: 7px;
  font-size: 0.87rem; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: background 0.12s, color 0.12s;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover    { background: var(--bg-4); color: var(--text); }
.nav-item.active   { background: linear-gradient(90deg, var(--accent-dim) 0%, transparent 100%); color: var(--accent-2); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item svg      { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-divider   { border: none; border-top: 1px solid var(--border); margin: 0.75rem 0; }
.upgrade-cta-sidebar {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0 0.5rem 0.5rem;
  padding: 0.55rem 0.75rem; border-radius: 7px;
  font-size: 0.84rem; font-weight: 600;
  color: #fff; background: var(--accent);
  text-decoration: none; transition: opacity 0.15s;
}
.upgrade-cta-sidebar:hover { opacity: 0.88; }
.upgrade-cta-sidebar svg   { flex-shrink: 0; }
.sidebar-user {
  padding: 0.5rem 0.75rem; display: flex; align-items: center; gap: 0.6rem;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 0.83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main area */
.app-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.app-header {
  height: var(--header-h); flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
}
.app-header h1 { font-size: 1.05rem; font-weight: 600; }
.app-header-right { display: flex; align-items: center; gap: 0.75rem; }
.app-content { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }


/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════════════════════════════ */

/* Status strip */
.status-strip { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.status-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.6rem 0.9rem;
  font-size: 0.83rem;
}
.status-chip .chip-label { color: var(--text-2); }
.status-chip .chip-val   { font-weight: 600; }

/* Two-column copilot layout */
.copilot-layout { display: flex; gap: 0.75rem; height: calc(100vh - var(--header-h) - 2.75rem); min-height: 0; }

/* Inbox column */
.inbox-col {
  width: 310px; flex-shrink: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.inbox-col-header {
  padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap;
}
.inbox-col-header > .btn { flex-shrink: 0; }
.inbox-header-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.inbox-list { flex: 1; overflow-y: auto; }
.email-item {
  padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s;
}
.email-item:hover  { background: var(--bg-3); }
.email-item.active { background: var(--accent-dim); border-left: 2px solid var(--accent); padding-left: calc(0.85rem - 2px); }
.ei-from    { font-size: 0.8rem; font-weight: 600; overflow: hidden; }
.email-item.ei-unread .ei-from    { color: var(--text); font-weight: 700; }
.email-item.ei-unread .ei-subject { color: var(--text); font-weight: 600; }
.email-item.ei-unread { border-left: 2px solid var(--accent); padding-left: calc(0.85rem - 2px); }
.ei-action-btn {
  flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 0.15rem;
  color: var(--text-3); line-height: 0; border-radius: 3px; transition: color .15s;
}
.ei-del:hover     { color: var(--danger) !important; }
.ei-archive:hover { color: var(--accent-2) !important; }
/* Search */
.inbox-search-wrap {
  position: relative; padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.inbox-search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.inbox-search {
  width: 100%; padding: 0.3rem 0.5rem 0.3rem 1.75rem;
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 6px; font-size: 0.78rem; color: var(--text);
  outline: none; transition: border-color .15s;
}
.inbox-search:focus { border-color: var(--accent-2); }
/* Back button (mobile) */
.back-to-inbox {
  display: flex; align-items: center; gap: 0.4rem; background: none; border: none;
  color: var(--accent-2); cursor: pointer; font-size: 0.82rem; font-weight: 600;
  padding: 0.3rem 0; margin-bottom: 0.5rem;
}
.ei-subject { font-size: 0.76rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.1rem; }
.ei-snippet { font-size: 0.71rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.1rem; }
.ei-account { font-size: 0.68rem; color: var(--accent-2); opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.inbox-empty { padding: 1.5rem; text-align: center; font-size: 0.82rem; color: var(--text-3); }
.inbox-tabs { display: flex; gap: 0.2rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.inbox-tabs::-webkit-scrollbar { display: none; }
.inbox-tab {
  font-size: 0.72rem; font-weight: 600;
  padding: 0.22rem 0.4rem; border-radius: 5px;
  border: none; background: none; cursor: pointer;
  color: var(--text-3); transition: background 0.12s, color 0.12s;
}
.inbox-tab:hover  { background: var(--bg-4); color: var(--text-2); }
.inbox-tab.active { background: var(--accent-dim); color: var(--accent-2); }
.inbox-tab:disabled { opacity: 0.35; cursor: not-allowed; }
.inbox-filter {
  font-size: 0.7rem; font-weight: 600;
  padding: 0.18rem 0.55rem; border-radius: 20px;
  border: 1px solid var(--border); background: none; cursor: pointer;
  color: var(--text-3); transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.inbox-filter:hover  { background: var(--bg-4); color: var(--text-2); }
.inbox-filter.active { background: var(--accent-dim); color: var(--accent-2); border-color: var(--accent-2); }
.contact-suggest-item {
  padding: 0.4rem 0.65rem; font-size: 0.8rem; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.contact-suggest-item:last-child { border-bottom: none; }
.contact-suggest-item:hover { background: var(--bg-3); }

/* Copilot column */
.copilot-col {
  flex: 1; min-width: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.copilot-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--text-3); text-align: center; gap: 0.5rem;
  font-size: 0.88rem;
}
.copilot-empty strong { color: var(--text-2); display: block; font-size: 0.95rem; }

/* Email card */
.email-body-text {
  font-size: 0.84rem; line-height: 1.65; white-space: pre-wrap;
  color: var(--text-2); max-height: 170px; overflow-y: auto;
  border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.65rem;
}
.email-body-text:has(iframe) {
  white-space: normal; max-height: none; overflow-y: visible;
}
.email-meta .mrow { font-size: 0.82rem; margin-bottom: 0.2rem; color: var(--text-2); }
.email-meta .mrow strong { color: var(--text); font-weight: 500; }

/* Reply / calendar cards */
.card-field-row { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.reply-textarea  { height: 100px; margin-bottom: 0.5rem; }
.reply-toolbar {
  display: flex; align-items: center; gap: 0.1rem;
  padding: 0.2rem 0.35rem;
  background: var(--bg-3); border: 1px solid var(--border); border-bottom: none;
  border-radius: 6px 6px 0 0; flex-wrap: wrap;
}
.toolbar-btn {
  background: none; border: 1px solid transparent; border-radius: 4px;
  padding: 0.15rem 0.35rem; cursor: pointer; font-size: 0.8rem;
  color: var(--text-2); min-width: 24px; text-align: center; line-height: 1.3;
  display: inline-flex; align-items: center; justify-content: center;
}
.toolbar-btn:hover { background: var(--bg-4); border-color: var(--border); }
.toolbar-btn.active { background: var(--accent-dim); color: var(--accent-2); }
.toolbar-btn.dictating { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #ef4444; animation: dictate-pulse 1.4s ease-in-out infinite; }
@keyframes dictate-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.toolbar-sep { width: 1px; height: 14px; background: var(--border); margin: 0 0.15rem; flex-shrink: 0; }
#replyText[contenteditable] {
  border-radius: 0 0 6px 6px !important; border-top: none !important;
  outline: none; min-height: 100px; white-space: normal;
  word-break: break-word; overflow-y: auto;
}
#replyText[contenteditable]:empty::before { content: attr(data-placeholder); color: var(--text-3); pointer-events: none; }
#replyText[contenteditable]:focus { border-color: var(--accent) !important; }
#replyText[contenteditable] p { margin: 0 0 0.4em; }
#replyText[contenteditable] p:last-child { margin-bottom: 0; }
#replyText[contenteditable] blockquote { margin: 0.3em 0 0.3em 0.5em; padding: 0 0 0 0.65em; border-left: 3px solid var(--border); color: var(--text-3); }
#replyText[contenteditable] ul, #replyText[contenteditable] ol { margin: 0.25em 0; padding-left: 1.4em; }
#replyText[contenteditable] a { color: var(--accent-2); }
.email-category-chip {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.1rem 0.35rem; border-radius: 10px; margin-left: 0.35rem; flex-shrink: 0;
}
.event-row { font-size: 0.84rem; margin-bottom: 0.25rem; color: var(--text-2); }
.event-row strong { color: var(--text); font-weight: 500; display: inline-block; width: 56px; }
.confidence-chip {
  display: inline-flex; align-items: center; margin-top: 0.35rem;
  background: var(--success-dim); color: var(--success);
  font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 20px;
}

/* Clarification card */
#clarificationCard { border-left: 3px solid #f59e0b; }
#reviewPanel summary::-webkit-details-marker { display: none; }
#reviewPanel[open] summary svg { transform: rotate(90deg); }
#reviewPanel summary svg { transition: transform 0.15s; }

/* Action buttons row */
.action-row { display: flex; gap: 0.45rem; margin-top: 0.75rem; flex-wrap: wrap; }


/* ══════════════════════════════════════════════════════════════════════════════
   INTEGRATIONS PAGE
══════════════════════════════════════════════════════════════════════════════ */
.integration-cards { display: flex; flex-direction: column; gap: 0.85rem; }
.integration-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.int-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg-4); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.int-body { flex: 1; min-width: 180px; }
.int-body h3 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.int-body p  { font-size: 0.82rem; color: var(--text-2); }
.int-card-row {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; flex-wrap: wrap;
}
.int-section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  margin-bottom: 0.6rem; margin-top: 0.25rem;
}


/* ══════════════════════════════════════════════════════════════════════════════
   BILLING PAGE
══════════════════════════════════════════════════════════════════════════════ */
.billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
@media (max-width: 560px) { .billing-grid { grid-template-columns: 1fr; } }
.billing-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.billing-card.current { border-color: var(--accent); }
.billing-card .plan-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--accent-dim); color: var(--accent-2);
  padding: 0.15rem 0.55rem; border-radius: 4px; margin-bottom: 0.75rem;
}
.billing-card .price { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.2rem; }
.billing-card .price sub { font-size: 0.85rem; font-weight: 400; color: var(--text-2); }
.billing-card > p { font-size: 0.83rem; color: var(--text-2); margin-bottom: 1.25rem; }
.billing-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.billing-features li { font-size: 0.84rem; color: var(--text-2); display: flex; align-items: center; gap: 0.5rem; }
.billing-features li::before { content: "✓"; color: var(--success); font-weight: 700; }
.billing-features li.dim { color: var(--text-3); }
.billing-features li.dim::before { content: "–"; color: var(--text-3); }

/* Feature comparison table */
.feat-row td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.feat-row:last-child td { border-bottom: none; }
.feat-row-alt { background: var(--bg-3); }
.feat-name { color: var(--text-2); }
.feat-free, .feat-pro, .feat-ultra { text-align: center; font-size: 0.8rem; color: var(--text-3); }
.feat-yes { color: var(--success); font-weight: 700; }
.feat-no  { color: var(--text-3); }
.feat-pro { color: var(--accent-2); font-weight: 600; }
.feat-ultra { color: #f59e0b; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════════
   LOGO
══════════════════════════════════════════════════════════════════════════════ */
.rt-logo {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  text-decoration: none; letter-spacing: -0.01em;
}
.rt-logo svg { flex-shrink: 0; }
.rt-icon-img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; display: block; }
.rt-logo.lg   { font-size: 1.15rem; }
.rt-logo.sm   { font-size: 0.95rem; }
.rt-logo .rt-wordmark .rt-task { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
/* Clear old span color overrides */
.land-nav-logo span, .auth-logo span, .sidebar-logo span { color: inherit; }


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING BACKGROUND
══════════════════════════════════════════════════════════════════════════════ */
.land-bg {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0;
  animation: orb-in 1.5s ease forwards, orb-drift 14s ease-in-out infinite;
}
.orb-1 {
  width: 720px; height: 720px;
  background: radial-gradient(circle at center, #7c3aed 0%, transparent 70%);
  top: -320px; left: -220px;
  animation-delay: 0s, 0.2s;
}
.orb-2 {
  width: 560px; height: 560px;
  background: radial-gradient(circle at center, #06b6d4 0%, transparent 70%);
  top: 60px; right: -180px;
  animation-delay: 0.4s, 0.6s;
  animation-duration: 1.5s, 18s;
  animation-direction: normal, reverse;
}
.orb-3 {
  width: 420px; height: 420px;
  background: radial-gradient(circle at center, #a78bfa 0%, transparent 70%);
  bottom: -80px; left: 38%;
  animation-delay: 0.7s, 0.9s;
  animation-duration: 1.5s, 11s;
}
@keyframes orb-in {
  from { opacity: 0; }
  to   { opacity: 0.11; }
}
@keyframes orb-drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(28px,-36px) scale(1.04); }
  66%     { transform: translate(-18px,22px) scale(0.97); }
}


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — ENHANCED HERO
══════════════════════════════════════════════════════════════════════════════ */
.hero-note {
  font-size: 0.78rem; color: var(--text-3);
  margin-top: 0.75rem; letter-spacing: 0.01em;
}
.hero-glow {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(124,92,248,0.18) 0%, transparent 70%);
  pointer-events: none; bottom: -40px;
}


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — PRODUCT PREVIEW
══════════════════════════════════════════════════════════════════════════════ */
.preview-section {
  padding: 1rem 1.5rem 3.5rem; position: relative;
}
.preview-section-glow {
  position: absolute; inset: 20px 10%; height: 60%;
  background: var(--accent); opacity: 0.07; filter: blur(80px);
  border-radius: 50%; pointer-events: none;
}
.preview-chrome {
  max-width: 900px; margin: 0 auto;
  border: 1px solid var(--border-2); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 40px 100px rgba(0,0,0,0.55);
}
.preview-bar {
  background: var(--bg-3); border-bottom: 1px solid var(--border);
  padding: 0.55rem 1rem; display: flex; align-items: center; gap: 0.75rem;
}
.chrome-dots { display: flex; gap: 0.35rem; }
.chrome-dots i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-5); font-style: normal; }
.chrome-url {
  font-size: 0.7rem; color: var(--text-3);
  background: var(--bg-4); padding: 0.18rem 0.75rem; border-radius: 5px;
}
.preview-app { display: flex; height: 330px; }

/* Preview sidebar */
.p-sidebar {
  width: 148px; flex-shrink: 0;
  background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 0.85rem 0.55rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.p-logo {
  font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.4rem; margin-bottom: 0.85rem;
  display: flex; align-items: center; gap: 0.3rem;
}
.p-nav {
  font-size: 0.68rem; padding: 0.3rem 0.45rem; border-radius: 5px;
  color: var(--text-2); display: flex; align-items: center; gap: 0.35rem;
}
.p-nav.active { background: var(--accent-dim); color: var(--accent-2); }
.p-user {
  margin-top: auto; padding: 0.4rem 0.45rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.p-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 700; flex-shrink: 0;
}
.p-uname { font-size: 0.62rem; color: var(--text-2); }

/* Preview content */
.preview-content { flex: 1; display: flex; overflow: hidden; }
.p-inbox { width: 168px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.p-inbox-hdr {
  padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-3);
}
.p-inbox-hdr span {
  background: var(--bg-4); color: var(--text-2);
  font-size: 0.58rem; padding: 0.08rem 0.4rem; border-radius: 3px;
}
.p-email { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.p-email.sel {
  background: var(--accent-dim);
  border-left: 2px solid var(--accent);
  padding-left: calc(0.6rem - 2px);
}
.p-efrom { font-size: 0.64rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-esubj { font-size: 0.59rem; color: var(--text-2); margin-top: 0.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-esnip { font-size: 0.55rem; color: var(--text-3); margin-top: 0.05rem; }

/* Preview copilot */
.p-copilot { flex: 1; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; overflow: hidden; }
.p-section-label {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 0.1rem;
}
.p-card {
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 0.6rem;
}
.p-card-tag {
  font-size: 0.56rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent-2); margin-bottom: 0.3rem;
  display: flex; align-items: center; gap: 0.25rem;
}
.p-card-body { font-size: 0.62rem; color: var(--text-2); line-height: 1.45; margin-bottom: 0.45rem; }
.p-btn-mini {
  display: inline-flex; font-size: 0.6rem; font-weight: 600;
  background: var(--accent); color: white;
  border-radius: 4px; padding: 0.18rem 0.5rem;
}
.p-cal-row { font-size: 0.6rem; color: var(--text-2); margin-bottom: 0.12rem; }
.p-cal-row strong { color: var(--text); font-weight: 600; margin-right: 0.3rem; }
.p-btn-row-mini { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
.p-btn-ghost-mini {
  display: inline-flex; font-size: 0.6rem; font-weight: 500;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-2); border-radius: 4px; padding: 0.18rem 0.5rem;
}
.p-confidence {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: var(--success-dim); color: var(--success);
  font-size: 0.56rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 10px;
  margin-left: 0.35rem;
}


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — STATS BAR
══════════════════════════════════════════════════════════════════════════════ */
.stats-section { padding: 0 1.5rem 3rem; }
.stats-bar {
  max-width: 860px; margin: 0 auto;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem 2.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; text-align: center;
}
.stat { padding: 0.25rem 1rem; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-num {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.04em;
  background: linear-gradient(135deg, #eeeef8, #9d82ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.76rem; color: var(--text-2); margin-top: 0.15rem; }
@media (max-width: 600px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-left: 1px solid var(--border); }
  .stat:nth-child(3) { border-left: none; border-top: 1px solid var(--border); }
  .stat:nth-child(4) { border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
}


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — FEATURES (enhanced)
══════════════════════════════════════════════════════════════════════════════ */
.features-grid-lg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
@media (max-width: 720px) { .features-grid-lg { grid-template-columns: 1fr; } }
.feature-card-lg {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card-lg:hover {
  border-color: rgba(124,92,248,0.35);
  box-shadow: 0 0 0 1px rgba(124,92,248,0.1), 0 8px 24px rgba(0,0,0,0.2);
}
.feature-card-lg .fi {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid rgba(124,92,248,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.2rem;
}
.feature-card-lg .fi-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid rgba(124,92,248,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.feature-card-lg .fi-icon svg {
  width: 20px; height: 20px; color: var(--accent-2); stroke: var(--accent-2);
}
.feature-card-lg h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.feature-card-lg p  { font-size: 0.86rem; }


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — STEPS
══════════════════════════════════════════════════════════════════════════════ */
.steps-section { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  position: relative;
}
.steps-grid::before {
  content: "";
  position: absolute; top: 20px;
  left: calc(16.67% + 10px); right: calc(16.67% + 10px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim) 20%, var(--accent) 50%, var(--accent-dim) 80%, transparent);
}
@media (max-width: 720px) { .steps-grid { grid-template-columns: 1fr; } .steps-grid::before { display: none; } }
.step-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.85rem; }
.step-num {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-dim); border: 1px solid rgba(124,92,248,0.3);
  color: var(--accent-2); font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.step-card h3 { font-size: 1rem; }
.step-card p  { font-size: 0.86rem; }


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — CTA SECTION
══════════════════════════════════════════════════════════════════════════════ */
.cta-section {
  padding: 5rem 1.5rem; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(124,92,248,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 { font-size: 2.2rem; margin-bottom: 0.75rem; position: relative; }
.cta-section > p { font-size: 1rem; max-width: 460px; margin: 0 auto 2rem; position: relative; }
.cta-section .land-hero-ctas { position: relative; }
.cta-note { font-size: 0.78rem; color: var(--text-3); margin-top: 0.85rem; }


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — FOOTER (multi-column)
══════════════════════════════════════════════════════════════════════════════ */
.land-footer-grid {
  max-width: 1000px; margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
}
@media (max-width: 720px) { .land-footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand-desc {
  font-size: 0.83rem; color: var(--text-2); margin-top: 0.85rem;
  line-height: 1.6; max-width: 220px;
}
.footer-col-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 0.9rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.83rem; color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.land-footer-bottom {
  border-top: 1px solid var(--border); padding: 1.25rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-3);
  max-width: 1000px; margin: 0 auto;
}
.land-footer-bottom a { color: var(--text-2); }
.land-footer-bottom a:hover { color: var(--text); }


/* ══════════════════════════════════════════════════════════════════════════════
   SETTINGS PAGE
══════════════════════════════════════════════════════════════════════════════ */
.settings-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.settings-section h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.settings-desc { font-size: 0.82rem; color: var(--text-2); margin-bottom: 1.1rem; }
.settings-form { display: flex; flex-direction: column; gap: 0.85rem; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem; background: var(--bg-3); border-radius: 7px;
  cursor: pointer; user-select: none;
}
.toggle-row:hover { background: var(--bg-4); }
.toggle-label { font-size: 0.85rem; color: var(--text-2); }
.toggle-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.settings-danger { border-color: rgba(244,63,94,0.3); }
.settings-danger h3 { color: var(--danger); }

/* Toggle switch — visually replaces a plain checkbox everywhere an on/off
   preference is set. Keeps a real <input type="checkbox"> underneath (just
   visually hidden) so every existing .checked / onchange / label-click
   handler keeps working with zero JS changes — this is purely a restyle. */
/* No display/align-items here on purpose — every real usage already sets its
   own flex layout (inline style or .toggle-row), and this coming later in the
   cascade would otherwise silently override that when both classes combine. */
.switch { position: relative; cursor: pointer; }
.switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch-track {
  position: relative; width: 36px; height: 20px; border-radius: 999px; flex-shrink: 0;
  background: var(--bg-4); border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--text-3); transition: transform 0.15s, background 0.15s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #fff; }
.switch input:disabled + .switch-track { opacity: 0.5; cursor: not-allowed; }
.switch input:disabled { cursor: not-allowed; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Theme picker */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
@media (max-width: 500px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  background: none; border: none; cursor: pointer; padding: 0;
}
.theme-preview {
  width: 100%; aspect-ratio: 4/3;
  border-radius: 8px; border: 2px solid var(--border-2);
  overflow: hidden; position: relative;
  transition: border-color 0.15s, transform 0.1s;
}
.theme-swatch:hover .theme-preview { border-color: var(--accent-2); transform: translateY(-2px); }
.theme-swatch.active .theme-preview { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.theme-preview-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 35%;
}
.theme-preview-accent {
  position: absolute; bottom: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
}
.theme-preview-lines {
  position: absolute; top: 45%; left: 10px; right: 30px;
  display: flex; flex-direction: column; gap: 4px;
}
.theme-preview-lines span {
  display: block; height: 4px; border-radius: 2px;
  background: currentColor; opacity: 0.25;
}
.theme-preview-lines span:nth-child(2) { width: 70%; }
.theme-preview-lines span:nth-child(3) { width: 50%; }
.theme-swatch-name {
  font-size: 0.72rem; font-weight: 500; color: var(--text-2);
  transition: color 0.15s;
}
.theme-swatch.active .theme-swatch-name { color: var(--accent-2); font-weight: 600; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 420px; width: 90%;
}


/* ══════════════════════════════════════════════════════════════════════════════
   LANDING — WORKS WITH
══════════════════════════════════════════════════════════════════════════════ */
.works-with-section {
  text-align: center;
  padding: 2.5rem 1.5rem 0;
}
.works-with-label {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 1.1rem;
}
.works-with-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; flex-wrap: wrap;
}
.works-with-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.84rem; font-weight: 500; color: var(--text-2);
}
.works-with-divider {
  width: 1px; height: 20px; background: var(--border-2);
}


/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE  (≤ 768px)
══════════════════════════════════════════════════════════════════════════════ */

/* ── Medium screens: iPad landscape + small laptops (769px–1024px) ────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Sidebar collapses to icon-only */
  :root { --sidebar-w: 60px; }
  .sidebar { padding: 1rem 0; align-items: center; overflow: hidden; }
  .sidebar-logo { justify-content: center; padding: 0.25rem; font-size: 0; margin-bottom: 1.25rem; }
  .sidebar-logo .rt-wordmark { display: none; }
  .rt-icon-img { width: 26px; height: 26px; }
  .sidebar-nav { align-items: center; width: 100%; }
  .nav-item { justify-content: center; padding: 0.55rem; gap: 0; font-size: 0; width: 100%; }
  .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
  .sidebar-divider { width: calc(100% - 1rem); }
  .sidebar-user { justify-content: center; padding: 0.4rem 0; }
  .sidebar-user .user-info { display: none; }
  .upgrade-cta-sidebar { justify-content: center; gap: 0; font-size: 0; padding: 0.55rem; width: 100%; }
  .upgrade-cta-sidebar svg { flex-shrink: 0; }

  /* Tighten inbox column so copilot gets more room */
  .inbox-col { width: 260px; }

  /* App header can breathe */
  .app-header { padding: 0 1.25rem; }
}

/* Hamburger button — hidden on desktop */
.mobile-menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: 1px solid var(--border-2);
  border-radius: 7px; cursor: pointer; color: var(--text-2);
  flex-shrink: 0; margin-right: 0.5rem;
}
.mobile-menu-btn:hover { background: var(--bg-4); color: var(--text); }

/* Overlay behind open sidebar */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.55);
}
.sidebar-overlay.visible { display: block; }

@media (max-width: 768px) {

  /* Show hamburger */
  .mobile-menu-btn { display: flex; }

  /* Sidebar becomes a fixed drawer */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }

  /* Main fills full width */
  .app-layout { flex-direction: column; }
  .app-main   { width: 100%; }

  /* Header: tighten up */
  .app-header { padding: 0 1rem; gap: 0.5rem; }
  .app-header h1 { font-size: 0.95rem; }
  .app-header-right { gap: 0.4rem; }
  /* Hide status badge chips on small screens — too cramped */
  .app-header-right .badge { display: none; }

  /* Status strip scrolls horizontally */
  .status-strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; }

  /* Copilot layout: one panel at a time on mobile */
  .copilot-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .inbox-col {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 110px);
    flex-shrink: 0;
    overflow-y: auto;
  }
  .copilot-col {
    display: none;
    overflow-y: auto;
    padding-bottom: 1rem;
  }

  /* Reply textarea shorter on mobile */
  .reply-textarea { height: 100px; }

  /* Bottom nav on mobile */
  .mobile-bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    background: var(--bg-2); border-top: 1px solid var(--border);
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; font-size: 0.6rem; color: var(--text-3);
    padding: 0.2rem 0; transition: color 0.15s;
  }
  .mobile-bottom-nav a.active, .mobile-bottom-nav a:hover { color: var(--accent); }
  .mobile-bottom-nav svg { width: 20px; height: 20px; }
  /* Push content above bottom nav */
  .app-main { padding-bottom: 64px; }

  /* Card field row stacks */
  .card-field-row { flex-direction: column; }

  /* Tasks table: horizontal scroll */
  .tasks-table-wrap { overflow-x: auto; }

  /* Integrations grid: single column */
  .integrations-grid { grid-template-columns: 1fr !important; }

  /* Full-width on mobile */
  .app-content { padding: 1rem; }

  /* Auth cards fill screen better */
  .auth-card { padding: 1.5rem 1.25rem; margin: 1rem; }

  /* Inbox header: tabs take full width, actions row below */
  .inbox-col-header { padding: 0.4rem 0.5rem; }
  .inbox-tabs { width: 100%; flex: unset; }
  .inbox-header-actions { width: 100%; justify-content: flex-end; }
  #markAllReadBtn { display: none; }

  /* Landing nav: hide text links, keep CTA */
  .land-nav-links .btn-ghost { display: none; }
  .land-nav { padding: 0 1rem; }
  .land-hero h1 { font-size: 2rem; }
  .land-hero p  { font-size: 0.95rem; }
  .land-hero-ctas { flex-direction: column; align-items: center; }
  .land-hero-ctas .btn { width: 100%; justify-content: center; max-width: 320px; }
  .works-with-row { gap: 1rem; }
  .works-with-divider { display: none; }
  .preview-section { display: none; } /* hide fake browser chrome on tiny screens */
  .stats-bar { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .land-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 1.5rem; }

  /* ── Follow-ups page ── */
  .fu-stats-bar { grid-template-columns: 1fr 1fr !important; gap: 0.6rem !important; }
  .fu-tabs-row  { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .fu-tab { padding: 0.5rem 0.85rem; font-size: 0.8rem; }
  .sent-row { flex-wrap: wrap; gap: 0.4rem; }
  .sent-row .sr-meta { width: 100%; }

  /* ── Calendar ── */
  .cal-month-table th { font-size: 0.62rem; padding: 0.2rem 0; }
  .cal-day { min-height: 56px; padding: 2px 3px; }
  .cal-day-num { font-size: 0.72rem; width: 18px; height: 18px; }
  .cal-event { font-size: 0.65rem; padding: 1px 3px; }
  /* Week view: horizontal scroll on mobile */
  .cal-week-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-week-header, .cal-allday-row, .cal-body-row { min-width: 540px; }

  /* ── Analytics chart ── */
  #chartArea { height: 80px !important; }

  /* ── Integration card rows: wrap buttons below text on small screens ── */
  .int-card-row .btn { flex: 1 1 auto; text-align: center; justify-content: center; min-width: 0; }

  /* ── Tasks page filter bar: the vertical divider between the two tab groups
     only makes sense inline on one row — once the row wraps it becomes an
     orphaned floating dash on its own line, so hide it below this width. ── */
  .filter-bar-divider { display: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  .land-hero h1 { font-size: 1.75rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .land-footer-grid { grid-template-columns: 1fr !important; }
}

/* ── Loading skeletons ────────────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.email-skeleton {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.skeleton-line {
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4,var(--bg-2)) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

/* ── Undo toast ───────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-2,#1e1e2a);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.83rem;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  pointer-events: auto;
  animation: toast-in .2s ease;
  white-space: nowrap;
}
.toast-msg { color: var(--text-2); }
.toast-undo {
  background: none;
  border: none;
  color: var(--accent-2,#a78bfa);
  font-weight: 700;
  font-size: 0.83rem;
  cursor: pointer;
  padding: 0;
}
.toast-undo:hover { text-decoration: underline; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Inbox stats bar ─────────────────────────────────────────────────────── */
.inbox-stats-bar {
  font-size: 0.73rem;
  color: var(--text-3);
  padding: 0.3rem 0.85rem;
  border-bottom: 1px solid var(--border);
  min-height: 24px;
}

/* ── Load more button ────────────────────────────────────────────────────── */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 0.65rem;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.load-more-btn:hover { background: var(--bg-3); }

/* ── Thread badge ────────────────────────────────────────────────────────── */
.thread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent-2);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 4px;
  margin-left: 5px;
  vertical-align: middle;
}

/* ── Snooze dropdown ─────────────────────────────────────────────────────── */
.snooze-dropdown {
  position: absolute;
  z-index: 9000;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  overflow: hidden;
  min-width: 150px;
}
.snooze-opt {
  display: block;
  width: 100%;
  padding: 0.5rem 0.9rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.83rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.snooze-opt:last-child { border-bottom: none; }
.snooze-opt:hover { background: var(--bg-3); }

/* ── Quick reply presets ─────────────────────────────────────────────────── */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.preset-chip {
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.preset-chip:hover { background: var(--accent-dim); color: var(--accent-2); border-color: var(--accent-2); }

.tone-chip {
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-3);
  font-size: 0.74rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tone-chip:hover { background: var(--accent-dim); color: var(--accent-2); border-color: var(--accent-2); }
.tone-chip:disabled { opacity: 0.5; cursor: default; }

/* ── Pro badge pill ──────────────────────────────────────────────────────── */
.pro-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 20px;
  background: var(--brand-gradient);
  color: #fff;
  vertical-align: middle;
  line-height: 1;
  margin-left: 0.3rem;
  pointer-events: none;
  flex-shrink: 0;
}

/* Show Pro pill on gated elements when user is on free plan */
body[data-plan="free"] .pro-gate::after {
  content: "Pro";
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.38rem;
  border-radius: 20px;
  background: var(--brand-gradient);
  color: #fff;
  line-height: 1;
  margin-left: 0.35rem;
  vertical-align: middle;
  pointer-events: none;
}

/* Show Ultra pill on gated elements unless the user is already on Ultra */
body:not([data-plan="ultra"]) .ultra-gate::after {
  content: "Ultra";
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.38rem;
  border-radius: 20px;
  background: var(--brand-gradient);
  color: #fff;
  line-height: 1;
  margin-left: 0.35rem;
  vertical-align: middle;
  pointer-events: none;
}

/* ── Keyboard shortcuts overlay ──────────────────────────────────────────── */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.shortcuts-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  min-width: 280px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.shortcuts-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1rem;
  font-size: 0.83rem;
  color: var(--text-2);
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0.15rem 0.45rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--text);
}

/* ── Onboarding card ─────────────────────────────────────────────────────── */
.onboarding-card {
  background: linear-gradient(135deg, var(--bg-2), rgba(124,92,248,.06));
  border: 1px solid rgba(124,92,248,.3);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}
.onboarding-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.onboarding-steps { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  background: var(--bg-3);
  font-size: 0.83rem;
  color: var(--text-2);
  text-decoration: none;
  transition: background .15s;
}
.onboarding-step:hover { background: var(--bg-4); color: var(--text); }
.onboarding-step-dim { opacity: 0.55; }
.onboarding-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.onboarding-dismiss { background: none; border: none; color: var(--text-3); font-size: 0.78rem; cursor: pointer; }
.onboarding-dismiss:hover { color: var(--text-2); }

/* ── Onboarding checklist check circles ─────────────────────────────────── */
.ob-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .2s, border-color .2s;
}
.ob-check-done { background: var(--success); border-color: var(--success); color: #fff; }
.ob-step-done { opacity: 0.55; cursor: default; pointer-events: none; }

/* ── Retry link button ───────────────────────────────────────────────────── */
.btn-link { background: none; border: none; color: var(--accent-2); font-weight: 600; cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline; }

/* ── Task delete confirmation ────────────────────────────────────────────── */
.task-delete-confirm {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  margin-top: 0.6rem;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 7px;
  font-size: 0.82rem;
  color: var(--text-2);
  animation: toast-in .15s ease;
}

/* ── Calendar ────────────────────────────────────────────────────────────── */
.cal-tab.active { background: var(--accent-dim); color: var(--accent-2); font-weight: 600; }
.cal-view-btn.active { background: var(--accent-dim); color: var(--accent-2); font-weight: 600; }

/* Month table */
.cal-month-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-month-table th { font-size: 0.72rem; font-weight: 600; color: var(--text-3); text-align: center; padding: 0.35rem 0; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .04em; }
.cal-day { vertical-align: top; border: 1px solid var(--border); padding: 4px 5px; min-height: 90px; }
.cal-day-off { opacity: 0.38; }
.cal-day-today .cal-day-num { background: var(--accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.cal-day-num { font-size: 0.78rem; font-weight: 600; color: var(--text-2); margin-bottom: 3px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.cal-event { font-size: 0.72rem; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .1s; }
.cal-event:hover { opacity: 0.8; }
.cal-ev-time { font-size: 0.65rem; margin-right: 3px; opacity: 0.8; }
.cal-ev-title { font-weight: 500; }
.cal-more { font-size: 0.68rem; color: var(--text-3); padding: 0 3px; cursor: default; }

/* Week view */
.cal-week-wrap { display: flex; flex-direction: column; min-height: 100%; }
.cal-week-header { display: flex; border-bottom: 1px solid var(--border); }
.cal-week-day-head { flex: 1; text-align: center; padding: 0.5rem 0.25rem; border-left: 1px solid var(--border); }
.cal-week-day-head.cal-day-today .cal-day-num, .cal-week-day-head.cal-day-today > div:last-child { color: var(--accent); }
.cal-gutter { width: 52px; flex-shrink: 0; }
.cal-allday-row { display: flex; border-bottom: 1px solid var(--border); min-height: 30px; }
.cal-allday-cell { flex: 1; border-left: 1px solid var(--border); padding: 2px 3px; display: flex; flex-direction: column; gap: 2px; }
.cal-week-event { font-size: 0.71rem; border-radius: 3px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-time-grid { display: flex; flex: 1; overflow-y: auto; }
.cal-gutter-col { width: 52px; flex-shrink: 0; }
.cal-hour-label { font-size: 0.65rem; color: var(--text-3); text-align: right; padding-right: 8px; box-sizing: border-box; display: flex; align-items: flex-start; padding-top: 2px; }
.cal-day-col { flex: 1; position: relative; border-left: 1px solid var(--border); box-sizing: border-box; }
.cal-hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); pointer-events: none; }
.cal-week-ev-block { position: absolute; left: 2px; right: 2px; border-radius: 4px; padding: 2px 5px; font-size: 0.72rem; overflow: hidden; cursor: pointer; box-sizing: border-box; }
.cal-week-ev-block:hover { opacity: 0.85; }
