:root {
  --cw-blue: #2457c6;
  --cw-blue-dark: #1c47a6;
  --cw-yellow: #ffc73b;
  --cw-bg: #f7f8fb;
  --cw-card-bg: #ffffff;
  --cw-text: #1a1d29;
  --cw-text-muted: #6b7280;
  --cw-border: #e5e7eb;
  --cw-green: #1a9e5c;
}

* { box-sizing: border-box; }

body.cw-today {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cw-bg);
  color: var(--cw-text);
}

.cw-today-header { background: var(--cw-blue); color: #fff; }
.cw-today-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.cw-today-logo {
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.cw-today-logo svg {
  height: 34px;
  width: auto;
  display: block;
}
.cw-today-nav { display: flex; align-items: center; gap: 18px; font-size: 0.95rem; }
.cw-today-nav a { color: #dfe8ff; text-decoration: none; }
.cw-today-nav a:hover { color: #fff; text-decoration: underline; }
.cw-today-nav-current { color: var(--cw-yellow); font-weight: 700; }
.cw-today-cta-button {
  background: var(--cw-yellow);
  color: #1a1d29 !important;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none !important;
  white-space: nowrap;
}
.cw-today-cta-button:hover { filter: brightness(0.96); }

.cw-today-main { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }

.cw-today-hero { text-align: center; padding: 44px 0 28px; }
.cw-today-hero h1 { font-size: 2rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.cw-today-hero-sub { color: var(--cw-text-muted); max-width: 560px; margin: 0 auto; line-height: 1.5; }

.cw-today-controls { display: flex; justify-content: center; margin: 8px 0 28px; }
.cw-today-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cw-today-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--cw-border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--cw-text);
  white-space: nowrap;
}
.cw-today-chip[aria-selected="true"] {
  background: var(--cw-blue);
  border-color: var(--cw-blue);
  color: #fff;
}
.cw-today-chip-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.cw-today-chip-icon svg { width: 100%; height: 100%; display: block; }

.cw-today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.cw-today-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cw-today-card {
  background: var(--cw-card-bg);
  border: 1px solid var(--cw-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cw-today-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 30, 60, 0.08);
}

.cw-today-card-cover {
  height: 110px;
  position: relative;
  background: var(--cw-blue);
  overflow: hidden;
}
.cw-today-card-cover-icon {
  position: absolute;
  right: -10px;
  bottom: -14px;
  width: 84px;
  height: 84px;
  opacity: 0.9;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}
.cw-today-card-date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  text-align: center;
  min-width: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.cw-today-card-date-month {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--cw-red, #d93636);
  letter-spacing: 0.04em;
}
.cw-today-card-date-day {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--cw-text);
}

.cw-today-card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cw-today-card-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cw-blue);
  font-weight: 700;
}
.cw-today-card-title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.cw-today-card-meta { margin: 0; color: var(--cw-text-muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 2px; }
.cw-today-card-footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--cw-text-muted);
  border-top: 1px solid var(--cw-border);
}
.cw-today-card-host {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cw-today-card-host-logo,
.cw-today-card-host-avatar-fallback {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.cw-today-card-host-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-today-loading, .cw-today-empty { text-align: center; color: var(--cw-text-muted); padding: 60px 20px; }
.cw-today-empty-icon { margin-bottom: 12px; color: var(--cw-text-muted); }
.cw-today-empty-icon svg { width: 40px; height: 40px; }
.cw-today-empty-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; color: var(--cw-text); }
.cw-today-empty-sub { max-width: 420px; margin: 0 auto; line-height: 1.5; }

.cw-today-footer {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 24px 20px 40px;
  text-align: center;
  color: var(--cw-text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}
.cw-today-footer a { color: var(--cw-blue); text-decoration: none; }

/* ---------- create.html form ---------- */

.cw-today-form-section { max-width: 640px; margin: 0 auto 60px; }

.cw-today-form {
  background: var(--cw-card-bg);
  border: 1px solid var(--cw-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cw-today-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.cw-today-form-group { display: flex; flex-direction: column; gap: 6px; }

.cw-today-form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cw-text);
}

.cw-today-required { color: var(--cw-red, #d93636); }

.cw-today-form-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--cw-text-muted);
}

.cw-today-form-group input[type="text"],
.cw-today-form-group input[type="email"],
.cw-today-form-group input[type="url"],
.cw-today-form-group input[type="date"],
.cw-today-form-group input[type="time"],
.cw-today-form-group textarea,
.cw-today-form-group select {
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--cw-border);
  background: var(--cw-bg);
  color: var(--cw-text);
  width: 100%;
}

.cw-today-form-group input:focus,
.cw-today-form-group textarea:focus,
.cw-today-form-group select:focus {
  outline: none;
  border-color: var(--cw-blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 198, 0.15);
}

.cw-today-form-group input[type="color"] {
  padding: 4px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--cw-border);
  background: var(--cw-bg);
  cursor: pointer;
}

