/* PROFILE-only fidelity layer. Loaded by profile.html and scoped so the shared workspace stays put. */
.profile-shell .profile-design {
  gap: 20px;
}

.profile-shell .profile-topbar {
  align-items: flex-start;
}

.profile-shell .profile-topbar h1 {
  letter-spacing: -0.02em;
}

.profile-shell .profile-design-tabs {
  margin-top: 0;
}

.profile-shell .profile-design-overview,
.profile-shell .profile-design-settings {
  gap: 16px;
}

.profile-shell .profile-design-card {
  gap: 16px;
}

.profile-shell .profile-design-card__identity {
  min-height: 48px;
}

.profile-shell .profile-design-card__identity h2 {
  letter-spacing: -0.015em;
}

.profile-shell .profile-card__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.profile-shell .profile-panel {
  border-radius: var(--radius);
  box-shadow: none;
}

.profile-shell .profile-facts {
  gap: 10px;
}

.profile-shell .profile-facts__row {
  gap: 2px;
}

.profile-shell .profile-progress-panel {
  gap: 10px;
  padding: 20px 22px;
}

.profile-shell #profile-learning-analytics {
  display: block;
}

.profile-shell .profile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.profile-shell .profile-kpi-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  background: transparent;
}

.profile-shell .profile-kpi-card + .profile-kpi-card { border-left: 1px solid var(--border); }

.profile-shell .profile-kpi-card__label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.profile-shell .profile-kpi-card__value {
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.profile-shell .profile-design-settings > .profile-panel {
  gap: 12px;
}

.profile-shell .profile-design-secondary {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 82%, var(--surface-2));
}

.profile-shell .profile-design-secondary h2,
.profile-shell .profile-design-secondary .site-note {
  color: var(--muted);
}

.profile-shell .profile-design-secondary #profile-password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.profile-shell .profile-design-secondary #profile-password-form .site-primary-action,
.profile-shell .profile-design-secondary #profile-password-status {
  grid-column: 1 / -1;
  justify-self: start;
}

.profile-shell #profile-sessions-list {
  display: grid;
  gap: 8px;
}

.profile-shell .profile-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.profile-shell .profile-session-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.profile-shell .profile-session-device {
  overflow: hidden;
  font-size: 0.87rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-shell .profile-session-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-shell .profile-session-pill {
  display: inline-flex;
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.profile-shell .profile-session-pill--current {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.profile-shell .profile-session-pill--active {
  background: var(--surface);
  color: var(--muted);
}

.profile-shell .profile-access-actions {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.profile-shell .profile-secondary-action {
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 700px) {
  .profile-shell .profile-card__grid,
  .profile-shell .profile-kpi-grid,
  .profile-shell .profile-design-secondary #profile-password-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-shell .profile-design-secondary #profile-password-form .site-primary-action,
  .profile-shell .profile-design-secondary #profile-password-status {
    grid-column: auto;
  }

  .profile-shell .profile-session-row {
    align-items: flex-start;
  }
}
