/* ==========================================================================
   AI Email Generator — style.css
   Modern glassmorphism UI with a vivid multi-color palette (light/dark).
   ========================================================================== */

/* ----------------------------- Theme tokens ----------------------------- */
:root {
  --bg: #eef1f8;
  --bg-2: #e6e9f5;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-solid: #ffffff;
  --text: #1b2030;
  --text-soft: #5a6079;
  --border: rgba(120, 130, 170, 0.22);

  /* Core brand hues — green / blue / yellow trio */
  --primary: #2f8fef;   /* blue */
  --primary-2: #37b24d; /* green */
  --accent: #ffd43b;    /* yellow */

  /* Extra palette — used across icons, chips, stats, toasts */
  --pink: #14b8a6;   /* teal-green (stands in for the old pink accent) */
  --orange: #eab308; /* gold (stands in for the old orange accent) */
  --yellow: #ffd43b;
  --blue: #4dabf7;
  --green: #40c057;
  --red: #ff5d73; /* kept for errors/danger only */

  /* Multi-stop hero/brand gradient — blue → green → yellow */
  --grad: linear-gradient(120deg, #2f8fef 0%, #14b8a6 30%, #40c057 60%, #ffd43b 100%);
  --grad-soft: linear-gradient(135deg, rgba(47,143,239,.16), rgba(64,192,87,.12), rgba(255,212,59,.12));

  /* Secondary gradients for variety on cards/badges */
  --grad-2: linear-gradient(135deg, #40c057 0%, #ffd43b 100%);
  --grad-3: linear-gradient(135deg, #2f8fef 0%, #14b8a6 100%);
  --grad-4: linear-gradient(135deg, #ffd43b 0%, #2f8fef 100%);
  --grad-5: linear-gradient(135deg, #40c057 0%, #2f8fef 100%);

  --shadow: 0 18px 40px -18px rgba(60, 50, 140, 0.35);
  --shadow-sm: 0 8px 20px -12px rgba(60, 50, 140, 0.3);
  --radius: 18px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --bg: #0d0f1a;
  --bg-2: #121527;
  --surface: rgba(28, 32, 54, 0.6);
  --surface-solid: #1a1e33;
  --text: #eef0fb;
  --text-soft: #9aa0c0;
  --border: rgba(150, 160, 220, 0.18);

  --primary: #5cb3ff;
  --primary-2: #4fe0a0;
  --accent: #ffd35c;

  --pink: #2dd4d9;   /* teal-green stand-in */
  --orange: #f2c94c; /* gold stand-in */
  --yellow: #ffd35c;
  --blue: #6dc0ff;
  --green: #5ce88f;
  --red: #ff7a8d;

  --grad: linear-gradient(120deg, #5cb3ff 0%, #2dd4d9 30%, #5ce88f 60%, #ffd35c 100%);
  --grad-soft: linear-gradient(135deg, rgba(92,179,255,.22), rgba(92,232,143,.14), rgba(255,211,92,.12));

  --grad-2: linear-gradient(135deg, #5ce88f 0%, #ffd35c 100%);
  --grad-3: linear-gradient(135deg, #5cb3ff 0%, #2dd4d9 100%);
  --grad-4: linear-gradient(135deg, #ffd35c 0%, #5cb3ff 100%);
  --grad-5: linear-gradient(135deg, #5ce88f 0%, #5cb3ff 100%);

  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 8px 20px -12px rgba(0, 0, 0, 0.5);
}

/* ----------------------------- Base ----------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(255,212,59,.20), transparent 60%),
    radial-gradient(900px 500px at 50% 0%, rgba(47,143,239,.22), transparent 55%),
    radial-gradient(900px 500px at -10% 15%, rgba(64,192,87,.20), transparent 55%),
    radial-gradient(700px 400px at 10% 90%, rgba(20,184,166,.16), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  min-height: 100vh;
  transition: background .4s ease, color .3s ease;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1140px; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; }

.grad-text {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ----------------------------- Navbar ----------------------------- */
.navbar-glass {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.brand-icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; background: var(--grad); color: #fff; font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--text-soft); font-weight: 500; transition: color .2s; }
.nav-link:hover { color: var(--primary-2); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--text); cursor: pointer;
  transition: transform .3s, background .3s;
}
.theme-toggle:hover { transform: rotate(-15deg) scale(1.05); }

/* ----------------------------- Hero ----------------------------- */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; text-align: center; }
.hero-inner { position: relative; z-index: 2; }
.hero-bg {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(closest-side, rgba(47,143,239,.32), transparent 70%) 15% 0/45% 75% no-repeat,
    radial-gradient(closest-side, rgba(64,192,87,.28), transparent 70%) 55% 10%/40% 70% no-repeat,
    radial-gradient(closest-side, rgba(20,184,166,.3), transparent 70%) 88% 25%/42% 68% no-repeat,
    radial-gradient(closest-side, rgba(255,212,59,.24), transparent 70%) 30% 60%/35% 60% no-repeat;
  filter: blur(10px); animation: float 12s ease-in-out infinite alternate; z-index: 1;
}
@keyframes float { from { transform: translateY(-10px); } to { transform: translateY(20px); } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
  backdrop-filter: blur(8px); margin-bottom: 24px;
}
.pill i { color: var(--pink); }
.hero-title { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 18px; }
.hero-sub { max-width: 620px; margin: 0 auto 30px; color: var(--text-soft); font-size: 1.12rem; line-height: 1.6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-top: 52px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.9rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats span { color: var(--text-soft); font-size: .85rem; }
/* Give each stat its own accent underline for variety */
.hero-stats div:nth-child(1) strong { background: var(--grad-3); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats div:nth-child(2) strong { background: var(--grad-2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats div:nth-child(3) strong { background: var(--grad-4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats div:nth-child(4) strong { background: var(--grad-5); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ----------------------------- Buttons ----------------------------- */
.btn-primary-grad {
  background: var(--grad); background-size: 180% auto; background-position: 0% 50%;
  color: #fff; border: none; font-weight: 600;
  border-radius: var(--radius-sm); padding: 12px 24px; box-shadow: var(--shadow-sm);
  position: relative; transition: transform .15s, box-shadow .25s, filter .2s, background-position .5s ease;
}
.btn-primary-grad:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; background-position: 100% 50%; }
.btn-primary-grad:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 24px; font-weight: 600; backdrop-filter: blur(8px);
  transition: transform .15s, background .2s, border-color .2s;
}
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-solid); color: var(--text); border-color: var(--primary-2); }
.kbd-hint {
  font-size: .68rem; opacity: .8; margin-left: 8px; padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 6px; font-weight: 500;
}

/* ----------------------------- Sections ----------------------------- */
.section { padding: 76px 0; }
.section-alt { position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--text-soft); font-size: 1.05rem; }

/* ----------------------------- Feature cards ----------------------------- */
.feature-card {
  height: 100%; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(14px); box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(106,92,255,.4); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.4rem; color: #fff; background: var(--grad); margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
/* Cycle each card's icon through the extended palette for visual variety */
.feature-card:nth-child(5n+1) .feature-icon { background: var(--grad); }
.feature-card:nth-child(5n+2) .feature-icon { background: var(--grad-2); }
.feature-card:nth-child(5n+3) .feature-icon { background: var(--grad-3); }
.feature-card:nth-child(5n+4) .feature-icon { background: var(--grad-4); }
.feature-card:nth-child(5n+5) .feature-icon { background: var(--grad-5); }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-soft); margin: 0; font-size: .96rem; line-height: 1.6; }

/* ----------------------------- Glass panels / form ----------------------------- */
.glass-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow); padding: 26px;
}
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
.req { color: var(--red); }

.input-icon { position: relative; }
.input-icon > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--primary-2); font-size: .9rem; pointer-events: none;
}
.input-icon .form-control, .input-icon .form-select { padding-left: 38px; }

.form-control, .form-select {
  background: var(--surface-solid); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 11px 14px; transition: border-color .2s, box-shadow .2s;
}
.form-control::placeholder { color: var(--text-soft); opacity: .7; }
.form-control:focus, .form-select:focus {
  background: var(--surface-solid); color: var(--text);
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(106,92,255,.15);
}
.form-control.is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,93,115,.12); }
.field-error { color: var(--red); font-size: .8rem; margin-top: 5px; min-height: 1em; }

/* Length toggle */
.length-toggle { display: flex; gap: 8px; }
.length-btn {
  flex: 1; text-align: center; padding: 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-solid); color: var(--text-soft);
  cursor: pointer; font-weight: 600; transition: all .2s;
}
.btn-check:checked + .length-btn { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
/* Vary each length option's active color */
.length-toggle .btn-check:checked + .length-btn:nth-of-type(1) { background: var(--grad-3); }
.length-toggle .btn-check:checked + .length-btn:nth-of-type(2) { background: var(--grad); }
.length-toggle .btn-check:checked + .length-btn:nth-of-type(3) { background: var(--grad-2); }

.form-actions { margin-top: 8px; }

/* ----------------------------- Email client preview ----------------------------- */
.email-client { padding: 0; overflow: hidden; min-height: 480px; display: flex; flex-direction: column; }

.empty-state, .loading-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 50px 30px; }
.empty-illustration { font-size: 3.6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 18px; opacity: .9; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-soft); max-width: 320px; }

.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--pink);
  animation: spin .8s linear infinite; margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-soft); font-weight: 600; }

