/**
 * Hearth - a deliberately calm surface.  No animations, no
 * brightness, no urgency cues.  Compare to /app/security/'s
 * card-stack - Hearth uses a softer hierarchy, more vertical
 * breath, lighter density.
 */

.hearth-body {
  background:
    radial-gradient(ellipse 1400px 800px at 50% -10%,
      rgba(96, 165, 250, 0.10) 0%,
      rgba(11, 20, 38, 0) 70%),
    var(--bg-ink, #0B1426);
}

.hearth-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Hero - single column, plenty of air. */
.hearth-hero {
  text-align: center;
  margin: 2rem 0 2.25rem;
}
.hearth-h {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong, #e6efff);
}
.hearth-sub {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted, rgba(230, 239, 255, 0.65));
}
.hearth-sub a {
  color: rgb(147, 197, 253);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hearth-streak {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted, rgba(230, 239, 255, 0.55));
  letter-spacing: 0.02em;
}

/* Compose - feels like a private notebook. */
.hearth-compose {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  margin: 0 0 1.5rem;
}
#hearth-body {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--text-strong, #e6efff);
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}
#hearth-body:focus {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(255, 255, 255, 0.04);
}
#hearth-body::placeholder {
  color: rgba(230, 239, 255, 0.4);
}

.hearth-mood {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.85rem 0;
}
.hearth-mood-lbl {
  font-size: 0.78rem;
  color: var(--text-muted, rgba(230, 239, 255, 0.55));
  margin-right: 0.4rem;
}
.hearth-mood-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted, rgba(230, 239, 255, 0.65));
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 100ms ease, border-color 100ms ease, color 100ms ease;
}
.hearth-mood-btn:hover {
  border-color: rgba(96, 165, 250, 0.32);
  color: var(--text-strong, #e6efff);
}
.hearth-mood-btn[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.12);
  color: var(--text-strong, #e6efff);
}

.hearth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.hearth-foot {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(230, 239, 255, 0.4);
  line-height: 1.55;
}
.hearth-foot a {
  color: rgb(147, 197, 253);
  text-decoration: underline;
}
.hearth-status {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  min-height: 1.2em;
  color: var(--text-muted, rgba(230, 239, 255, 0.55));
}
.hearth-status[data-tone="error"]   { color: rgb(252, 165, 165); }
.hearth-status[data-tone="success"] { color: rgb(134, 239, 172); }

/* Reply card - the wolf's brief response.  Slightly warmer
 * background to read as "different voice". */
.hearth-reply {
  background:
    linear-gradient(180deg,
      rgba(37, 99, 235, 0.10) 0%,
      rgba(37, 99, 235, 0.03) 100%);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
}
.hearth-reply-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.hearth-reply-h {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(147, 197, 253);
}
.hearth-reply-time {
  font-size: 0.72rem;
  color: rgba(230, 239, 255, 0.45);
  font-variant-numeric: tabular-nums;
}
.hearth-reply-text {
  margin: 0.6rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-strong, #e6efff);
}

/* Escalation handoff - only shown when classifier fires.
 * Visually elevated (yellow border) so the user sees it FIRST. */
.hearth-handoff {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(234, 179, 8, 0.10);
  border: 1px solid rgba(234, 179, 8, 0.40);
  border-radius: 11px;
  color: rgb(253, 224, 71);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Timeline - quiet rows, no decoration. */
.hearth-timeline {
  margin-top: 2rem;
}
.hearth-timeline-h {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted, rgba(230, 239, 255, 0.5));
}
.hearth-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hearth-timeline-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.hearth-timeline-item[data-escalation] {
  border-left: 3px solid rgba(234, 179, 8, 0.55);
}
.hearth-timeline-meta {
  display: flex;
  gap: 0.7rem;
  font-size: 0.75rem;
  color: rgba(230, 239, 255, 0.5);
  margin-bottom: 0.4rem;
}
.hearth-timeline-body {
  margin: 0 0 0.45rem;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-strong, #e6efff);
  white-space: pre-wrap;
}
.hearth-timeline-reply {
  margin: 0;
  font-size: 0.85rem;
  color: rgb(147, 197, 253);
  line-height: 1.55;
}
.hearth-timeline-empty {
  padding: 0.85rem 1rem;
  text-align: center;
  color: var(--text-muted, rgba(230, 239, 255, 0.5));
  font-size: 0.85rem;
}
.hearth-timeline-skel {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
