/* ============================================================
   Oganiko Persona Card — persona-card
   Canonical component · OS-000 os-006 Persona Card
   Dist (not the catalogue of record): OS-000-Design-System/packages/persona-card.css
   Full contract (anatomy, states, a11y, tokens): ../components/persona-card/SPEC.md
   React binding: ../components/persona-card/react/PersonaCard.tsx (Tailwind
   arbitrary-value classes, same tokens — a separate consumer surface, not a
   mirror of these class names).
   ------------------------------------------------------------
   Provenance: built for the OS-020-AIOS-Marketing-Machine Product Register v0.2
   avatar review (three avatars, 2026-08-07), shown as a show-and-tell demo at
   OS-009-Mission-Dashboard/app/persona-card-demo.html. Internal review tool
   (Operate/Read), not yet proven on a client-facing surface — see SPEC.md
   "Mode" note if reused outward-facing, the color strategy needs revisiting.
   Self-contained: every token carries an Oganiko fallback, so this file works
   alone. Override the tokens in :root to re-theme.
   DO NOT edit vendored copies — sync from this source.
   version: 1.0.0 (2026-08-07)
   ------------------------------------------------------------
   Markup (one card):
     <article class="persona-card">
       <div class="persona-card__head">
         <div class="persona-mark" aria-hidden="true">A1</div>
         <span class="persona-status persona-status--approved">Approved</span>
       </div>
       <p class="persona-primary-tag">Primary avatar</p>            <!-- optional -->
       <h3 class="persona-title">Role framing, one line</h3>
       <ul class="persona-traits"><li>Trait</li></ul>
       <p class="persona-body">Pain statement, 1-3 sentences.</p>
       <button class="persona-toggle" type="button" aria-expanded="false"
         aria-controls="ev-a1" aria-label="Show evidence — A1: Role framing, one line">
         Show evidence — A1
       </button>
       <div class="persona-evidence" id="ev-a1" hidden>
         <div class="persona-evidence__item">
           <p class="persona-evidence__quote">&ldquo;Verbatim quote.&rdquo;</p>
           <p class="persona-evidence__source"><strong>Source:</strong> <a href="#">Title</a> · intake YYYY-MM-DD</p>
         </div>
       </div>
     </article>
   Status modifiers: persona-status--hypothesis | --approved | --validated
     (an approval-lifecycle axis, independent of "primary" — see SPEC.md).
   Empty state: <div class="persona-card persona-card--empty">No avatars yet…</div>
   Collection wrapper: <div class="collection"> … cards … </div> (3→2→1 responsive grid).
   Behavior (implement in your project's JS — this file is presentation only):
     - Toggle click flips aria-expanded and the evidence panel's `hidden` attribute.
     - Multiple cards may be expanded at once — comparing avatars side by side is
       the primary supported use, not an edge case.
   ============================================================ */

.collection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-6, 1.5rem);
}
@media (max-width: 1024px) { .collection { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .collection { grid-template-columns: 1fr; } }

.persona-card {
  background: var(--color-bg-card, #FFFFFF);
  border: 1px solid var(--color-border, #E0E0E0);
  border-radius: var(--radius-lg, 12px);
  padding: var(--spacing-6, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4, 1rem);
  transition: box-shadow var(--transition-base, 200ms ease);
}
.persona-card:hover { box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08)); }

.persona-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-4, 1rem);
}
.persona-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md, 8px);
  background: var(--color-gray-dark, #333333);
  color: var(--color-white, #FFFFFF);
  font-weight: var(--weight-bold, 700);
  font-size: var(--text-sm, 0.875rem);
}
.persona-status {
  display: inline-block;
  border-radius: var(--radius-full, 9999px);
  padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-black, #000000);
}
.persona-status--validated { background: var(--color-success, #34C755); }
.persona-status--approved { background: var(--color-info, #3182CE); }
.persona-status--hypothesis { background: var(--color-warning, #EECA25); }
.persona-primary-tag {
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text-secondary, #333333);
  margin: 0;
}

.persona-title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: var(--weight-bold, 700);
  line-height: var(--leading-snug, 1.25);
  margin: 0;
}
.persona-traits {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2, 0.5rem);
  list-style: none;
  padding: 0;
  margin: 0;
}
.persona-traits li {
  background: var(--color-bg-muted, #F5F5F3);
  color: var(--color-text-secondary, #333333);
  border-radius: var(--radius-full, 9999px);
  padding: var(--spacing-1, 0.25rem) var(--spacing-3, 0.75rem);
  font-size: var(--text-xs, 0.75rem);
}
.persona-body {
  font-size: var(--text-base, 1rem);
  color: var(--color-text-secondary, #333333);
  line-height: var(--leading-relaxed, 1.65);
  margin: 0;
}
.persona-toggle {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  color: var(--color-text-secondary, #333333);
  text-decoration: underline;
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--weight-semibold, 600);
  cursor: pointer;
}
.persona-toggle:focus-visible {
  outline: 2px solid var(--color-border-focus, #34C755);
  outline-offset: 2px;
}
.persona-evidence { display: flex; flex-direction: column; gap: var(--spacing-4, 1rem); }
.persona-evidence[hidden] { display: none; }
.persona-evidence__item {
  background: var(--color-bg-muted, #F5F5F3);
  border-radius: var(--radius-md, 8px);
  padding: var(--spacing-4, 1rem);
}
.persona-evidence__quote {
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text, #000000);
  line-height: var(--leading-relaxed, 1.65);
  margin: 0;
}
.persona-evidence__source {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-secondary, #333333);
  margin: var(--spacing-2, 0.5rem) 0 0;
}
.persona-evidence__source a { color: var(--color-text-secondary, #333333); text-decoration: underline; }

.persona-card--empty {
  border: 1px dashed var(--color-border, #E0E0E0);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-secondary, #333333);
  font-size: var(--text-sm, 0.875rem);
  min-height: 220px;
}

@media (prefers-reduced-motion: reduce) {
  .persona-card { transition: none; }
}
