/* ══════════════════════════════════════════════════════════════════════════
   growth.css — the Rating screen (growth-addon.js) and the "Remembered" line
   under an agent's reply (fmt.js _rememberedPill).
   ──────────────────────────────────────────────────────────────────────────
   Layout only. Every part is a design-system atom: the panel head and scroll
   (app.css .hz-panel-*), .hz-card, .hz-rank (the rating row), .hz-switch,
   .hz-pill, .hz-btn, .hz-empty, .hz-callout; a person's picture is the app's
   .av / .av-person. Every colour, radius, space and size is a token; light
   mode is a token swap. RTL: logical properties throughout.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── The screen ──────────────────────────────────────────────────────────── */
/* A screen pushed ON TOP of the one that opened it (Settings → Library, or a
   chat's "Remembered" line), fixed and layered like #cmUserProfile:
     #settPanel 70  <  #cmGrowth 80  <  .mnav 100 (the phone tab bar floats
     over it; .hz-phone-panel reserves the bar at the end of the list).
   The phone fills the viewport; from 641px it sits right of the sidebar and
   under the top nav, where Settings does. Without this the panel is a plain
   block at the end of <body> — a stray ring under the chat, nothing more. */
#cmGrowth {
  position: fixed; inset: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  background: var(--void);
}
#cmGrowth.show { display: flex; animation: grwIn var(--hz-dur) var(--ease) both; }
/* The panel takes focus when it opens (keyboard and screen-reader users land
   inside it); it is a landmark, not a control, so it wears no ring. */
#cmGrowth:focus { outline: none; }
@media (min-width: 641px) {
  #cmGrowth { top: var(--tnav-h); inset-inline-start: var(--sb); }
  #cmGrowth.show { animation: none; }
  body.anon-mode #cmGrowth { inset-inline-start: 0; }
}
@keyframes grwIn { from { transform: translateX(calc(24px * var(--hz-inline-dir, 1))); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #cmGrowth.show { animation: none; } }

/* The head's surface — the frosted band every panel head wears — and the list under it. */
.grw-head {
  background: var(--hz-surface-panelhdr);
  backdrop-filter: var(--hz-panelhdr-blur);
  -webkit-backdrop-filter: var(--hz-panelhdr-blur);
  box-shadow: var(--hz-panelhdr-shadow);
  border-bottom: 1px solid var(--border);
}
.grw-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.grw-inner {
  display: grid;
  gap: var(--hz-space-4);
  padding: var(--hz-space-4) var(--hz-space-4) var(--hz-space-8);
  max-width: 720px;
  margin-inline: auto;
}
.grw-sec { padding: var(--hz-space-4); display: grid; gap: var(--hz-space-3); }
.grw-help { margin: 0; font-size: var(--hz-text-sm); color: var(--hz-text-meta); }

/* ── You: the reader's own place, and the switch that takes them out of the rating ── */
.grw-me { display: flex; align-items: center; gap: var(--hz-space-3); }
.grw-me .hz-rank-av { --hz-rank-av: 56px; }
.grw-me-body { flex: 1; min-width: 0; display: grid; gap: var(--hz-space-1); }
.grw-me-name {
  margin: 0;
  font-family: var(--hz-font-display); font-size: var(--hz-text-lg); font-weight: var(--hz-weight-bold);
  line-height: var(--hz-leading-tight, 1.2); color: var(--hz-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.grw-me-sub { font-size: var(--hz-text-sm); color: var(--hz-text-meta); font-variant-numeric: tabular-nums; }
.grw-me-sub b { color: var(--hz-text); font-weight: var(--hz-weight-bold); }
.grw-me-place { flex: none; display: grid; justify-items: end; gap: var(--hz-space-1); text-align: end; }
.grw-me-place b {
  font-family: var(--hz-font-display); font-size: var(--hz-text-2xl); font-weight: 800; line-height: 1;
  color: var(--hz-brand); font-variant-numeric: tabular-nums;
}
.grw-me-place span { font-size: var(--hz-text-xs); font-weight: var(--hz-weight-semibold); color: var(--hz-text-meta); }
.grw-me-line { margin: 0; font-size: var(--hz-text-sm); font-weight: var(--hz-weight-semibold); color: var(--hz-text); }
.grw-switch {
  display: flex; align-items: center; gap: var(--hz-space-3);
  padding-top: var(--hz-space-3);
  border-top: 1px solid var(--hz-border);
}
.grw-switch-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.grw-switch-label { font-size: var(--hz-text-sm); font-weight: var(--hz-weight-semibold); color: var(--hz-text); }
.grw-switch-help { font-size: var(--hz-text-xs); color: var(--hz-text-meta); }

/* ── The list ─────────────────────────────────────────────────────────────── */
.grw-rows { padding-inline: var(--hz-space-2); gap: var(--hz-space-2); }
.grw-sec-title {
  margin: 0; padding-inline: var(--hz-space-2);
  font-size: var(--hz-text-xs); font-weight: var(--hz-weight-bold); letter-spacing: .06em; text-transform: uppercase;
  color: var(--hz-text-meta);
}
.grw-more { justify-self: center; margin-block: var(--hz-space-1); }
.grw-empty { padding-block: var(--hz-space-6); }

/* ── Figures in a right-to-left screen: a figure with a sign is one left-to-right run ── */
.grw-num { unicode-bidi: isolate; direction: ltr; }
.hz-remembered-b { unicode-bidi: plaintext; }

/* ── Failed and loading states ───────────────────────────────────────────── */
.grw-state { display: grid; gap: var(--hz-space-3); }

/* ── The "Remembered" line under a reply (fmt.js _rememberedPill) ────────── */
.hz-remembered {
  display: flex; align-items: center; gap: var(--hz-space-2);
  margin-top: var(--hz-space-2);
  padding: var(--hz-space-1) var(--hz-space-1) var(--hz-space-1) var(--hz-space-3);
  border-radius: var(--hz-radius-pill);
  background: var(--hz-surface-fill);
  border: 1px solid var(--hz-border);
  font-size: var(--hz-text-sm); line-height: var(--hz-leading-normal);
  color: var(--hz-text-meta);
  max-width: 100%;
}
.hz-remembered-ic { flex: none; font-size: var(--hz-text-md); line-height: 1; }
.hz-remembered-b { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.hz-remembered-b b { color: var(--hz-text); font-weight: var(--hz-weight-semibold); }
