/* analyst-monitor.css — Iter 25CI
   Personal Analyst, Phase 9b: the monitor page. Shares analyst.css's
   design tokens/hero/section styling (both link style.css's :root
   variables) — this file only adds what's genuinely new: the
   changed-since-last-looked cards, the grouped-by-theme tripwire list,
   state dots, and inline sparklines. */

.amon-main { max-width: 920px; }

.amon-section-title {
  font-family: 'Inter Tight', Inter, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.amon-changed-count {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.amon-loading, .amon-error {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 24px 0;
}
.amon-error { color: var(--accent-red, #C24A4A); }

/* ── Legend ─────────────────────────────────────────────────────── */
.amon-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.amon-legend .amon-dot { margin-left: 10px; }
.amon-legend .amon-dot:first-child { margin-left: 0; }

.amon-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 3px;
}
.amon-dot--normal    { background: var(--text-muted); opacity: 0.5; }
.amon-dot--elevated  { background: #D9A441; }
.amon-dot--triggered { background: #C24A4A; }
.amon-dot--stale     { background: transparent; border: 1.5px dashed var(--text-muted); }

/* ── Changed-since-last-looked cards ───────────────────────────── */
.amon-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.amon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.amon-card[data-state="elevated"]  { border-left-color: #D9A441; }
.amon-card[data-state="triggered"] { border-left-color: #C24A4A; }
.amon-card[data-state="stale"]     { border-left-color: var(--text-muted); opacity: 0.75; }

.amon-card-main { flex: 1 1 260px; min-width: 0; }
.amon-card-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.amon-card-transition {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.amon-card-plain {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 3px;
}
.amon-card-mono {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.amon-sparkline { flex: 0 0 130px; height: 34px; }
.amon-sparkline svg { display: block; width: 100%; height: 100%; }

.amon-run-study-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.amon-run-study-btn:hover { border-color: var(--accent-orange-border); color: var(--text-primary); }

/* ── Grouped-by-theme list ─────────────────────────────────────── */
.amon-theme-group { margin-bottom: 22px; }
.amon-theme-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.amon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-subtle);
}
.amon-row:last-child { border-bottom: none; }

.amon-row-name { flex: 1 1 220px; min-width: 0; }
.amon-row-title { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.amon-row-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.amon-row-desc.amon-gap { color: var(--text-muted); font-style: italic; }

.amon-row-state {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  min-width: 70px;
}

.amon-row-percentile {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 90px;
}

.amon-row-spark { flex: 0 0 90px; height: 26px; }
.amon-row-spark svg { display: block; width: 100%; height: 100%; }

@media (max-width: 640px) {
  .amon-row { flex-wrap: wrap; }
  .amon-row-spark { flex: 1 1 100%; height: 30px; order: 5; }
}
