/* V87: the home surface is a conversation with Zeta, not a feature dashboard. */
.zeta-home-page {
  min-height: 100%;
  padding: 22px 22px calc(190px + env(safe-area-inset-bottom));
  background: var(--canvas, #f4f5f4);
}

.zeta-presence { position: relative; padding: 8px 0 26px; }
.zeta-presence-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted, #626b65);
  font-size: 13px;
  font-weight: 650;
}
.zeta-live-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.zeta-live-state > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--action, #28664e);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--action, #28664e) 12%, transparent);
}
.zeta-live-state.offline > i { background: var(--danger, #b43840); box-shadow: none; }
.zeta-presence-stage {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  margin: 24px 0 18px;
  place-items: center;
  color: var(--action, #28664e);
}
.zeta-presence-stage .z-sign { position: relative; z-index: 1; width: 38px; height: 38px; }
.zeta-presence-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 50%;
  transition: border-radius .35s ease, transform .35s ease, opacity .35s ease;
}
.zeta-presence-orbit::after {
  position: absolute;
  content: "";
  top: -3px;
  left: 28px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 10%, transparent);
}
.zeta-presence-stage[data-state="working"] .zeta-presence-orbit { border-radius: 20px 50% 26px 50%; animation: zeta-orbit 2.2s linear infinite; }
.zeta-presence-stage[data-state="working"] .z-sign { animation: zeta-breathe 1.4s ease-in-out infinite; }
.zeta-presence-stage[data-state="offline"] { color: var(--danger, #b43840); opacity: .68; }
.zeta-presence-stage[data-state="offline"] .zeta-presence-orbit::after { display: none; }
.zeta-presence h1 {
  margin: 0 0 7px;
  max-width: 22ch;
  font-size: 34px;
  line-height: 1.14;
  letter-spacing: 0;
}
.zeta-presence > p {
  margin: 0;
  max-width: 32rem;
  color: var(--muted, #626b65);
  font-size: 16px;
  line-height: 1.55;
}
.home-prompt-hint {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border, #d7ddd8);
  color: var(--text, #202522);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.home-prompt-hint .z-sign { width: 24px; height: 24px; color: var(--action, #28664e); }
.home-prompt-hint .ui-icon { width: 18px; height: 18px; color: var(--muted, #626b65); }
.home-prompt-hint:active { opacity: .65; }

.home-stream { margin-top: 6px; }
.home-moment {
  padding: 22px 0;
  border-bottom: 1px solid var(--border, #d7ddd8);
}
.home-moment > button.home-moment-main {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}
.home-moment-sign { width: 28px; height: 28px; color: var(--action, #28664e); }
.home-moment-copy { display: grid; min-width: 0; gap: 6px; }
.home-moment-kicker {
  color: var(--muted, #626b65);
  font-size: 12px;
  font-weight: 750;
}
.home-moment h2,
.home-moment h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}
.home-moment p {
  margin: 0;
  color: var(--muted, #626b65);
  font-size: 15px;
  line-height: 1.55;
}
.home-moment-arrow {
  width: 18px;
  height: 18px;
  color: var(--muted, #626b65);
}
.home-moment-actions {
  display: flex;
  gap: 9px;
  margin-top: 7px;
}
.home-moment > .home-moment-kicker,
.home-moment > h2,
.home-moment > p,
.home-moment > .home-moment-actions { margin-left: 44px; }
.home-moment-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border, #d7ddd8);
  border-radius: 19px;
  color: var(--text, #202522);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}
.home-moment-actions button.primary { color: var(--on-action, #fff); background: var(--action, #28664e); border-color: var(--action, #28664e); }
.home-moment.is-running .home-moment-kicker { color: var(--action, #28664e); }
.home-moment.is-running .home-moment-kicker::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: zeta-home-pulse 1.4s ease-in-out infinite;
}
.home-empty { display: flex; align-items: flex-start; gap: 14px; padding: 28px 0; color: var(--muted, #626b65); }
.home-empty > .z-sign { width: 27px; height: 27px; color: var(--action, #28664e); }
.home-empty p { display: grid; gap: 5px; margin: 0; font-size: 15px; line-height: 1.55; }
.home-empty strong { color: var(--text, #202522); font-size: 16px; }

.home-composer {
  position: fixed;
  z-index: 16;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: 704px;
  margin: 0 auto;
  padding: 13px 13px 11px;
  border: 1px solid color-mix(in srgb, var(--border, #d7ddd8) 84%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface, #fff) 94%, transparent);
  box-shadow: 0 12px 32px rgba(24, 32, 27, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.home-composer:focus-within { border-color: color-mix(in srgb, var(--action, #28664e) 55%, transparent); box-shadow: 0 16px 38px rgba(24, 32, 27, .16); transform: translateY(-2px); }
.home-composer textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  max-height: 128px;
  padding: 5px 8px 8px;
  resize: none;
  overflow-y: auto;
  color: var(--text, #202522);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 17px;
  line-height: 1.5;
}
.home-composer-bar { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px 46px; align-items: center; gap: 7px; }
.home-composer .composer-tool,
.home-send-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text, #202522);
  background: var(--surface-soft, #ecefec);
}
.home-send-button { width: 46px; height: 46px; color: var(--on-action, #fff); background: var(--text, #202522); }
.home-send-button:disabled { opacity: .42; }
.home-auto-state {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted, #626b65);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}
.home-auto-state .z-sign { width: 20px; height: 20px; flex: 0 0 20px; color: var(--action, #28664e); }
.home-auto-state span { overflow: hidden; text-overflow: ellipsis; }

.route-mode.passive:disabled { cursor: default; opacity: 1; }
.route-mode.passive { pointer-events: none; }

@keyframes zeta-home-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes zeta-orbit { to { transform: rotate(360deg); } }
@keyframes zeta-breathe { 0%,100% { transform: scale(.94); opacity: .62; } 50% { transform: scale(1.06); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .home-moment.is-running .home-moment-kicker::before,
  .zeta-presence-stage[data-state="working"] .zeta-presence-orbit,
  .zeta-presence-stage[data-state="working"] .z-sign { animation: none; }
}
@media (min-width: 860px) {
  .zeta-home-page { padding-right: 40px; padding-left: 40px; }
  .home-composer { left: calc(var(--sidebar-width, 0px) + 26px); }
}
@media (max-width: 390px) {
  .zeta-home-page { padding-right: 18px; padding-left: 18px; }
  .home-auto-state span { font-size: 11px; }
}