/* Result state */
.result-state { display: flex; flex-direction: column; }
.client-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--grad-soft); }
.client-dots { display: flex; gap: 6px; }
.client-dots span { width: 11px; height: 11px; border-radius: 50%; background: rgba(150,150,180,.4); }
.client-dots span:nth-child(1){ background: var(--red); } .client-dots span:nth-child(2){ background: var(--yellow); } .client-dots span:nth-child(3){ background: var(--green); }
.client-badge {
  margin-left: auto; padding: 4px 13px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  background: var(--grad); color: #fff;
}
.fav-btn { background: none; border: none; color: var(--text-soft); font-size: 1.1rem; cursor: pointer; transition: transform .2s, color .2s; }
.fav-btn:hover { transform: scale(1.2); color: var(--orange); }
.fav-btn.active { color: var(--yellow); }

.email-meta { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 1.2rem; }
.email-subject { font-weight: 700; font-size: 1.05rem; }
.email-to { color: var(--text-soft); font-size: .86rem; }

.email-body {
  padding: 24px 26px; font-family: "Lora", Georgia, serif; line-height: 1.75; font-size: 1rem;
  white-space: pre-wrap; flex: 1; color: var(--text); max-height: 360px; overflow-y: auto;
}
.email-body::-webkit-scrollbar { width: 8px; }
.email-body::-webkit-scrollbar-thumb { background: var(--primary-2); border-radius: 8px; }

