/* Six-dimension model profiles ------------------------------------------
   The surrounding Evidence section supplies its own heading and A/B model
   selectors.  Keep every rule scoped to the optional profile mount so a
   failed or absent profile artifact cannot affect the other Evidence views. */

.model-profiles {
  min-width: 0;
  max-width: 100%;
  margin-top: 12px;
}
.model-profiles,
.model-profiles * {
  box-sizing: border-box;
}
.model-profiles [hidden],
.model-profiles .hidden { display: none !important; }

.profile-status {
  min-height: 18px;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.profile-error {
  display: grid;
  max-width: 760px;
  gap: 7px;
  margin: 0 0 13px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 143, 143, 0.52);
  border-inline-start: 4px solid var(--red);
  border-radius: var(--r-md);
  background: rgba(255, 143, 143, 0.07);
  color: var(--text-2);
}
.profile-error strong { color: #ffb5b5; font-size: 13px; }
.profile-error p {
  max-width: 70ch;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.profile-retry { justify-self: start; min-height: 44px; }

.profile-content { min-width: 0; }
.profile-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-methodology,
.profile-source-note {
  grid-column: 1 / -1;
  max-width: 78ch;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.profile-source-note {
  margin: 0 0 12px;
  color: #a9bfd3;
  font-family: var(--serif);
  font-size: 10.5px;
  font-style: italic;
}
.profile-caveats {
  grid-column: 1 / -1;
  min-width: 0;
  border-top: 1px solid rgba(148, 180, 215, 0.12);
}
.profile-caveats summary {
  min-height: 44px;
  padding: 9px 0 7px;
  color: var(--gold-soft);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 650;
}
.profile-caveat-list {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
  padding-inline-start: 18px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}
.profile-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 11px;
  padding: 15px 16px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue-soft);
  border-radius: var(--r-md);
  background: var(--panel-deep);
}
.profile-card-diagnostic {
  border-top-color: var(--line-strong);
  background: rgba(8, 22, 39, 0.84);
}
.profile-card-heading { min-width: 0; }
.profile-card-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 10.5px;
  font-style: italic;
}
.profile-card-diagnostic .profile-card-eyebrow { color: var(--blue-soft); }
.profile-card h5 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.profile-formula {
  max-width: 65ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.profile-compare {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.profile-compare-row {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.profile-value-label {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: baseline;
}
.profile-side-label {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold-soft);
  font-size: 10px;
  font-weight: 750;
}
.profile-compare-row:nth-child(2) .profile-side-label {
  background: rgba(125, 179, 212, 0.13);
  color: var(--blue-soft);
}
.profile-model-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-2);
  font-size: 13px;
}
.profile-value {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: end;
  white-space: nowrap;
}
.profile-bar-track {
  position: relative;
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(148, 180, 215, 0.08);
}
.profile-bar-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--gold);
}
.profile-bar-b .profile-bar-fill { background: var(--blue-soft); }
.profile-bar-track[role="img"] { cursor: help; }
.profile-no-scale {
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(148, 180, 215, 0.035);
}
.profile-no-scale .profile-value-label { grid-template-columns: auto minmax(0, 1fr) auto; }
.profile-card-diagnostic .profile-value { color: var(--blue-soft); }
.profile-sample,
.profile-extra {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.profile-extra { color: #a9bfd3; }
.profile-detail-pair {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.profile-details {
  min-width: 0;
  border-top: 1px solid rgba(148, 180, 215, 0.12);
}
.profile-details summary {
  min-height: 44px;
  padding: 9px 0 7px;
  color: var(--gold-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.profile-details summary::marker { color: var(--gold); }
.profile-details > p,
.profile-seed-detail > p {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.profile-detail-list {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.profile-detail-row {
  min-width: 0;
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 180, 215, 0.09);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.profile-detail-row:last-child { border-bottom: 0; }

@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .model-profiles { margin-top: 10px; }
  .profile-card { padding: 13px 12px 12px; }
  .profile-value-label { grid-template-columns: auto minmax(0, 1fr); }
  .profile-value { grid-column: 2; text-align: start; }
  .profile-no-scale .profile-value-label { grid-template-columns: auto minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .model-profiles *,
  .model-profiles *::before,
  .model-profiles *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