.cw-today-form-group textarea { resize: vertical; min-height: 100px; }

/* honeypot: kept in the tab/layout flow but visually off-screen, so basic
   bots that only check for display:none / visibility:hidden still fill it */
.cw-today-honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cw-today-submit-button {
  align-self: flex-start;
  background: var(--cw-blue);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
}
.cw-today-submit-button:hover { background: var(--cw-blue-dark); }
.cw-today-submit-button:disabled { opacity: 0.6; cursor: default; }

#formMessage { margin-top: 16px; }
.cw-today-form-message-success,
.cw-today-form-message-error {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.cw-today-form-message-success {
  background: rgba(26, 158, 92, 0.1);
  color: var(--cw-green);
  border: 1px solid rgba(26, 158, 92, 0.3);
}
.cw-today-form-message-success a { color: var(--cw-green); font-weight: 700; }
.cw-today-form-message-error {
  background: rgba(217, 54, 54, 0.1);
  color: var(--cw-red, #d93636);
  border: 1px solid rgba(217, 54, 54, 0.3);
}

/* ---------- server-rendered /e/:slug detail page + its RSVP form ---------- */
.cw-today-detail { max-width: 720px; margin: 0 auto; padding: 0 20px 60px; }
.cw-today-detail-cover {
  height: 220px;
  border-radius: 16px;
  background: var(--cw-blue);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.cw-today-detail-cover-icon {
  position: absolute;
  right: -16px;
  bottom: -24px;
  width: 160px;
  height: 160px;
  opacity: 0.9;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}
.cw-today-detail-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cw-blue);
  font-weight: 700;
}
.cw-today-detail-title { font-size: 1.8rem; margin: 6px 0 16px; letter-spacing: -0.02em; }
.cw-today-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--cw-border);
  border-bottom: 1px solid var(--cw-border);
  margin-bottom: 20px;
  color: var(--cw-text-muted);
}
.cw-today-detail-description { line-height: 1.6; margin-bottom: 28px; }
.cw-today-detail-host { display: flex; align-items: center; gap: 8px; }
.cw-today-detail-host-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.cw-today-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cw-today-card-host-avatar-fallback { font-size: 0.6rem; }
.cw-today-detail-host-logo.cw-today-avatar-fallback { font-size: 0.75rem; }
.cw-today-rsvp-cancelled { text-align: center; padding: 60px 0; }
.cw-today-rsvp-cancelled-icon { font-size: 2rem; color: var(--cw-green, #1a9e5c); margin-bottom: 10px; }
.cw-today-rsvp-cancelled-title { font-size: 1.4rem; margin: 0 0 8px; }
.cw-today-rsvp-cancelled-sub { color: var(--cw-text-muted, #6b7280); max-width: 480px; margin: 0 auto; }
.cw-today-rsvp-cancelled-link { display: block; margin-top: 14px; font-weight: 600; }

.cw-today-rsvp-form {
  background: var(--cw-card-bg);
  border: 1px solid var(--cw-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cw-today-rsvp-form h2 { margin: 0; font-size: 1.15rem; }
.cw-today-rsvp-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cw-today-rsvp-form-row input {
  flex: 1;
  min-width: 160px;
  font: inherit;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--cw-border);
  background: var(--cw-bg);
  color: var(--cw-text);
}
.cw-today-rsvp-button {
  background: var(--cw-yellow);
  color: #1a1d29;
  border: none;
  font: inherit;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  align-self: flex-start;
}
.cw-today-rsvp-success { color: var(--cw-green); font-size: 0.9rem; }
.cw-today-rsvp-error { color: var(--cw-red, #d93636); font-size: 0.9rem; }
.cw-today-ics-link { color: var(--cw-blue); font-weight: 700; text-decoration: none; }

/* ---------- Luma-style event detail page ---------- */
.cw-today-ev { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.cw-today-ev-back {
  display: inline-block;
  color: var(--cw-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 22px;
}
.cw-today-ev-back:hover { color: var(--cw-blue); }
.cw-today-ev-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 44px;
  align-items: start;
}
.cw-today-ev-left {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cw-today-ev-cover {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.cw-today-ev-cover-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46%;
  height: 46%;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}
.cw-today-ev-sectionlabel {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cw-text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cw-border);
  margin: 0 0 12px;
}
.cw-today-ev-host { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cw-today-ev-host img,
.cw-today-ev-host .cw-today-avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  font-size: 0.7rem;
}
.cw-today-ev-attendees { color: var(--cw-text-muted); font-size: 0.88rem; margin: 10px 0 0; }
.cw-today-ev-tag {
  display: inline-block;
  align-self: flex-start;
  border: 1px solid var(--cw-border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.8rem;
  color: var(--cw-text-muted);
}
.cw-today-ev-title {
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
}
.cw-today-ev-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cw-today-ev-tile {
  width: 50px;
  height: 50px;
  border: 1px solid var(--cw-border);
  border-radius: 12px;
  background: var(--cw-card-bg);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--cw-text-muted);
}
.cw-today-ev-tile-month {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cw-red, #d93636);
  text-transform: uppercase;
  background: var(--cw-bg);
  width: 100%;
  text-align: center;
  padding: 3px 0 2px;
  border-bottom: 1px solid var(--cw-border);
}
.cw-today-ev-tile-day { font-size: 1.25rem; font-weight: 800; flex: 1; display: flex; align-items: center; color: var(--cw-text); }
.cw-today-ev-tile svg { width: 22px; height: 22px; }
.cw-today-ev-row-main { font-weight: 700; }
.cw-today-ev-row-sub { color: var(--cw-text-muted); font-size: 0.9rem; }
.cw-today-ev-reg {
  border: 1px solid var(--cw-border);
  border-radius: 16px;
  background: var(--cw-card-bg);
  overflow: hidden;
  margin: 30px 0 34px;
}
.cw-today-ev-reg-head {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cw-text-muted);
  background: rgba(36, 87, 198, 0.05);
  border-bottom: 1px solid var(--cw-border);
}
.cw-today-ev-reg-body { padding: 18px; }
.cw-today-ev-reg-welcome { margin: 0 0 14px; font-size: 0.95rem; }
.cw-today-ev-reg-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cw-today-ev-reg-row input {
  flex: 1;
  min-width: 150px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--cw-border);
  border-radius: 10px;
  background: var(--cw-bg);
  color: var(--cw-text);
}
.cw-today-ev-reg-btn {
  width: 100%;
  font: inherit;
  font-weight: 700;
  background: var(--cw-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
}
.cw-today-ev-reg-btn:hover { background: var(--cw-blue-dark); }
.cw-today-ev-about { line-height: 1.65; margin: 0 0 4px; white-space: pre-line; }
.cw-today-ev-actions { display: flex; gap: 20px; margin-top: 16px; }
.cw-today-rsvp-message { margin: 12px 0 0; font-size: 0.9rem; }
.cw-today-rsvp-message-success { color: var(--cw-green); font-weight: 600; }
.cw-today-rsvp-message-error { color: var(--cw-red, #d93636); font-weight: 600; }

@media (max-width: 860px) {
  .cw-today-ev-grid { grid-template-columns: 1fr; gap: 28px; }
  .cw-today-ev-left { position: static; }
  .cw-today-ev-title { font-size: 1.8rem; }
}

/* ---------- password-protected /admin ---------- */
.cw-today-admin { max-width: 1000px; }
.cw-today-admin h1 { font-size: 1.4rem; margin: 24px 0 16px; }
.cw-today-admin-muted { color: var(--cw-text-muted); font-size: 0.85rem; }
.cw-today-admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cw-card-bg);
  border: 1px solid var(--cw-border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.9rem;
}
.cw-today-admin-table th,
.cw-today-admin-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cw-border);
  vertical-align: middle;
}
.cw-today-admin-table th { color: var(--cw-text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.cw-today-admin-table tr:last-child td { border-bottom: none; }
.cw-today-admin-actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.cw-today-admin-actions form { margin: 0; }
.cw-today-admin-edit { color: var(--cw-blue); text-decoration: none; font-weight: 600; }
.cw-today-admin-delete {
  background: none;
  border: 1px solid var(--cw-red, #d93636);
  color: var(--cw-red, #d93636);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}
.cw-today-admin-delete:hover { background: var(--cw-red, #d93636); color: #fff; }

@media (prefers-color-scheme: dark) {
  :root {
    --cw-bg: #12141c;
    --cw-card-bg: #1b1e29;
    --cw-text: #eef0f6;
    --cw-text-muted: #9aa1b2;
    --cw-border: #2a2e3c;
  }
  .cw-today-chip { background: var(--cw-card-bg); color: var(--cw-text); }
  .cw-today-card-date { background: #262b3a; }
  .cw-today-card-date-day { color: var(--cw-text); }

  .cw-today-cta-button { color: #1a1d29 !important; }

  .cw-today-form-group input[type="text"],
  .cw-today-form-group input[type="email"],
  .cw-today-form-group input[type="url"],
  .cw-today-form-group input[type="date"],
  .cw-today-form-group input[type="time"],
  .cw-today-form-group textarea,
  .cw-today-form-group select,
  .cw-today-form-group input[type="color"],
  .cw-today-rsvp-form-row input {
    background: #12141c;
    border-color: var(--cw-border);
    color: var(--cw-text);
  }

  .cw-today-form-message-success {
    background: rgba(26, 158, 92, 0.15);
    border-color: rgba(26, 158, 92, 0.4);
  }
  .cw-today-form-message-error {
    background: rgba(217, 54, 54, 0.15);
    border-color: rgba(217, 54, 54, 0.4);
  }

  .cw-today-rsvp-button { color: #1a1d29; }

  .cw-today-ev-reg-head { background: rgba(255, 255, 255, 0.04); }
  .cw-today-ev-reg-row input { background: #12141c; }
}

/* ---------- /agent chat teaser bar on the list page ---------- */
.cw-today-agentbar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 32px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--cw-border);
  background: var(--cw-card-bg);
  color: var(--cw-text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cw-today-agentbar:hover { border-color: var(--cw-blue); box-shadow: 0 4px 16px rgba(36, 87, 198, 0.12); }
.cw-today-agentbar svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--cw-blue); }

/* ---------- /agent page ---------- */
.cw-today-agent-panel { max-width: 720px; margin: 0 auto; padding-bottom: 60px; }

.cw-today-agent-inputrow {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cw-card-bg);
  border: 1px solid var(--cw-border);
  border-radius: 20px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 4px 20px rgba(20, 30, 60, 0.06);
  margin-bottom: 24px;
}
.cw-today-agent-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--cw-text);
  padding: 10px 0;
}
.cw-today-agent-input::placeholder { color: var(--cw-text-muted); }
.cw-today-agent-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--cw-yellow);
  color: #1a1d29;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cw-today-agent-send svg { width: 20px; height: 20px; }
.cw-today-agent-send:hover { background: #ffd35e; }
.cw-today-agent-send:disabled { opacity: 0.5; cursor: default; }

/* Voice input — progressive enhancement, only unhidden by JS when the
   browser actually supports SpeechRecognition (see agent-chat.js). */
.cw-today-agent-mic {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cw-border);
  border-radius: 50%;
  background: transparent;
  color: var(--cw-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cw-today-agent-mic svg { width: 18px; height: 18px; }
.cw-today-agent-mic:hover { color: var(--cw-blue); border-color: var(--cw-blue); }
.cw-today-agent-mic--listening {
  color: #ffffff;
  border-color: #d93636;
  background: #d93636;
  animation: cwMicPulse 1.4s ease-in-out infinite;
}
.cw-today-agent-mic--listening:hover { color: #ffffff; border-color: #d93636; }
@keyframes cwMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 54, 54, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(217, 54, 54, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .cw-today-agent-mic--listening { animation: none; }
}

.cw-today-agent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.cw-today-agent-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}
.cw-today-agent-card--blue   { background: rgba(36, 87, 198, 0.07); border-color: rgba(36, 87, 198, 0.16); }
.cw-today-agent-card--green  { background: rgba(89, 183, 139, 0.10); border-color: rgba(89, 183, 139, 0.22); }
.cw-today-agent-card--yellow { background: rgba(255, 199, 59, 0.14); border-color: rgba(255, 199, 59, 0.28); }
.cw-today-agent-card--purple { background: rgba(138, 99, 242, 0.09); border-color: rgba(138, 99, 242, 0.20); }
.cw-today-agent-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cw-today-agent-card-icon svg { width: 24px; height: 24px; }
.cw-today-agent-card--blue .cw-today-agent-card-icon   { background: rgba(36, 87, 198, 0.16); color: var(--cw-blue); }
.cw-today-agent-card--green .cw-today-agent-card-icon  { background: rgba(89, 183, 139, 0.22); color: #3f9d72; }
.cw-today-agent-card--yellow .cw-today-agent-card-icon { background: rgba(255, 199, 59, 0.32); color: #a3730a; }
.cw-today-agent-card--purple .cw-today-agent-card-icon { background: rgba(138, 99, 242, 0.20); color: #8a63f2; }
.cw-today-agent-card-label { flex: 1; font-weight: 700; color: var(--cw-text); }
.cw-today-agent-card-chevron { flex-shrink: 0; color: var(--cw-text-muted); }
.cw-today-agent-card-chevron svg { width: 18px; height: 18px; }

.cw-today-agent-log { display: flex; flex-direction: column; gap: 14px; }
.cw-today-agent-bubble {
  max-width: 86%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
}
.cw-today-agent-bubble p { margin: 0; white-space: pre-line; }
.cw-today-agent-bubble--user {
  align-self: flex-end;
  background: var(--cw-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.cw-today-agent-bubble--agent {
  align-self: flex-start;
  background: var(--cw-card-bg);
  border: 1px solid var(--cw-border);
  border-bottom-left-radius: 4px;
}

.cw-today-agent-events { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cw-today-agent-event {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cw-border);
  background: var(--cw-bg);
  text-decoration: none;
  color: inherit;
}
.cw-today-agent-event:hover { border-color: var(--cw-blue); }
.cw-today-agent-event-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.cw-today-agent-event-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cw-today-agent-event-title { font-weight: 700; color: var(--cw-text); }
.cw-today-agent-event-meta { font-size: 0.82rem; color: var(--cw-text-muted); }

.cw-today-agent-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cw-today-agent-chip { background: var(--cw-bg); }

.cw-today-agent-emailform { display: flex; gap: 8px; margin-top: 12px; }
.cw-today-agent-emailinput {
  flex: 1;
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--cw-border);
  border-radius: 10px;
  background: var(--cw-bg);
  color: var(--cw-text);
}
.cw-today-agent-emailbtn {
  font: inherit;
  font-weight: 700;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  background: var(--cw-blue);
  color: #fff;
  cursor: pointer;
}
.cw-today-agent-emailbtn:hover { background: var(--cw-blue-dark); }

@media (max-width: 640px) {
  .cw-today-agent-grid { grid-template-columns: 1fr; }
  .cw-today-agent-bubble { max-width: 94%; }
}

@media (prefers-color-scheme: dark) {
  .cw-today-agentbar { background: var(--cw-card-bg); }
  .cw-today-agent-inputrow { background: var(--cw-card-bg); }
  .cw-today-agent-event { background: #12141c; }
  .cw-today-agent-emailinput { background: #12141c; }
  .cw-today-agent-send { color: #1a1d29; }
}