/* Stats — each metric gets its own hue instead of one uniform color */
.stats-row { display: flex; gap: 8px; padding: 14px 22px 6px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 70px; text-align: center; padding: 10px 6px; border-radius: var(--radius-sm); background: var(--surface-solid); border: 1px solid var(--border); }
.stat-val { display: block; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.stat-label { font-size: .72rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }
.stat:nth-child(1) .stat-val { color: var(--primary); }
.stat:nth-child(2) .stat-val { color: var(--pink); }
.stat:nth-child(3) .stat-val { color: var(--blue); }
.stat:nth-child(4) .stat-val { color: var(--orange); }
.stat:nth-child(5) .stat-val { color: var(--green); }
.score-bar { height: 7px; margin: 4px 22px 0; background: var(--border); border-radius: 999px; overflow: hidden; }
.score-fill { height: 100%; width: 0; background: var(--grad); background-size: 200% auto; border-radius: 999px; transition: width .8s ease; }

/* Suggestions — alternate accent bar color per item */
.suggestions { padding: 16px 22px 0; }
.suggestion-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; margin-bottom: 8px;
  border-radius: var(--radius-sm); background: var(--grad-soft); border: 1px solid var(--border); font-size: .9rem;
  border-left: 3px solid var(--primary);
}
.suggestion-item i { color: var(--primary); margin-top: 3px; }
.suggestion-item:nth-child(2) { border-left-color: var(--pink); }
.suggestion-item:nth-child(2) i { color: var(--pink); }
.suggestion-item:nth-child(3) { border-left-color: var(--blue); }
.suggestion-item:nth-child(3) i { color: var(--blue); }
.suggestion-item:nth-child(4) { border-left-color: var(--orange); }
.suggestion-item:nth-child(4) i { color: var(--orange); }

/* Action bar */
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 22px 22px; }
.act-btn {
  flex: 1; min-width: 92px; padding: 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-solid); color: var(--text);
  font-weight: 600; font-size: .88rem; cursor: pointer; transition: transform .15s, background .2s, color .2s;
}
.act-btn:hover { transform: translateY(-2px); background: var(--grad-soft); }
.act-primary { background: var(--grad); color: #fff; border-color: transparent; }
.act-primary:hover { color: #fff; filter: brightness(1.05); }

/* ----------------------------- Recent emails ----------------------------- */
.recent-controls { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 220px; max-width: 420px; }
.recent-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); font-weight: 600; font-size: .86rem; cursor: pointer; transition: all .2s;
}
.filter-chip.active, .filter-chip:hover { background: var(--grad); color: #fff; border-color: transparent; }
.filter-chip.danger:hover { background: var(--red); }

.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.recent-card {
  padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px); cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative;
  border-top: 3px solid var(--primary);
}
.recent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.recent-card:nth-child(5n+2) { border-top-color: var(--pink); }
.recent-card:nth-child(5n+3) { border-top-color: var(--blue); }
.recent-card:nth-child(5n+4) { border-top-color: var(--orange); }
.recent-card:nth-child(5n+5) { border-top-color: var(--green); }
.recent-card .rc-badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--grad); color: #fff; }
.recent-card .rc-fav { position: absolute; top: 16px; right: 16px; color: var(--yellow); }
.recent-card h4 { font-size: 1rem; margin: 12px 0 6px; padding-right: 24px; }
.recent-card p { color: var(--text-soft); font-size: .85rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-card .rc-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: .76rem; color: var(--text-soft); }

.recent-empty { text-align: center; color: var(--text-soft); padding: 40px; }
.recent-empty i { font-size: 2.6rem; margin-bottom: 12px; opacity: .6; }

/* ----------------------------- Footer ----------------------------- */
.footer { padding: 50px 0 36px; border-top: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(10px); text-align: center; }
.footer-brand { font-weight: 800; font-size: 1.3rem; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer p { color: var(--text-soft); margin: 4px 0; }
.copyright { font-size: .82rem; opacity: .8; }

/* ----------------------------- Toasts ----------------------------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px; padding: 13px 18px; border-radius: var(--radius-sm);
  background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow);
  min-width: 240px; font-weight: 600; animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards;
  border-left: 4px solid var(--primary);
}
.toast i { font-size: 1.1rem; }
.toast.success { border-left-color: var(--green); }
.toast.success i { color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.error i { color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast.info i { color: var(--blue); }
.toast.warning { border-left-color: var(--orange); }
.toast.warning i { color: var(--orange); }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ----------------------------- Reveal animation ----------------------------- */
.feature-card, .glass-panel, .recent-card { animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 991px) {
  .email-client { min-height: auto; }
  .hero { padding: 60px 0 44px; }
}
@media (max-width: 575px) {
  .hero-stats { gap: 26px; }
  .nav-links { gap: 12px; }
  .action-bar .act-btn { min-width: calc(50% - 4px); }
  .glass-panel { padding: 18px; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: auto; }
}

/* ----------------------------- Edit & version toolbar ----------------------------- */
.edit-bar { display: flex; align-items: center; gap: 8px; padding: 4px 22px 0; flex-wrap: wrap; }
.edit-bar .act-btn { flex: 0 0 auto; min-width: 0; padding: 8px 14px; }
.version-label {
  margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--primary-2);
  padding: 5px 12px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border);
}
.act-btn:disabled { opacity: .45; cursor: not-allowed; }
.act-btn:disabled:hover { transform: none; background: var(--surface-solid); }

/* Editable email body */
.email-body.editing {
  outline: 2px dashed var(--primary);
  outline-offset: -6px;
  background: var(--grad-soft);
  cursor: text;
}
.email-body.editing:focus { outline-color: var(--accent); }

@media (max-width: 575px) {
  .edit-bar { padding: 4px 16px 0; }
  .version-label { margin-left: 0; }
}